Fix -Wundef warnings and properly check the size of long, FWIW.
This commit is contained in:
parent
b2be20597c
commit
77cd5a64cf
@ -2937,7 +2937,7 @@ static int radeon_cp_getparam(DRM_IOCTL_ARGS)
|
|||||||
case RADEON_PARAM_STATUS_HANDLE:
|
case RADEON_PARAM_STATUS_HANDLE:
|
||||||
value = dev_priv->ring_rptr_offset;
|
value = dev_priv->ring_rptr_offset;
|
||||||
break;
|
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
|
* 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
|
* 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
|
* so backwards-compatibility for the embedded platforms can be
|
||||||
* maintained. --davidm 4-Feb-2004.
|
* 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. */
|
/* The lock is the first dword in the sarea. */
|
||||||
value = (long)dev->lock.hw_lock;
|
value = (long)dev->lock.hw_lock;
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case RADEON_PARAM_GART_TEX_HANDLE:
|
case RADEON_PARAM_GART_TEX_HANDLE:
|
||||||
value = dev_priv->gart_textures_offset;
|
value = dev_priv->gart_textures_offset;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user