From 5ec0232d344cc5e257a7f5299349abd7e0dfa8ca Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Wed, 3 Mar 2004 06:18:29 +0000 Subject: [PATCH] Cast thru intptr_t on the way to void* for success on 64-bit platforms. --- sys/dev/drm/drm_drv.h | 10 +++++----- sys/dev/drm/drm_vm.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/drm/drm_drv.h b/sys/dev/drm/drm_drv.h index 848794ae1cfc..e54e7902b571 100644 --- a/sys/dev/drm/drm_drv.h +++ b/sys/dev/drm/drm_drv.h @@ -829,7 +829,7 @@ int DRM(close)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p) drm_file_t *priv; DRM_DEVICE; int retcode = 0; - DRMFILE filp = (void *)(DRM_CURRENTPID); + DRMFILE filp = (void *)(intptr_t)(DRM_CURRENTPID); DRM_DEBUG( "open_count = %d\n", dev->open_count ); @@ -907,7 +907,7 @@ int DRM(close)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p) } } #elif __HAVE_DMA - DRM(reclaim_buffers)( dev, (void *)priv->pid ); + DRM(reclaim_buffers)( dev, (void *)(intptr_t)priv->pid ); #endif #if defined (__FreeBSD__) && (__FreeBSD_version >= 500000) @@ -952,7 +952,7 @@ int DRM(ioctl)(dev_t kdev, u_long cmd, caddr_t data, int flags, int nr = DRM_IOCTL_NR(cmd); drm_file_t *priv; - DRM_GET_PRIV_WITH_RETURN(priv, (DRMFILE)DRM_CURRENTPID); + DRM_GET_PRIV_WITH_RETURN(priv, (DRMFILE)(intptr_t)DRM_CURRENTPID); atomic_inc( &dev->counts[_DRM_STAT_IOCTLS] ); ++priv->ioctl_count; @@ -1007,7 +1007,7 @@ int DRM(ioctl)(dev_t kdev, u_long cmd, caddr_t data, int flags, !priv->authenticated)) return EACCES; - retcode = func(kdev, cmd, data, flags, p, (void *)DRM_CURRENTPID); + retcode = func(kdev, cmd, data, flags, p, (void *)(intptr_t)DRM_CURRENTPID); return DRM_ERR(retcode); } @@ -1038,7 +1038,7 @@ int DRM(lock)( DRM_IOCTL_ARGS ) DRM_LOCK(); for (;;) { if (DRM(lock_take)(&dev->lock.hw_lock->lock, lock.context)) { - dev->lock.filp = (void *)DRM_CURRENTPID; + dev->lock.filp = (void *)(intptr_t)DRM_CURRENTPID; dev->lock.lock_time = jiffies; atomic_inc(&dev->counts[_DRM_STAT_LOCKS]); break; /* Got lock */ diff --git a/sys/dev/drm/drm_vm.h b/sys/dev/drm/drm_vm.h index 9d3bb988c95c..706f4eb9894e 100644 --- a/sys/dev/drm/drm_vm.h +++ b/sys/dev/drm/drm_vm.h @@ -68,7 +68,7 @@ paddr_t DRM(mmap)(dev_t kdev, off_t offset, int prot) drm_map_list_entry_t *listentry = NULL; drm_file_t *priv; - DRM_GET_PRIV_WITH_RETURN(priv, (DRMFILE)DRM_CURRENTPID); + DRM_GET_PRIV_WITH_RETURN(priv, (DRMFILE)(intptr_t)DRM_CURRENTPID); if (!priv->authenticated) return DRM_ERR(EACCES);