[PATCH] drm: const'ify ioctls table

Rob Clark robdclark at gmail.com
Fri Aug 2 06:51:38 PDT 2013


On Fri, Aug 2, 2013 at 6:51 AM, Ville Syrjälä
<ville.syrjala at linux.intel.com> wrote:
> On Thu, Aug 01, 2013 at 02:25:27PM -0400, Rob Clark wrote:
>> Because, there is no reason for it not to be const.
>>
>> Signed-off-by: Rob Clark <robdclark at gmail.com>
>> ---
> <snip>
>> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
>> index 78e2164..eaf86e0 100644
>> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
>> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
>> @@ -124,7 +124,7 @@
>>   * Ioctl definitions.
>>   */
>>
>> -static struct drm_ioctl_desc vmw_ioctls[] = {
>> +static const struct drm_ioctl_desc vmw_ioctls[] = {
>>       VMW_IOCTL_DEF(VMW_GET_PARAM, vmw_getparam_ioctl,
>>                     DRM_AUTH | DRM_UNLOCKED),
>>       VMW_IOCTL_DEF(VMW_ALLOC_DMABUF, vmw_dmabuf_alloc_ioctl,
>
> You forgot to fix vmw_unlocked_ioctl().

yeah, kbuild robot caught that too.. somehow I didn't have vmwgfx
enabled in my config (opps!).. fixed now

> Also if you're poking around this stuff, exynos and nouveau appear to
> set .num_ioctls from the probe/init funcs even though the ioctls array
> is right there in the same compilation unit.

good idea, I've squashed that in, so will be part of v2

BR,
-R

> --
> Ville Syrjälä
> Intel OTC


More information about the dri-devel mailing list