diff mbox series

[3/8] drm/kmb: annotate set_test_mode_src_osc_freq_target_{low, hi}_bits() with __maybe_unused

Message ID 29a83771edd9b85032095ed3ecc1e91a77229b90.1725962479.git.jani.nikula@intel.com (mailing list archive)
State New
Headers show
Series drm: fix and enable warnings on unused static inlines | expand

Commit Message

Jani Nikula Sept. 10, 2024, 10:03 a.m. UTC
Building with clang and and W=1 leads to warning about unused
set_test_mode_src_osc_freq_target_low_bits() and
set_test_mode_src_osc_freq_target_hi_bits(). Fix by annotating them 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: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
Cc: Edmund Dea <edmund.j.dea@intel.com>
Cc: Nathan Chancellor <nathan@kernel.org>
---
 drivers/gpu/drm/kmb/kmb_dsi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Chrisanthus, Anitha Sept. 10, 2024, 6:11 p.m. UTC | #1
Thanks for the patch.

Acked-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com>

Anitha
> -----Original Message-----
> From: Nikula, Jani <jani.nikula@intel.com>
> Sent: Tuesday, September 10, 2024 3:04 AM
> To: dri-devel@lists.freedesktop.org
> Cc: intel-gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org; Nikula, Jani
> <jani.nikula@intel.com>; Nathan Chancellor <nathan@kernel.org>; Chrisanthus,
> Anitha <anitha.chrisanthus@intel.com>; Edmund Dea
> <edmund.j.dea@intel.com>
> Subject: [PATCH 3/8] drm/kmb: annotate
> set_test_mode_src_osc_freq_target_{low,hi}_bits() with __maybe_unused
> 
> Building with clang and and W=1 leads to warning about unused
> set_test_mode_src_osc_freq_target_low_bits() and
> set_test_mode_src_osc_freq_target_hi_bits(). Fix by annotating them 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: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
> Cc: Edmund Dea <edmund.j.dea@intel.com>
> Cc: Nathan Chancellor <nathan@kernel.org>
> ---
>  drivers/gpu/drm/kmb/kmb_dsi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/kmb/kmb_dsi.c b/drivers/gpu/drm/kmb/kmb_dsi.c
> index cf7cf0b07541..faf38ca9e44c 100644
> --- a/drivers/gpu/drm/kmb/kmb_dsi.c
> +++ b/drivers/gpu/drm/kmb/kmb_dsi.c
> @@ -818,7 +818,7 @@ static void test_mode_send(struct kmb_dsi *kmb_dsi,
> u32 dphy_no,
>  	}
>  }
> 
> -static inline void
> +static inline __maybe_unused void
>  	set_test_mode_src_osc_freq_target_low_bits(struct kmb_dsi *kmb_dsi,
>  						   u32 dphy_no,
>  						   u32 freq)
> @@ -830,7 +830,7 @@ static inline void
>  		       (freq & 0x7f));
>  }
> 
> -static inline void
> +static inline __maybe_unused void
>  	set_test_mode_src_osc_freq_target_hi_bits(struct kmb_dsi *kmb_dsi,
>  						  u32 dphy_no,
>  						  u32 freq)
> --
> 2.39.2
Jani Nikula Sept. 13, 2024, 11:46 a.m. UTC | #2
On Tue, 10 Sep 2024, "Chrisanthus, Anitha" <anitha.chrisanthus@intel.com> wrote:
> Thanks for the patch.
>
> Acked-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com>

Thanks, pushed to drm-misc-next.

BR,
Jani.
diff mbox series

Patch

diff --git a/drivers/gpu/drm/kmb/kmb_dsi.c b/drivers/gpu/drm/kmb/kmb_dsi.c
index cf7cf0b07541..faf38ca9e44c 100644
--- a/drivers/gpu/drm/kmb/kmb_dsi.c
+++ b/drivers/gpu/drm/kmb/kmb_dsi.c
@@ -818,7 +818,7 @@  static void test_mode_send(struct kmb_dsi *kmb_dsi, u32 dphy_no,
 	}
 }
 
-static inline void
+static inline __maybe_unused void
 	set_test_mode_src_osc_freq_target_low_bits(struct kmb_dsi *kmb_dsi,
 						   u32 dphy_no,
 						   u32 freq)
@@ -830,7 +830,7 @@  static inline void
 		       (freq & 0x7f));
 }
 
-static inline void
+static inline __maybe_unused void
 	set_test_mode_src_osc_freq_target_hi_bits(struct kmb_dsi *kmb_dsi,
 						  u32 dphy_no,
 						  u32 freq)