[PATCH] drm: line wrap DRM_IOCTL_DEF* macros
Emil Velikov
emil.l.velikov at gmail.com
Mon Mar 30 05:58:10 PDT 2015
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.
-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
More information about the dri-devel
mailing list