mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] autofs4: fix sparse warning in root.c
Date: Sat, 16 Feb 2008 11:47:41 +0900	[thread overview]
Message-ID: <1203130061.3172.8.camel@raven.themaw.net> (raw)
In-Reply-To: <1203126572.7442.13.camel@brick>


On Fri, 2008-02-15 at 17:49 -0800, Harvey Harrison wrote:
> fs/autofs4/root.c:536:23: warning: symbol 'ino' shadows an earlier one
> fs/autofs4/root.c:510:22: originally declared here
> 
> There is no need to redeclare, we are at the end of the loop and in
> the next iteration of the loop, ino will be reset.

Of course, this is fine.

But I like to leave a blank line between declarative and procedural
statements or no blank line at all if it looks natural, usually when
there are only a few lines of code.

Picky I know, but in this case I'd prefer moving the assignment down one
line.

> 
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
> ---
>  fs/autofs4/root.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
> index a54a946..1b43456 100644
> --- a/fs/autofs4/root.c
> +++ b/fs/autofs4/root.c
> @@ -533,8 +533,8 @@ static struct dentry *autofs4_lookup_unhashed(struct autofs_sb_info *sbi, struct
>  			goto next;
>  
>  		if (d_unhashed(dentry)) {
> -			struct autofs_info *ino = autofs4_dentry_ino(dentry);
>  			struct inode *inode = dentry->d_inode;
> +			ino = autofs4_dentry_ino(dentry);
>  
>  			list_del_init(&ino->rehash);
>  			dget(dentry);


  reply	other threads:[~2008-02-16  2:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-16  1:49 Harvey Harrison
2008-02-16  2:47 ` Ian Kent [this message]
2008-02-16  2:51   ` [PATCHv2] " Harvey Harrison
2008-02-16  3:23     ` Ian Kent

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=1203130061.3172.8.camel@raven.themaw.net \
    --to=raven@themaw.net \
    --cc=akpm@linux-foundation.org \
    --cc=harvey.harrison@gmail.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®