mirror of
https://github.com/u-boot/u-boot.git
synced 2024-12-14 23:33:26 +08:00
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 <lokeshvutla@ti.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
This commit is contained in:
parent
2af17e2573
commit
eab48865f9
@ -17,6 +17,7 @@
|
|||||||
#include <cpsw.h>
|
#include <cpsw.h>
|
||||||
#include <dm/device_compat.h>
|
#include <dm/device_compat.h>
|
||||||
#include <linux/bitops.h>
|
#include <linux/bitops.h>
|
||||||
|
#include <linux/compiler.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <asm/gpio.h>
|
#include <asm/gpio.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
@ -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) \
|
#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); \
|
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); \
|
cpsw_ale_set_field(ale_entry, start, bits, value); \
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user