From: Tom Rini Date: Thu, 4 Jun 2020 20:05:32 +0000 (-0400) Subject: net: cpsw: Add __maybe_unused to generated inlines X-Git-Tag: v2025.01-rc5-pxa1908~2332^2~12^2~8 X-Git-Url: http://git.dujemihanovic.xyz/%22/icons/right.gif/static/git-favicon.png?a=commitdiff_plain;h=eab48865f93a19e2a196a6c4e3480f16df4027d9;p=u-boot.git net: cpsw: Add __maybe_unused to generated inlines We generate a number of helper inline functions to make accesses easier. However not all permutations of each function will be used and clang will warn about unused ones. Decorate all of them with __maybe_unused because of this. Cc: Lokesh Vutla Signed-off-by: Tom Rini Reviewed-by: Grygorii Strashko --- diff --git a/drivers/net/ti/cpsw.c b/drivers/net/ti/cpsw.c index 95761fffc0..9d4332f450 100644 --- a/drivers/net/ti/cpsw.c +++ b/drivers/net/ti/cpsw.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -247,11 +248,11 @@ static inline void cpsw_ale_set_field(u32 *ale_entry, u32 start, u32 bits, } #define DEFINE_ALE_FIELD(name, start, bits) \ -static inline int cpsw_ale_get_##name(u32 *ale_entry) \ +static inline int __maybe_unused cpsw_ale_get_##name(u32 *ale_entry) \ { \ return cpsw_ale_get_field(ale_entry, start, bits); \ } \ -static inline void cpsw_ale_set_##name(u32 *ale_entry, u32 value) \ +static inline void __maybe_unused cpsw_ale_set_##name(u32 *ale_entry, u32 value) \ { \ cpsw_ale_set_field(ale_entry, start, bits, value); \ }