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

drm/sti/sti_hdmi: Move 'colorspace_mode_names' array to where its used

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

drivers/gpu/drm/sti/sti_hdmi.h:36:40: warning: ‘colorspace_mode_names’ defined but not used [-Wunused-const-variable=]
36 | static const struct drm_prop_enum_list colorspace_mode_names[] = {
| ^~~~~~~~~~~~~~~~~~~~~

Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20201112190039.2785914-28-lee.jones@linaro.org

authored by

Lee Jones and committed by
Sam Ravnborg
e88904bf e232e3d4

+6 -6
+6
drivers/gpu/drm/sti/sti_hdmi.c
··· 167 167 #define to_sti_hdmi_connector(x) \ 168 168 container_of(x, struct sti_hdmi_connector, drm_connector) 169 169 170 + static const struct drm_prop_enum_list colorspace_mode_names[] = { 171 + { HDMI_COLORSPACE_RGB, "rgb" }, 172 + { HDMI_COLORSPACE_YUV422, "yuv422" }, 173 + { HDMI_COLORSPACE_YUV444, "yuv444" }, 174 + }; 175 + 170 176 u32 hdmi_read(struct sti_hdmi *hdmi, int offset) 171 177 { 172 178 return readl(hdmi->regs + offset);
-6
drivers/gpu/drm/sti/sti_hdmi.h
··· 33 33 struct hdmi_audio_infoframe cea; 34 34 }; 35 35 36 - static const struct drm_prop_enum_list colorspace_mode_names[] = { 37 - { HDMI_COLORSPACE_RGB, "rgb" }, 38 - { HDMI_COLORSPACE_YUV422, "yuv422" }, 39 - { HDMI_COLORSPACE_YUV444, "yuv444" }, 40 - }; 41 - 42 36 #define DEFAULT_COLORSPACE_MODE HDMI_COLORSPACE_RGB 43 37 44 38 /**