* [PATCH] memstick: r592: add function declaration
@ 2016-09-24 5:32 Baoyou Xie
2016-09-24 8:38 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Baoyou Xie @ 2016-09-24 5:32 UTC (permalink / raw)
To: maximlevitsky; +Cc: linux-kernel, arnd, baoyou.xie, xie.baoyou
We get 1 warning when building kernel with W=1:
drivers/memstick/host/r592.c:50:13: warning: no previous prototype for 'memstick_debug_get_tpc_name' [-Wmissing-prototypes]
In fact, this function need be declared in a header files.
So this patch adds function declaration in
drivers/memstick/host/r592.h.
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
drivers/memstick/host/r592.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/memstick/host/r592.h b/drivers/memstick/host/r592.h
index c5726c1..c5d91cd 100644
--- a/drivers/memstick/host/r592.h
+++ b/drivers/memstick/host/r592.h
@@ -172,4 +172,6 @@ struct r592_device {
#define dbg_verbose(format, ...) __dbg(2, format, ## __VA_ARGS__)
#define dbg_reg(format, ...) __dbg(3, format, ## __VA_ARGS__)
+const char *memstick_debug_get_tpc_name(int tpc);
+
#endif
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] memstick: r592: add function declaration
2016-09-24 5:32 [PATCH] memstick: r592: add function declaration Baoyou Xie
@ 2016-09-24 8:38 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2016-09-24 8:38 UTC (permalink / raw)
To: Baoyou Xie; +Cc: maximlevitsky, linux-kernel, xie.baoyou
On Saturday, September 24, 2016 1:32:26 PM CEST Baoyou Xie wrote:
> We get 1 warning when building kernel with W=1:
> drivers/memstick/host/r592.c:50:13: warning: no previous prototype for 'memstick_debug_get_tpc_name' [-Wmissing-prototypes]
>
> In fact, this function need be declared in a header files.
>
> So this patch adds function declaration in
> drivers/memstick/host/r592.h.
>
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
> ---
> drivers/memstick/host/r592.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/memstick/host/r592.h b/drivers/memstick/host/r592.h
> index c5726c1..c5d91cd 100644
> --- a/drivers/memstick/host/r592.h
> +++ b/drivers/memstick/host/r592.h
> @@ -172,4 +172,6 @@ struct r592_device {
> #define dbg_verbose(format, ...) __dbg(2, format, ## __VA_ARGS__)
> #define dbg_reg(format, ...) __dbg(3, format, ## __VA_ARGS__)
>
> +const char *memstick_debug_get_tpc_name(int tpc);
> +
> #endif
>
This looks wrong too. I don't see this function serving any purpose,
despite being exported.
It may be intended to be used by kernel debuggers, but those should
just look up the symbolic value of the enum memstick_tpc
definition instead.
Better just remove the function and the array above it.
Arnd
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-24 8:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-24 5:32 [PATCH] memstick: r592: add function declaration Baoyou Xie
2016-09-24 8:38 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®