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

drm/plane: Use consistent data types for format count

Rather than a mix of the the sized uint32_t and signed integer, use an
unsized unsigned int to specify the format count.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

authored by

Thierry Reding and committed by
Daniel Vetter
45e3743a 798ae0f6

+7 -7
+2 -2
drivers/gpu/drm/drm_crtc.c
··· 1151 1151 int drm_universal_plane_init(struct drm_device *dev, struct drm_plane *plane, 1152 1152 unsigned long possible_crtcs, 1153 1153 const struct drm_plane_funcs *funcs, 1154 - const uint32_t *formats, uint32_t format_count, 1154 + const uint32_t *formats, unsigned int format_count, 1155 1155 enum drm_plane_type type) 1156 1156 { 1157 1157 struct drm_mode_config *config = &dev->mode_config; ··· 1225 1225 int drm_plane_init(struct drm_device *dev, struct drm_plane *plane, 1226 1226 unsigned long possible_crtcs, 1227 1227 const struct drm_plane_funcs *funcs, 1228 - const uint32_t *formats, uint32_t format_count, 1228 + const uint32_t *formats, unsigned int format_count, 1229 1229 bool is_primary) 1230 1230 { 1231 1231 enum drm_plane_type type;
+1 -1
drivers/gpu/drm/i915/intel_display.c
··· 13681 13681 struct intel_plane *primary; 13682 13682 struct intel_plane_state *state; 13683 13683 const uint32_t *intel_primary_formats; 13684 - int num_formats; 13684 + unsigned int num_formats; 13685 13685 13686 13686 primary = kzalloc(sizeof(*primary), GFP_KERNEL); 13687 13687 if (primary == NULL)
+1 -1
drivers/gpu/drm/nouveau/dispnv04/overlay.c
··· 261 261 { 262 262 struct nouveau_drm *drm = nouveau_drm(device); 263 263 struct nouveau_plane *plane = kzalloc(sizeof(struct nouveau_plane), GFP_KERNEL); 264 - int num_formats = ARRAY_SIZE(formats); 264 + unsigned int num_formats = ARRAY_SIZE(formats); 265 265 int ret; 266 266 267 267 if (!plane)
+3 -3
include/drm/drm_crtc.h
··· 865 865 866 866 uint32_t possible_crtcs; 867 867 uint32_t *format_types; 868 - uint32_t format_count; 868 + unsigned int format_count; 869 869 bool format_default; 870 870 871 871 struct drm_crtc *crtc; ··· 1270 1270 unsigned long possible_crtcs, 1271 1271 const struct drm_plane_funcs *funcs, 1272 1272 const uint32_t *formats, 1273 - uint32_t format_count, 1273 + unsigned int format_count, 1274 1274 enum drm_plane_type type); 1275 1275 extern int drm_plane_init(struct drm_device *dev, 1276 1276 struct drm_plane *plane, 1277 1277 unsigned long possible_crtcs, 1278 1278 const struct drm_plane_funcs *funcs, 1279 - const uint32_t *formats, uint32_t format_count, 1279 + const uint32_t *formats, unsigned int format_count, 1280 1280 bool is_primary); 1281 1281 extern void drm_plane_cleanup(struct drm_plane *plane); 1282 1282 extern unsigned int drm_plane_index(struct drm_plane *plane);