login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
February
»
15
Re: [PATCH] befs: fix sparse warning in linuxvfs.c
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Andrew Morton <akpm@...>
To: Harvey Harrison <harvey.harrison@...>
Cc: <rathamahata@...>, <linux-kernel@...>
Subject:
Re: [PATCH] befs: fix sparse warning in linuxvfs.c
Date: Friday, February 15, 2008 - 5:19 pm
On Fri, 15 Feb 2008 10:46:04 -0800 Harvey Harrison <harvey.harrison@gmail.com> wrote:
quoted text
> Use link as the variable name to avoid shadowing the arg. > > fs/befs/linuxvfs.c:492:8: warning: symbol 'p' shadows an earlier one > fs/befs/linuxvfs.c:488:77: originally declared here > > Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> > --- > This should be checked in case there is a latent bug here. Should it > be the arg *p getting freed, or the local var *p that was shadowing > it? >
The code looks OK - the name was allocated in befs_follow_link() and was saved away with nd_set_link().
quoted text
> > diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c > index 82123ff..e8717de 100644 > --- a/fs/befs/linuxvfs.c > +++ b/fs/befs/linuxvfs.c > @@ -489,9 +489,9 @@ static void befs_put_link(struct dentry *dentry, struct nameidata *nd, void *p) > { > befs_inode_info *befs_ino = BEFS_I(dentry->d_inode); > if (befs_ino->i_flags & BEFS_LONG_SYMLINK) { > - char *p = nd_get_link(nd); > - if (!IS_ERR(p)) > - kfree(p); > + char *link = nd_get_link(nd); > + if (!IS_ERR(link)) > + kfree(link); > } > } > > -- > 1.5.4.1.1278.gc75be > >
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] befs: fix sparse warning in linuxvfs.c
, Harvey Harrison
, (Fri Feb 15, 2:46 pm)
Re: [PATCH] befs: fix sparse warning in linuxvfs.c
, Andrew Morton
, (Fri Feb 15, 5:19 pm)
Re: [PATCH] befs: fix sparse warning in linuxvfs.c
, Harvey Harrison
, (Fri Feb 15, 5:23 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Benjamin Herrenschmidt
Re: [linux-pm] [PATCH] Remove process freezer from suspend to RAM pathway
Ulrich Drepper
Re: [patch 7/8] fdmap v2 - implement sys_socket2
Washington Odhiambo
Weird Problem with NAT - more details
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
git
:
linux-netdev
:
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
Frans Pop
svc: failed to register lockdv1 RPC service (errno 97).
Jarek Poplawski
[PATCH take 2] pkt_sched: Protect gen estimators under est_lock.
David Miller
Re: [GIT]: Networking
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
4 users
and
577 guests
online.
Online users
ackes
strcmp
aquaracer13
avantiwineref
Syndicate