Skip to content

Commit

Permalink
can: at91_can: silence clang warning
Browse files Browse the repository at this point in the history
This patch fixes the following clang warning, by marking the functions
as maybe unused. gcc doesn't complain about unused inline functions.

| drivers/net/can/at91_can.c:178:1: warning: unused function 'at91_is_sam9X5' [-Wunused-function]
| AT91_IS(9X5);
| ^
| drivers/net/can/at91_can.c:172:19: note: expanded from macro 'AT91_IS'
| static inline int at91_is_sam##_model(const struct at91_priv *priv) \
|                   ^
| <scratch space>:66:1: note: expanded from here
| at91_is_sam9X5
| ^

Link: https://lore.kernel.org/r/20210514153741.1958041-2-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Marc Kleine-Budde committed May 27, 2021
1 parent b558e20 commit 4318b1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/can/at91_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static const struct can_bittiming_const at91_bittiming_const = {
};

#define AT91_IS(_model) \
static inline int at91_is_sam##_model(const struct at91_priv *priv) \
static inline int __maybe_unused at91_is_sam##_model(const struct at91_priv *priv) \
{ \
return priv->devtype_data.type == AT91_DEVTYPE_SAM##_model; \
}
Expand Down

0 comments on commit 4318b1a

Please sign in to comment.