Thread (23 messages) 23 messages, 2 authors, 2021-05-27

[net-next 12/21] can: mcp251xfd: silence clang warning

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: 2021-05-27 08:48:59
Also in: linux-can
Subsystem: can network drivers, mcp251xfd spi-can network driver, the rest · Maintainers: Marc Kleine-Budde, Vincent Mailhol, Manivannan Sadhasivam, Linus Torvalds

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/spi/mcp251xfd/mcp251xfd-core.c:564:1: warning: unused function 'mcp251xfd_chip_set_mode_nowait' [-Wunused-function]
| mcp251xfd_chip_set_mode_nowait(const struct mcp251xfd_priv *priv,
| ^
| 1 warning generated.

Link: https://lore.kernel.org/r/20210514153741.1958041-3-mkl@pengutronix.de (local)
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
index e0ae00e34c7b..47c3f408a799 100644
--- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
+++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
@@ -560,7 +560,7 @@ mcp251xfd_chip_set_mode(const struct mcp251xfd_priv *priv,
 	return __mcp251xfd_chip_set_mode(priv, mode_req, false);
 }
 
-static inline int
+static inline int __maybe_unused
 mcp251xfd_chip_set_mode_nowait(const struct mcp251xfd_priv *priv,
 			       const u8 mode_req)
 {
-- 
2.30.2

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