[PATCH v2 1/3] drm/bridge: dw-hdmi-i2s: annotate hdmi_read() with __maybe_unused

Jani Nikula jani.nikula at intel.com
Thu Dec 5 15:02:59 UTC 2024


Building with clang and and W=1 leads to warning about unused
hdmi_read(). Fix by annotating it with __maybe_unused.

See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static
inline functions for W=1 build").

Signed-off-by: Jani Nikula <jani.nikula at intel.com>

---

Cc: Andrzej Hajda <andrzej.hajda at intel.com>
Cc: Neil Armstrong <neil.armstrong at linaro.org>
Cc: Robert Foss <rfoss at kernel.org>
Cc: Laurent Pinchart <Laurent.pinchart at ideasonboard.com>
Cc: Jonas Karlman <jonas at kwiboo.se>
Cc: Jernej Skrabec <jernej.skrabec at gmail.com>
Cc: Nathan Chancellor <nathan at kernel.org>
---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c
index 26c187d20d97..4377f9d89a82 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c
@@ -27,7 +27,7 @@ static inline void hdmi_write(struct dw_hdmi_i2s_audio_data *audio,
 	audio->write(hdmi, val, offset);
 }
 
-static inline u8 hdmi_read(struct dw_hdmi_i2s_audio_data *audio, int offset)
+static inline __maybe_unused u8 hdmi_read(struct dw_hdmi_i2s_audio_data *audio, int offset)
 {
 	struct dw_hdmi *hdmi = audio->hdmi;
 
-- 
2.39.5



More information about the Intel-gfx mailing list