diff options
author | ru <ru@FreeBSD.org> | 2005-12-04 10:01:44 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2005-12-04 10:01:44 +0000 |
commit | ba947732035bc2e67c5e9e5c9a31dca54a88e902 (patch) | |
tree | 13adcedc60e84569abbef45e94087ed5e3603af1 /sys/dev | |
parent | 8da610ce473dacf93c5b6212e94c89a4e447c5e5 (diff) | |
download | FreeBSD-src-ba947732035bc2e67c5e9e5c9a31dca54a88e902.zip FreeBSD-src-ba947732035bc2e67c5e9e5c9a31dca54a88e902.tar.gz |
Fix -Wundef warnings and properly check the size of long, FWIW.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/drm/radeon_state.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/drm/radeon_state.c b/sys/dev/drm/radeon_state.c index 23d5500..d568862 100644 --- a/sys/dev/drm/radeon_state.c +++ b/sys/dev/drm/radeon_state.c @@ -2937,7 +2937,7 @@ static int radeon_cp_getparam(DRM_IOCTL_ARGS) case RADEON_PARAM_STATUS_HANDLE: value = dev_priv->ring_rptr_offset; break; -#if BITS_PER_LONG == 32 + case RADEON_PARAM_SAREA_HANDLE: /* * This ioctl() doesn't work on 64-bit platforms because hw_lock is a * pointer which can't fit into an int-sized variable. According to @@ -2947,11 +2947,11 @@ static int radeon_cp_getparam(DRM_IOCTL_ARGS) * so backwards-compatibility for the embedded platforms can be * maintained. --davidm 4-Feb-2004. */ - case RADEON_PARAM_SAREA_HANDLE: + if (sizeof(long) * 8 == 64) + return DRM_ERR(EINVAL); /* The lock is the first dword in the sarea. */ value = (long)dev->lock.hw_lock; break; -#endif case RADEON_PARAM_GART_TEX_HANDLE: value = dev_priv->gart_textures_offset; break; |