diff mbox series

[5/8] drm/imagination: annotate pvr_fw_version_packed() with __maybe_unused

Message ID 190e4eefef6c5e62052a01af0084c69361e216ef.1725962479.git.jani.nikula@intel.com (mailing list archive)
State New, archived
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
pvr_fw_version_packed(). 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: Frank Binns <frank.binns@imgtec.com>
Cc: Matt Coster <matt.coster@imgtec.com>
Cc: Nathan Chancellor <nathan@kernel.org>
---
 drivers/gpu/drm/imagination/pvr_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Matt Coster Sept. 10, 2024, 10:40 a.m. UTC | #1
On 10/09/2024 11:03, Jani Nikula wrote:
> Building with clang and and W=1 leads to warning about unused
> pvr_fw_version_packed(). 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've been meaning to do something about this for a while, thanks!

Reviewed-by: Matt Coster <matt.coster@imgtec.com>

Cheers,
Matt
Jani Nikula Sept. 13, 2024, 11:47 a.m. UTC | #2
On Tue, 10 Sep 2024, Matt Coster <Matt.Coster@imgtec.com> wrote:
> On 10/09/2024 11:03, Jani Nikula wrote:
>> Building with clang and and W=1 leads to warning about unused
>> pvr_fw_version_packed(). 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've been meaning to do something about this for a while, thanks!
>
> Reviewed-by: Matt Coster <matt.coster@imgtec.com>

Thanks, pushed to drm-misc-next.

BR,
Jani.
diff mbox series

Patch

diff --git a/drivers/gpu/drm/imagination/pvr_drv.c b/drivers/gpu/drm/imagination/pvr_drv.c
index 1a0cb7aa9cea..684a9b9a2247 100644
--- a/drivers/gpu/drm/imagination/pvr_drv.c
+++ b/drivers/gpu/drm/imagination/pvr_drv.c
@@ -220,7 +220,7 @@  pvr_ioctl_get_bo_mmap_offset(struct drm_device *drm_dev, void *raw_args,
 	return ret;
 }
 
-static __always_inline u64
+static __always_inline __maybe_unused u64
 pvr_fw_version_packed(u32 major, u32 minor)
 {
 	return ((u64)major << 32) | minor;