[PATCH 07/40] drm/vmwgfx/vmwgfx_kms: Mark vmw_{cursor, primary}_plane_formats as __maybe_unused

Lee Jones lee.jones at linaro.org
Fri Jan 15 18:12:40 UTC 2021


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

 drivers/gpu/drm/vmwgfx/vmwgfx_kms.h:256:23: warning: ‘vmw_cursor_plane_formats’ defined but not used [-Wunused-const-variable=]
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.h:248:23: warning: ‘vmw_primary_plane_formats’ defined but not used [-Wunused-const-variable=]
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.h:256:23: warning: ‘vmw_cursor_plane_formats’ defined but not used [-Wunused-const-variable=]
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.h:248:23: warning: ‘vmw_primary_plane_formats’ defined but not used [-Wunused-const-variable=]
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.h:256:23: warning: ‘vmw_cursor_plane_formats’ defined but not used [-Wunused-const-variable=]
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.h:248:23: warning: ‘vmw_primary_plane_formats’ defined but not used [-Wunused-const-variable=]

Cc: VMware Graphics <linux-graphics-maintainer at vmware.com>
Cc: Roland Scheidegger <sroland at vmware.com>
Cc: David Airlie <airlied at linux.ie>
Cc: Daniel Vetter <daniel at ffwll.ch>
Cc: dri-devel at lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones at linaro.org>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
index 03f3694015cec..6267ccf54944e 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
@@ -245,7 +245,7 @@ struct vmw_framebuffer_bo {
 };
 
 
-static const uint32_t vmw_primary_plane_formats[] = {
+static const uint32_t __maybe_unused vmw_primary_plane_formats[] = {
 	DRM_FORMAT_XRGB1555,
 	DRM_FORMAT_RGB565,
 	DRM_FORMAT_RGB888,
@@ -253,7 +253,7 @@ static const uint32_t vmw_primary_plane_formats[] = {
 	DRM_FORMAT_ARGB8888,
 };
 
-static const uint32_t vmw_cursor_plane_formats[] = {
+static const uint32_t __maybe_unused vmw_cursor_plane_formats[] = {
 	DRM_FORMAT_ARGB8888,
 };
 
-- 
2.25.1



More information about the dri-devel mailing list