[PATCH] drm: line wrap DRM_IOCTL_DEF* macros

Daniel Vetter daniel at ffwll.ch
Mon Mar 30 07:51:06 PDT 2015


On Mon, Mar 30, 2015 at 12:58:10PM +0000, Emil Velikov wrote:
> Improve the readability and keeps the lines shorter than 80 columns.
> 
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
> 
> Written against drm-intel/topic/drm-misc.

Ah I've forgotten to push it out, silly me. Can you please rebase?

Thanks, Daniel

> 
> -Emil
> 
> ---
>  drivers/gpu/drm/drm_ioctl.c | 10 ++++++++--
>  include/drm/drmP.h          |  8 +++++++-
>  2 files changed, 15 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
> index a6d773a..ae50f7b 100644
> --- a/drivers/gpu/drm/drm_ioctl.c
> +++ b/drivers/gpu/drm/drm_ioctl.c
> @@ -524,8 +524,14 @@ static int drm_ioctl_permit(u32 flags, struct drm_file *file_priv)
>  	return 0;
>  }
>  
> -#define DRM_IOCTL_DEF(ioctl, _func, _flags) \
> -	[DRM_IOCTL_NR(ioctl)] = {.cmd = ioctl, .func = _func, .flags = _flags, .cmd_drv = 0, .name = #ioctl}
> +#define DRM_IOCTL_DEF(ioctl, _func, _flags)	\
> +	[DRM_IOCTL_NR(ioctl)] = {		\
> +		.cmd = ioctl,			\
> +		.func = _func,			\
> +		.flags = _flags,		\
> +		.cmd_drv = 0,			\
> +		.name = #ioctl			\
> +	}
>  
>  /** Ioctl table */
>  static const struct drm_ioctl_desc drm_ioctls[] = {
> diff --git a/include/drm/drmP.h b/include/drm/drmP.h
> index 63c0b01..c95543c 100644
> --- a/include/drm/drmP.h
> +++ b/include/drm/drmP.h
> @@ -263,7 +263,13 @@ struct drm_ioctl_desc {
>   */
>  
>  #define DRM_IOCTL_DEF_DRV(ioctl, _func, _flags)			\
> -	[DRM_IOCTL_NR(DRM_##ioctl)] = {.cmd = DRM_##ioctl, .func = _func, .flags = _flags, .cmd_drv = DRM_IOCTL_##ioctl, .name = #ioctl}
> +	[DRM_IOCTL_NR(DRM_##ioctl)] = {				\
> +		.cmd = DRM_##ioctl,				\
> +		.func = _func,					\
> +		.flags = _flags,				\
> +		.cmd_drv = DRM_IOCTL_##ioctl,			\
> +		.name = #ioctl					\
> +	}
>  
>  /* Event queued up for userspace to read */
>  struct drm_pending_event {
> -- 
> 2.1.3
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list