net: wan: framer: Add missing static inline qualifiers
Subsystems (4)
Herve Codina
maintainerPATCH 1/1 net: wan: framer: Add missing static inline qualifiers
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.
---
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(-)
include/linux/framer/framer.h +2 -2
@@ -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) { }
Signature · 1 line
2.44.0
Quoted 10 lines · Herve Codina
Compilation with
CONFIG_GENERIC_FRAMERdisabled 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 | voidframer_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 | voidframer_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]
Quoted 1 line
Add missing 'static inline' qualifiers for these functions.
Code wise looks good,
Signature · 2 lines
With Best Regards, Andy Shevchenko
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:
Quoted 11 lines · On Mon, 25 Mar 2024 09:25:05 +0100 you wrote:
Compilation with
CONFIG_GENERIC_FRAMERdisabled 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 | voidframer_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 | voidframer_put(struct device *dev, struct framer *framer)
Quoted 1 line
[...]
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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html