mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
* [PATCH 6/8] drm/meson: dw-hdmi: annotate dw_hdmi_dwc_write_bits() with __maybe_unused
       [not found] <cover.1725962479.git.jani.nikula@intel.com>
@ 2024-09-10 10:03 ` Jani Nikula
  2024-09-15 19:35   ` Martin Blumenstingl
  0 siblings, 1 reply; 3+ messages in thread
From: Jani Nikula @ 2024-09-10 10:03 UTC (permalink / raw)
  To: dri-devel
  Cc: intel-gfx, intel-xe, jani.nikula, Nathan Chancellor,
	Neil Armstrong, linux-amlogic

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(-)

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


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 6/8] drm/meson: dw-hdmi: annotate dw_hdmi_dwc_write_bits() with __maybe_unused
  2024-09-10 10:03 ` [PATCH 6/8] drm/meson: dw-hdmi: annotate dw_hdmi_dwc_write_bits() with __maybe_unused Jani Nikula
@ 2024-09-15 19:35   ` Martin Blumenstingl
  2024-09-16  7:43     ` Jani Nikula
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Blumenstingl @ 2024-09-15 19:35 UTC (permalink / raw)
  To: Jani Nikula
  Cc: dri-devel, intel-gfx, intel-xe, Nathan Chancellor,
	Neil Armstrong, linux-amlogic

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/

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 6/8] drm/meson: dw-hdmi: annotate dw_hdmi_dwc_write_bits() with __maybe_unused
  2024-09-15 19:35   ` Martin Blumenstingl
@ 2024-09-16  7:43     ` Jani Nikula
  0 siblings, 0 replies; 3+ messages in thread
From: Jani Nikula @ 2024-09-16  7:43 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: dri-devel, intel-gfx, intel-xe, Nathan Chancellor,
	Neil Armstrong, linux-amlogic

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/

-- 
Jani Nikula, Intel

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-16  7:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1725962479.git.jani.nikula@intel.com>
2024-09-10 10:03 ` [PATCH 6/8] drm/meson: dw-hdmi: annotate dw_hdmi_dwc_write_bits() with __maybe_unused Jani Nikula
2024-09-15 19:35   ` Martin Blumenstingl
2024-09-16  7:43     ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome