linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>,
	Alex Dubov <oakad@yahoo.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Arnd Bergmann <arnd@arndb.de>, Zheng Wang <zyytlz.wz@163.com>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] memstick r592: make memstick_debug_get_tpc_name() static
Date: Wed, 24 May 2023 15:10:55 +0200	[thread overview]
Message-ID: <CAPDyKFp0=a+cuZRDLkh-4Z7R0=zrJ4C6h7LL++KKZ6TDBeKzCA@mail.gmail.com> (raw)
In-Reply-To: <20230516202714.560929-1-arnd@kernel.org>

On Tue, 16 May 2023 at 22:27, Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> There are no other files referencing this function, apparently
> it was left global to avoid an 'unused function' warning when
> the only caller is left out. With a 'W=1' build, it causes
> a 'missing prototype' warning though:
>
> drivers/memstick/host/r592.c:47:13: error: no previous prototype for 'memstick_debug_get_tpc_name' [-Werror=missing-prototypes]
>
> Annotate the function as 'static __maybe_unused' to avoid both
> problems.
>
> Fixes: 926341250102 ("memstick: add driver for Ricoh R5C592 card reader")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/memstick/host/r592.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/memstick/host/r592.c b/drivers/memstick/host/r592.c
> index 42bfc46842b8..461f5ffd02bc 100644
> --- a/drivers/memstick/host/r592.c
> +++ b/drivers/memstick/host/r592.c
> @@ -44,12 +44,10 @@ static const char *tpc_names[] = {
>   * memstick_debug_get_tpc_name - debug helper that returns string for
>   * a TPC number
>   */
> -const char *memstick_debug_get_tpc_name(int tpc)
> +static __maybe_unused const char *memstick_debug_get_tpc_name(int tpc)
>  {
>         return tpc_names[tpc-1];
>  }
> -EXPORT_SYMBOL(memstick_debug_get_tpc_name);
> -
>
>  /* Read a register*/
>  static inline u32 r592_read_reg(struct r592_device *dev, int address)
> --
> 2.39.2
>

      reply	other threads:[~2023-05-24 13:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16 20:27 [PATCH] memstick r592: make memstick_debug_get_tpc_name() static Arnd Bergmann
2023-05-24 13:10 ` Ulf Hansson [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='CAPDyKFp0=a+cuZRDLkh-4Z7R0=zrJ4C6h7LL++KKZ6TDBeKzCA@mail.gmail.com' \
    --to=ulf.hansson@linaro.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=maximlevitsky@gmail.com \
    --cc=oakad@yahoo.com \
    --cc=zyytlz.wz@163.com \
    /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;
as well as URLs for NNTP newsgroup(s).