lkml.org 
[lkml]   [2008]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] autofs4: fix sparse warning in root.c
From
Date

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);



\
 
 \ /
  Last update: 2008-02-16 03:51    [W:0.041 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site