drm/plane: Use consistent data types for format count
authorThierry Reding <treding@nvidia.com>
Wed, 12 Aug 2015 14:54:28 +0000 (16:54 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 12 Aug 2015 15:14:24 +0000 (17:14 +0200)
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>
drivers/gpu/drm/drm_crtc.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/nouveau/dispnv04/overlay.c
include/drm/drm_crtc.h

index 7d02e32b4e94555074021f50ce5eaace9aa3d6fe..21f1f5ce2d6006657051a418b9cb756c5307b350 100644 (file)
@@ -1151,7 +1151,7 @@ EXPORT_SYMBOL(drm_encoder_cleanup);
 int drm_universal_plane_init(struct drm_device *dev, struct drm_plane *plane,
                             unsigned long possible_crtcs,
                             const struct drm_plane_funcs *funcs,
-                            const uint32_t *formats, uint32_t format_count,
+                            const uint32_t *formats, unsigned int format_count,
                             enum drm_plane_type type)
 {
        struct drm_mode_config *config = &dev->mode_config;
@@ -1225,7 +1225,7 @@ EXPORT_SYMBOL(drm_universal_plane_init);
 int drm_plane_init(struct drm_device *dev, struct drm_plane *plane,
                   unsigned long possible_crtcs,
                   const struct drm_plane_funcs *funcs,
-                  const uint32_t *formats, uint32_t format_count,
+                  const uint32_t *formats, unsigned int format_count,
                   bool is_primary)
 {
        enum drm_plane_type type;
index 97ec61c842edce4b0a73cd1d6dfc18ed896cf773..0a1d4a5d152d9f58b6af16c37dd8c873f8a20869 100644 (file)
@@ -13681,7 +13681,7 @@ static struct drm_plane *intel_primary_plane_create(struct drm_device *dev,
        struct intel_plane *primary;
        struct intel_plane_state *state;
        const uint32_t *intel_primary_formats;
-       int num_formats;
+       unsigned int num_formats;
 
        primary = kzalloc(sizeof(*primary), GFP_KERNEL);
        if (primary == NULL)
index 9f2498571d0953801e30108e439a473b4afff71c..5f6ea1873f517d1bbf357690b9fa817427ce91f1 100644 (file)
@@ -261,7 +261,7 @@ nv10_overlay_init(struct drm_device *device)
 {
        struct nouveau_drm *drm = nouveau_drm(device);
        struct nouveau_plane *plane = kzalloc(sizeof(struct nouveau_plane), GFP_KERNEL);
-       int num_formats = ARRAY_SIZE(formats);
+       unsigned int num_formats = ARRAY_SIZE(formats);
        int ret;
 
        if (!plane)
index 5746569651263dc938b9ee7abeede90ce48ea301..6e5afc30b59672b8a2f6c6b5e0256bd8be04593d 100644 (file)
@@ -865,7 +865,7 @@ struct drm_plane {
 
        uint32_t possible_crtcs;
        uint32_t *format_types;
-       uint32_t format_count;
+       unsigned int format_count;
        bool format_default;
 
        struct drm_crtc *crtc;
@@ -1270,13 +1270,13 @@ extern int drm_universal_plane_init(struct drm_device *dev,
                                    unsigned long possible_crtcs,
                                    const struct drm_plane_funcs *funcs,
                                    const uint32_t *formats,
-                                   uint32_t format_count,
+                                   unsigned int format_count,
                                    enum drm_plane_type type);
 extern int drm_plane_init(struct drm_device *dev,
                          struct drm_plane *plane,
                          unsigned long possible_crtcs,
                          const struct drm_plane_funcs *funcs,
-                         const uint32_t *formats, uint32_t format_count,
+                         const uint32_t *formats, unsigned int format_count,
                          bool is_primary);
 extern void drm_plane_cleanup(struct drm_plane *plane);
 extern unsigned int drm_plane_index(struct drm_plane *plane);