Thread (9 messages) 9 messages, 4 authors, 2020-08-31

Re: [PATCH 08/30] net: wireless: ath: carl9170: Mark 'ar9170_qmap' as __maybe_unused

From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Date: 2020-08-17 08:27:37
Also in: linux-wireless, lkml

Possibly related (same subject, not in this thread)

On 14/08/2020 17.14, Christian Lamparter wrote:
On 2020-08-14 13:39, Lee Jones wrote:
quoted
'ar9170_qmap' is used in some source files which include carl9170.h,
but not all of them.  Mark it as __maybe_unused to show that this is
not only okay, it's expected.

Fixes the following W=1 kernel build warning(s)
Is this W=1 really a "must" requirement? I find it strange having
__maybe_unused in header files as this "suggests" that the
definition is redundant.
In this case it seems one could replace the table lookup with a

static inline u8 ar9170_qmap(u8 idx) { return 3 - idx; }

gcc doesn't warn about unused static inline functions (or one would have
a million warnings to deal with). Just my $0.02.

Rasmus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help