diff mbox

drm: line wrap DRM_IOCTL_DEF* macros

Message ID 1427720290-24990-1-git-send-email-emil.l.velikov@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Emil Velikov March 30, 2015, 12:58 p.m. UTC
Improve the readability and keeps the lines shorter than 80 columns.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---

Written against drm-intel/topic/drm-misc.

-Emil

---
 drivers/gpu/drm/drm_ioctl.c | 10 ++++++++--
 include/drm/drmP.h          |  8 +++++++-
 2 files changed, 15 insertions(+), 3 deletions(-)

Comments

Daniel Vetter March 30, 2015, 2:51 p.m. UTC | #1
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@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@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

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 {