Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/nouveau/nouveau_display.c: In function 
‘nouveau_framebuffer_new’:
 drivers/gpu/drm/nouveau/nouveau_display.c:309:15: warning: variable ‘width’ 
set but not used [-Wunused-but-set-variable]

Cc: Ben Skeggs <bske...@redhat.com>
Cc: David Airlie <airl...@linux.ie>
Cc: Daniel Vetter <dan...@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jo...@linaro.org>
---
 drivers/gpu/drm/nouveau/nouveau_display.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c 
b/drivers/gpu/drm/nouveau/nouveau_display.c
index bceb48a2dfca6..b76bba4ca0856 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -306,7 +306,7 @@ nouveau_framebuffer_new(struct drm_device *dev,
        struct nouveau_bo *nvbo = nouveau_gem_object(gem);
        struct drm_framebuffer *fb;
        const struct drm_format_info *info;
-       unsigned int width, height, i;
+       unsigned int height, i;
        uint32_t tile_mode;
        uint8_t kind;
        int ret;
@@ -346,9 +346,9 @@ nouveau_framebuffer_new(struct drm_device *dev,
        info = drm_get_format_info(dev, mode_cmd);
 
        for (i = 0; i < info->num_planes; i++) {
-               width = drm_format_info_plane_width(info,
-                                                   mode_cmd->width,
-                                                   i);
+               drm_format_info_plane_width(info,
+                                           mode_cmd->width,
+                                           i);
                height = drm_format_info_plane_height(info,
                                                      mode_cmd->height,
                                                      i);
-- 
2.25.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to