Message ID | fdc82abdabed667fc85d278cfb03d19e5c472d7b.1725962479.git.jani.nikula@intel.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Neil Armstrong |
Headers | show |
Series | None | expand |
Hi Jani, On Tue, Sep 10, 2024 at 12:08 PM Jani Nikula <jani.nikula@intel.com> wrote: > > 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@intel.com> I prefer dropping this function for which there's a patch already: [0] [0] https://lore.kernel.org/linux-amlogic/20240908-regmap-config-const-v1-1-28f349004811@linaro.org/
On Sun, 15 Sep 2024, Martin Blumenstingl <martin.blumenstingl@googlemail.com> wrote: > Hi Jani, > > On Tue, Sep 10, 2024 at 12:08 PM Jani Nikula <jani.nikula@intel.com> wrote: >> >> 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@intel.com> > I prefer dropping this function for which there's a patch already: [0] Even better, thanks! BR, Jani. > > > [0] https://lore.kernel.org/linux-amlogic/20240908-regmap-config-const-v1-1-28f349004811@linaro.org/
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);
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@intel.com> --- Cc: Neil Armstrong <neil.armstrong@linaro.org> Cc: linux-amlogic@lists.infradead.org Cc: Nathan Chancellor <nathan@kernel.org> --- drivers/gpu/drm/meson/meson_dw_hdmi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)