summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-08-24 00:56:50 +0000
committerbde <bde@FreeBSD.org>1999-08-24 00:56:50 +0000
commitfaf95163e9f85fe6efd41c7b0a56672c11a621a2 (patch)
tree2d3b666b5cac091c67205d14119b379e2b7a16f0 /sys
parentc832c03c3c4b357f9ff6827351df1e89d60a083c (diff)
downloadFreeBSD-src-faf95163e9f85fe6efd41c7b0a56672c11a621a2.zip
FreeBSD-src-faf95163e9f85fe6efd41c7b0a56672c11a621a2.tar.gz
Cast pointers to uintptr_t instead of casting them to u_long, and/or vice
versa. Cosmetic.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/isp/isp_pci.c4
-rw-r--r--sys/i386/isa/isa_compat.c4
-rw-r--r--sys/kern/link_elf.c6
-rw-r--r--sys/kern/link_elf_obj.c6
-rw-r--r--sys/kern/subr_scanf.c4
-rw-r--r--sys/kern/vfs_bio.c9
-rw-r--r--sys/pci/if_al.c6
-rw-r--r--sys/pci/isp_pci.c4
8 files changed, 22 insertions, 21 deletions
diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c
index e32a1cb..8fd49bb 100644
--- a/sys/dev/isp/isp_pci.c
+++ b/sys/dev/isp/isp_pci.c
@@ -1,4 +1,4 @@
-/* $Id: isp_pci.c,v 1.29 1999/08/16 01:52:21 gibbs Exp $ */
+/* $Id: isp_pci.c,v 1.30 1999/08/16 19:52:29 mjacob Exp $ */
/*
* PCI specific probe and attach routines for Qlogic ISP SCSI adapters.
* FreeBSD Version.
@@ -576,7 +576,7 @@ isp_pci_attach(pcici_t cfid, int unit)
/*
* poor man's attempt at pseudo randomness.
*/
- long i = (long) isp;
+ long i = (intptr_t) isp;
i >>= 5;
i &= 0x7;
diff --git a/sys/i386/isa/isa_compat.c b/sys/i386/isa/isa_compat.c
index 28b43bf..83fd0bc 100644
--- a/sys/i386/isa/isa_compat.c
+++ b/sys/i386/isa/isa_compat.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: isa_compat.c,v 1.11 1999/05/24 18:50:41 dfr Exp $
+ * $Id: isa_compat.c,v 1.12 1999/05/30 11:04:31 dfr Exp $
*/
#include <sys/param.h>
@@ -178,7 +178,7 @@ isa_compat_probe(device_t dev)
dvp->id_drq = -1;
if (ISA_GET_RESOURCE(parent, dev, SYS_RES_MEMORY,
0, &start, &count) == 0) {
- dvp->id_maddr = (void *)start;
+ dvp->id_maddr = (void *)(uintptr_t)start;
dvp->id_msize = count;
} else {
dvp->id_maddr = NULL;
diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c
index 0cfef4f..e30294e 100644
--- a/sys/kern/link_elf.c
+++ b/sys/kern/link_elf.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: link_elf.c,v 1.16 1999/01/29 09:04:27 bde Exp $
+ * $Id: link_elf.c,v 1.17 1999/05/08 13:03:49 peter Exp $
*/
#include <sys/param.h>
@@ -157,7 +157,7 @@ link_elf_init(void* arg)
panic("link_elf_init: Can't create linker structures for kernel");
parse_dynamic(linker_kernel_file);
linker_kernel_file->address = (caddr_t) KERNBASE;
- linker_kernel_file->size = -(long)linker_kernel_file->address;
+ linker_kernel_file->size = -(intptr_t)linker_kernel_file->address;
if (modptr) {
ef->modptr = modptr;
@@ -950,7 +950,7 @@ link_elf_search_symbol(linker_file_t lf, caddr_t value,
c_linker_sym_t* sym, long* diffp)
{
elf_file_t ef = lf->priv;
- u_long off = (u_long) value;
+ u_long off = (uintptr_t) value;
u_long diff = off;
const Elf_Sym* es;
const Elf_Sym* best = 0;
diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c
index 0cfef4f..e30294e 100644
--- a/sys/kern/link_elf_obj.c
+++ b/sys/kern/link_elf_obj.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: link_elf.c,v 1.16 1999/01/29 09:04:27 bde Exp $
+ * $Id: link_elf.c,v 1.17 1999/05/08 13:03:49 peter Exp $
*/
#include <sys/param.h>
@@ -157,7 +157,7 @@ link_elf_init(void* arg)
panic("link_elf_init: Can't create linker structures for kernel");
parse_dynamic(linker_kernel_file);
linker_kernel_file->address = (caddr_t) KERNBASE;
- linker_kernel_file->size = -(long)linker_kernel_file->address;
+ linker_kernel_file->size = -(intptr_t)linker_kernel_file->address;
if (modptr) {
ef->modptr = modptr;
@@ -950,7 +950,7 @@ link_elf_search_symbol(linker_file_t lf, caddr_t value,
c_linker_sym_t* sym, long* diffp)
{
elf_file_t ef = lf->priv;
- u_long off = (u_long) value;
+ u_long off = (uintptr_t) value;
u_long diff = off;
const Elf_Sym* es;
const Elf_Sym* best = 0;
diff --git a/sys/kern/subr_scanf.c b/sys/kern/subr_scanf.c
index 6d65d98..8b1f740 100644
--- a/sys/kern/subr_scanf.c
+++ b/sys/kern/subr_scanf.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: subr_scanf.c,v 1.4 1999/01/29 08:09:32 dillon Exp $
+ * $Id: subr_scanf.c,v 1.5 1999/02/14 20:58:21 dillon Exp $
* From: Id: vfscanf.c,v 1.13 1998/09/25 12:20:27 obrien Exp
*/
@@ -517,7 +517,7 @@ literal:
res = (*ccfn)(buf, (const char **)NULL, base);
if (flags & POINTER)
*va_arg(ap, void **) =
- (void *)(u_long)res;
+ (void *)(uintptr_t)res;
else if (flags & SHORT)
*va_arg(ap, short *) = res;
else if (flags & LONG)
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 83a55b9..f23db16 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -11,7 +11,7 @@
* 2. Absolutely no warranty of function or purpose is made by the author
* John S. Dyson.
*
- * $Id: vfs_bio.c,v 1.224 1999/07/26 06:25:16 alc Exp $
+ * $Id: vfs_bio.c,v 1.225 1999/08/08 18:42:48 phk Exp $
*/
/*
@@ -2972,10 +2972,11 @@ vfs_bio_clrbuf(struct buf *bp) {
}
ea = sa = bp->b_data;
for(i=0;i<bp->b_npages;i++,sa=ea) {
- int j = ((u_long)sa & PAGE_MASK) / DEV_BSIZE;
+ int j = ((vm_offset_t)sa & PAGE_MASK) / DEV_BSIZE;
ea = (caddr_t)trunc_page((vm_offset_t)sa + PAGE_SIZE);
- ea = (caddr_t)ulmin((u_long)ea,
- (u_long)bp->b_data + bp->b_bufsize);
+ ea = (caddr_t)(vm_offset_t)ulmin(
+ (u_long)(vm_offset_t)ea,
+ (u_long)(vm_offset_t)bp->b_data + bp->b_bufsize);
mask = ((1 << ((ea - sa) / DEV_BSIZE)) - 1) << j;
if ((bp->b_pages[i]->valid & mask) == mask)
continue;
diff --git a/sys/pci/if_al.c b/sys/pci/if_al.c
index 1c3c773..05ea417 100644
--- a/sys/pci/if_al.c
+++ b/sys/pci/if_al.c
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_al.c,v 1.7 1999/08/21 06:24:32 msmith Exp $
+ * $Id: if_al.c,v 1.8 1999/08/21 22:10:48 msmith Exp $
*/
/*
@@ -91,7 +91,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id: if_al.c,v 1.7 1999/08/21 06:24:32 msmith Exp $";
+ "$Id: if_al.c,v 1.8 1999/08/21 22:10:48 msmith Exp $";
#endif
/*
@@ -965,7 +965,7 @@ al_attach(config_id, unit)
}
sc->al_ldata = (struct al_list_data *)sc->al_ldata_ptr;
- round = (unsigned long)sc->al_ldata_ptr & 0xF;
+ round = (uintptr_t)sc->al_ldata_ptr & 0xF;
roundptr = sc->al_ldata_ptr;
for (i = 0; i < 8; i++) {
if (round % 8) {
diff --git a/sys/pci/isp_pci.c b/sys/pci/isp_pci.c
index e32a1cb..8fd49bb 100644
--- a/sys/pci/isp_pci.c
+++ b/sys/pci/isp_pci.c
@@ -1,4 +1,4 @@
-/* $Id: isp_pci.c,v 1.29 1999/08/16 01:52:21 gibbs Exp $ */
+/* $Id: isp_pci.c,v 1.30 1999/08/16 19:52:29 mjacob Exp $ */
/*
* PCI specific probe and attach routines for Qlogic ISP SCSI adapters.
* FreeBSD Version.
@@ -576,7 +576,7 @@ isp_pci_attach(pcici_t cfid, int unit)
/*
* poor man's attempt at pseudo randomness.
*/
- long i = (long) isp;
+ long i = (intptr_t) isp;
i >>= 5;
i &= 0x7;
OpenPOWER on IntegriCloud