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

drm: Constify drm_color_lut_check()

drm_color_lut_check() doens't modify the passed in blob so
let's make it const.

Also s/uint32_t/u32/ while at it.

v2: Reduce line wraps (Sam)

Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190129170609.5718-1-ville.syrjala@linux.intel.com
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

+3 -5
+2 -3
drivers/gpu/drm/drm_color_mgmt.c
··· 474 474 * 475 475 * Returns 0 on success, -EINVAL on failure. 476 476 */ 477 - int drm_color_lut_check(struct drm_property_blob *lut, 478 - uint32_t tests) 477 + int drm_color_lut_check(const struct drm_property_blob *lut, u32 tests) 479 478 { 480 - struct drm_color_lut *entry; 479 + const struct drm_color_lut *entry; 481 480 int i; 482 481 483 482 if (!lut || !tests)
+1 -2
include/drm/drm_color_mgmt.h
··· 96 96 DRM_COLOR_LUT_NON_DECREASING = BIT(1), 97 97 }; 98 98 99 - int drm_color_lut_check(struct drm_property_blob *lut, 100 - uint32_t tests); 99 + int drm_color_lut_check(const struct drm_property_blob *lut, u32 tests); 101 100 #endif