* [PATCH] net: wan: framer: Add missing static inline qualifiers
@ 2024-03-25 8:25 Herve Codina
2024-03-25 9:23 ` Andy Shevchenko
2024-03-27 10:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Herve Codina @ 2024-03-25 8:25 UTC (permalink / raw
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Linus Walleij, Herve Codina, Christophe Leroy
Cc: netdev, linux-kernel, Andy Shevchenko, Thomas Petazzoni,
kernel test robot, stable
Compilation with CONFIG_GENERIC_FRAMER disabled lead to the following
warnings:
framer.h:184:16: warning: no previous prototype for function 'framer_get' [-Wmissing-prototypes]
184 | struct framer *framer_get(struct device *dev, const char *con_id)
framer.h:184:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
184 | struct framer *framer_get(struct device *dev, const char *con_id)
framer.h:189:6: warning: no previous prototype for function 'framer_put' [-Wmissing-prototypes]
189 | void framer_put(struct device *dev, struct framer *framer)
framer.h:189:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
189 | void framer_put(struct device *dev, struct framer *framer)
Add missing 'static inline' qualifiers for these functions.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202403241110.hfJqeJRu-lkp@intel.com/
Fixes: 82c944d05b1a ("net: wan: Add framer framework support")
Cc: stable@vger.kernel.org
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
The error raised by the kernel test robot is already fixed by the
commit badc9e33c795 ("net: wan: fsl_qmc_hdlc: Fix module compilation")
include/linux/framer/framer.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/framer/framer.h b/include/linux/framer/framer.h
index 9a9b88962c29..2b85fe9e7f9a 100644
--- a/include/linux/framer/framer.h
+++ b/include/linux/framer/framer.h
@@ -181,12 +181,12 @@ static inline int framer_notifier_unregister(struct framer *framer,
return -ENOSYS;
}
-struct framer *framer_get(struct device *dev, const char *con_id)
+static inline struct framer *framer_get(struct device *dev, const char *con_id)
{
return ERR_PTR(-ENOSYS);
}
-void framer_put(struct device *dev, struct framer *framer)
+static inline void framer_put(struct device *dev, struct framer *framer)
{
}
--
2.44.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: wan: framer: Add missing static inline qualifiers
2024-03-25 8:25 [PATCH] net: wan: framer: Add missing static inline qualifiers Herve Codina
@ 2024-03-25 9:23 ` Andy Shevchenko
2024-03-27 10:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2024-03-25 9:23 UTC (permalink / raw
To: Herve Codina
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Linus Walleij, Christophe Leroy, netdev, linux-kernel,
Thomas Petazzoni, kernel test robot, stable
On Mon, Mar 25, 2024 at 09:25:05AM +0100, Herve Codina wrote:
> Compilation with CONFIG_GENERIC_FRAMER disabled lead to the following
> warnings:
> framer.h:184:16: warning: no previous prototype for function 'framer_get' [-Wmissing-prototypes]
> 184 | struct framer *framer_get(struct device *dev, const char *con_id)
> framer.h:184:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> 184 | struct framer *framer_get(struct device *dev, const char *con_id)
> framer.h:189:6: warning: no previous prototype for function 'framer_put' [-Wmissing-prototypes]
> 189 | void framer_put(struct device *dev, struct framer *framer)
> framer.h:189:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> 189 | void framer_put(struct device *dev, struct framer *framer)
Always try to minimize the warnings/backtraces/etc to the point. In this case
it's enough to have:
warning: no previous prototype for function 'framer_get' [-Wmissing-prototypes]
warning: no previous prototype for function 'framer_put' [-Wmissing-prototypes]
> Add missing 'static inline' qualifiers for these functions.
Code wise looks good,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: wan: framer: Add missing static inline qualifiers
2024-03-25 8:25 [PATCH] net: wan: framer: Add missing static inline qualifiers Herve Codina
2024-03-25 9:23 ` Andy Shevchenko
@ 2024-03-27 10:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-03-27 10:30 UTC (permalink / raw
To: Herve Codina
Cc: davem, edumazet, kuba, pabeni, linus.walleij, christophe.leroy,
netdev, linux-kernel, andriy.shevchenko, thomas.petazzoni, lkp,
stable
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Mon, 25 Mar 2024 09:25:05 +0100 you wrote:
> Compilation with CONFIG_GENERIC_FRAMER disabled lead to the following
> warnings:
> framer.h:184:16: warning: no previous prototype for function 'framer_get' [-Wmissing-prototypes]
> 184 | struct framer *framer_get(struct device *dev, const char *con_id)
> framer.h:184:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> 184 | struct framer *framer_get(struct device *dev, const char *con_id)
> framer.h:189:6: warning: no previous prototype for function 'framer_put' [-Wmissing-prototypes]
> 189 | void framer_put(struct device *dev, struct framer *framer)
> framer.h:189:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> 189 | void framer_put(struct device *dev, struct framer *framer)
>
> [...]
Here is the summary with links:
- net: wan: framer: Add missing static inline qualifiers
https://git.kernel.org/netdev/net/c/ea2c09283b44
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-27 10:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-25 8:25 [PATCH] net: wan: framer: Add missing static inline qualifiers Herve Codina
2024-03-25 9:23 ` Andy Shevchenko
2024-03-27 10:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).