[PATCH 6/8] drm/meson: dw-hdmi: annotate dw_hdmi_dwc_write_bits() with __maybe_unused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Building with clang and and W=1 leads to warning about unused
dw_hdmi_dwc_write_bits(). 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@xxxxxxxxx>

---

Cc: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
Cc: linux-amlogic@xxxxxxxxxxxxxxxxxxx
Cc: Nathan Chancellor <nathan@xxxxxxxxxx>
---
 drivers/gpu/drm/meson/meson_dw_hdmi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
index 5565f7777529..8d99d70a36e3 100644
--- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
+++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
@@ -273,10 +273,10 @@ static inline void dw_hdmi_g12a_dwc_write(struct meson_dw_hdmi *dw_hdmi,
 }
 
 /* Helper to change specific bits in controller registers */
-static inline void dw_hdmi_dwc_write_bits(struct meson_dw_hdmi *dw_hdmi,
-					  unsigned int addr,
-					  unsigned int mask,
-					  unsigned int val)
+static inline __maybe_unused void dw_hdmi_dwc_write_bits(struct meson_dw_hdmi *dw_hdmi,
+							 unsigned int addr,
+							 unsigned int mask,
+							 unsigned int val)
 {
 	unsigned int data = dw_hdmi->data->dwc_read(dw_hdmi, addr);
 
-- 
2.39.2




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux