Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/msm: Remove DRM_MSM_NUM_IOCTLS

The ioctl array is sparsely populated but the compiler will make sure
that it is sufficiently sized for all the values that we have so we
can safely use ARRAY_SIZE() instead of having a constantly changing
#define in the uapi header.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>

authored by

Jordan Crouse and committed by
Rob Clark
167b606a 7c65817e

+1 -2
+1 -1
drivers/gpu/drm/msm/msm_drv.c
··· 842 842 .debugfs_init = msm_debugfs_init, 843 843 #endif 844 844 .ioctls = msm_ioctls, 845 - .num_ioctls = DRM_MSM_NUM_IOCTLS, 845 + .num_ioctls = ARRAY_SIZE(msm_ioctls), 846 846 .fops = &fops, 847 847 .name = "msm", 848 848 .desc = "MSM Snapdragon DRM",
-1
include/uapi/drm/msm_drm.h
··· 261 261 #define DRM_MSM_GEM_SUBMIT 0x06 262 262 #define DRM_MSM_WAIT_FENCE 0x07 263 263 #define DRM_MSM_GEM_MADVISE 0x08 264 - #define DRM_MSM_NUM_IOCTLS 0x09 265 264 266 265 #define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param) 267 266 #define DRM_IOCTL_MSM_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_NEW, struct drm_msm_gem_new)