diff options
author | jhb <jhb@FreeBSD.org> | 2002-11-08 18:27:30 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2002-11-08 18:27:30 +0000 |
commit | b72917b520dafbce4c1cc804dc93887d66c593b3 (patch) | |
tree | 291ae2bd3be9306179924d18340c26cf8e4f0b9c /sys/dev/hea | |
parent | 451dec5f86ca56ab2475ea41c94afa7b4fc2b919 (diff) | |
download | FreeBSD-src-b72917b520dafbce4c1cc804dc93887d66c593b3.zip FreeBSD-src-b72917b520dafbce4c1cc804dc93887d66c593b3.tar.gz |
- Change the ATM stack functions to use intptr_t instead of int for opaque
arguments.
- Fix a few other places that assumed that sizeof(int) == sizeof(void *).
Reviewed by: mdodd
Diffstat (limited to 'sys/dev/hea')
-rw-r--r-- | sys/dev/hea/eni_buffer.c | 6 | ||||
-rw-r--r-- | sys/dev/hea/eni_vcm.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/hea/eni_buffer.c b/sys/dev/hea/eni_buffer.c index e113b55..0230c29 100644 --- a/sys/dev/hea/eni_buffer.c +++ b/sys/dev/hea/eni_buffer.c @@ -103,7 +103,7 @@ eni_test_memory ( eup ) * Walk through to maximum looking for RAM */ for ( i = 0; i < MAX_ENI_MEM; i += TEST_STEP ) { - mp = (Eni_mem)((int)eup->eu_ram + i); + mp = (Eni_mem)((intptr_t)eup->eu_ram + i); /* write pattern */ *mp = (u_long)TEST_PAT; /* read pattern, match? */ @@ -254,7 +254,7 @@ eni_allocate_buffer ( eup, size ) * Request will fit - now check if the * alignment needs fixing */ - if ( ((u_int)eptr->base & (nsize-1)) != 0 ) + if ( ((uintptr_t)eptr->base & (nsize-1)) != 0 ) { caddr_t nbase; @@ -262,7 +262,7 @@ eni_allocate_buffer ( eup, size ) * Calculate where the buffer would have to * fall to be aligned. */ - nbase = (caddr_t)((u_int)( eptr->base + nsize ) & + nbase = (caddr_t)((uintptr_t)( eptr->base + nsize ) & ~(nsize-1)); /* * If we use this alignment, will it still fit? diff --git a/sys/dev/hea/eni_vcm.c b/sys/dev/hea/eni_vcm.c index 38d4423..67766d3 100644 --- a/sys/dev/hea/eni_vcm.c +++ b/sys/dev/hea/eni_vcm.c @@ -200,7 +200,7 @@ eni_openvcc ( cup, cvp ) vct->vci_control = mode << VCI_MODE_SHIFT | PTI_MODE_TRASH << VCI_PTI_SHIFT | - ( (u_int)(evp->ev_rxbuf) >> ENI_LOC_PREDIV ) << VCI_LOC_SHIFT | + ( (uintptr_t)(evp->ev_rxbuf) >> ENI_LOC_PREDIV ) << VCI_LOC_SHIFT | nsize << VCI_SIZE_SHIFT; vct->vci_descr = 0; /* Descr = Rdptr = 0 */ vct->vci_write = 0; /* WritePtr = CellCount = 0 */ |