mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Baoyou Xie <baoyou.xie@linaro.org>
Cc: maximlevitsky@gmail.com, linux-kernel@vger.kernel.org,
	xie.baoyou@zte.com.cn
Subject: Re: [PATCH] memstick: r592: add function declaration
Date: Sat, 24 Sep 2016 10:38:50 +0200	[thread overview]
Message-ID: <3643004.RcSUHOLt46@wuerfel> (raw)
In-Reply-To: <1474695146-3113-1-git-send-email-baoyou.xie@linaro.org>

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

      reply	other threads:[~2016-09-24  8:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-24  5:32 Baoyou Xie
2016-09-24  8:38 ` Arnd Bergmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3643004.RcSUHOLt46@wuerfel \
    --to=arnd@arndb.de \
    --cc=baoyou.xie@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maximlevitsky@gmail.com \
    --cc=xie.baoyou@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®