mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Tushar Behera <tushar.behera@linaro.org>
Cc: linux-kernel@vger.kernel.org, axboe@kernel.dk, patches@linaro.org
Subject: Re: [PATCH] block: Fix sparse warning
Date: Thu, 6 Dec 2012 15:32:27 -0800	[thread overview]
Message-ID: <20121206153227.91a6ec69.akpm@linux-foundation.org> (raw)
In-Reply-To: <1353322840-2881-1-git-send-email-tushar.behera@linaro.org>

On Mon, 19 Nov 2012 16:30:40 +0530
Tushar Behera <tushar.behera@linaro.org> wrote:

> blk_drain_queue is only used in this file, so should be marked static.
> 
> Fixes following sparse warning.
> 
> block/blk-core.c:361:6: warning: symbol 'blk_drain_queue' was not
> declared. Should it be static?
> 
> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
> ---
>  block/blk-core.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/block/blk-core.c b/block/blk-core.c
> index a8b1527..5db63eb 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -358,7 +358,7 @@ EXPORT_SYMBOL(blk_put_queue);
>   * If not, only ELVPRIV requests are drained.  The caller is responsible
>   * for ensuring that no new requests which need to be drained are queued.
>   */
> -void blk_drain_queue(struct request_queue *q, bool drain_all)
> +static void blk_drain_queue(struct request_queue *q, bool drain_all)
>  {
>  	int i;

nit: the objective of this patch is not to reduce the sparse output; it
is to improve the kernel by giving an unnecessarily-global symbol
static scope.

So a better title is one which describes the code fix.  The fact that
sparse happened to detect it is less important.  I chose
"block/blk-core.c: make blk_drain_queue() static".

      reply	other threads:[~2012-12-06 23:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-19 11:00 Tushar Behera
2012-12-06 23:32 ` Andrew Morton [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=20121206153227.91a6ec69.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=tushar.behera@linaro.org \
    /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

Powered by JetHome