summaryrefslogtreecommitdiffstats
path: root/sys/pccard
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-08-16 01:21:52 +0000
committerbde <bde@FreeBSD.org>1998-08-16 01:21:52 +0000
commit9e27b29fba08158ea646560dc2c0f671e17923cf (patch)
treeca50bac0920c7e526393546681e1b22c87541004 /sys/pccard
parente14b44bbf30df0b2ba5a4750b2c2806bcae489eb (diff)
downloadFreeBSD-src-9e27b29fba08158ea646560dc2c0f671e17923cf.zip
FreeBSD-src-9e27b29fba08158ea646560dc2c0f671e17923cf.tar.gz
Use [u]intptr_t instead of [u_]long for casts between pointers and
integers. Don't forget to cast to (void *) as well.
Diffstat (limited to 'sys/pccard')
-rw-r--r--sys/pccard/pccard.c14
-rw-r--r--sys/pccard/pcic.c2
2 files changed, 9 insertions, 7 deletions
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c
index 7ce11de..3fd3caf 100644
--- a/sys/pccard/pccard.c
+++ b/sys/pccard/pccard.c
@@ -28,7 +28,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: pccard.c,v 1.61 1998/06/07 17:12:34 dfr Exp $
+ * $Id: pccard.c,v 1.62 1998/06/18 15:32:09 bde Exp $
*/
#include "opt_devfs.h"
@@ -589,7 +589,8 @@ allocate_driver(struct slot *slt, struct dev_desc *desc)
*/
if (desc->mem)
devi->isahd.id_maddr =
- (caddr_t)(desc->mem + atdevbase - IOM_BEGIN);
+ (caddr_t)(void *)(uintptr_t)
+ (desc->mem + atdevbase - IOM_BEGIN);
else
devi->isahd.id_maddr = 0;
devi->next = slt->devices;
@@ -789,7 +790,7 @@ crdread(dev_t dev, struct uio *uio, int ioflag)
while (uio->uio_resid && error == 0) {
mp->card = uio->uio_offset;
mp->size = PCCARD_MEMSIZE;
- mp->start = (caddr_t)pccard_mem;
+ mp->start = (caddr_t)(void *)(uintptr_t)pccard_mem;
if (error = slt->ctrl->mapmem(slt, win))
break;
offs = (unsigned int)uio->uio_offset & (PCCARD_MEMSIZE - 1);
@@ -839,7 +840,7 @@ crdwrite(dev_t dev, struct uio *uio, int ioflag)
while (uio->uio_resid && error == 0) {
mp->card = uio->uio_offset;
mp->size = PCCARD_MEMSIZE;
- mp->start = (caddr_t)pccard_mem;
+ mp->start = (caddr_t)(void *)(uintptr_t)pccard_mem;
if (error = slt->ctrl->mapmem(slt, win))
break;
offs = (unsigned int)uio->uio_offset & (PCCARD_MEMSIZE - 1);
@@ -977,8 +978,9 @@ crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)
* Map it to kernel VM.
*/
pccard_mem = *(unsigned long *)data;
- pccard_kmem = (unsigned char *)(pccard_mem
- + atdevbase - IOM_BEGIN);
+ pccard_kmem =
+ (unsigned char *)(void *)(uintptr_t)
+ (pccard_mem + atdevbase - IOM_BEGIN);
break;
/*
* Set power values.
diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c
index ff02b78..6bfd484 100644
--- a/sys/pccard/pcic.c
+++ b/sys/pccard/pcic.c
@@ -374,7 +374,7 @@ pcic_memory(struct slot *slt, int win)
#endif /* PC98 */
if (mp->flags & MDF_ACTIVE) {
- unsigned long sys_addr = (unsigned long)mp->start >> 12;
+ unsigned long sys_addr = (uintptr_t)(void *)mp->start >> 12;
/*
* Write the addresses, card offsets and length.
* The values are all stored as the upper 12 bits of the
OpenPOWER on IntegriCloud