aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ncpfs
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-04-28 05:14:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:29 -0400
commit305787e44ebc21d87ab4d4949da5b97d4252aa9b (patch)
tree47e905126fa2bd76f0992ba22d87d368a0e5eb94 /fs/ncpfs
parentcdf8803768db6f652d498628fe1421a23c025253 (diff)
ncpfs: fix sparse warnings in ioctl.c
In both cases, these inode variables arebeing used to test the server's root inode against NULL. Change them to s_inode. fs/ncpfs/ioctl.c:391:18: warning: symbol 'inode' shadows an earlier one fs/ncpfs/ioctl.c:264:28: originally declared here fs/ncpfs/ioctl.c:441:17: warning: symbol 'inode' shadows an earlier one fs/ncpfs/ioctl.c:264:28: originally declared here In this case, we are about to return anyway, just reuse result. fs/ncpfs/ioctl.c:521:8: warning: symbol 'result' shadows an earlier one fs/ncpfs/ioctl.c:268:6: originally declared here Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Acked-by: Petr Vandrovec <VANDROVE@vc.cvut.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ncpfs')
-rw-r--r--fs/ncpfs/ioctl.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/ncpfs/ioctl.c b/fs/ncpfs/ioctl.c
index ad8f167e54bc..3a97c95e1ca2 100644
--- a/fs/ncpfs/ioctl.c
+++ b/fs/ncpfs/ioctl.c
@@ -389,11 +389,11 @@ static int __ncp_ioctl(struct inode *inode, struct file *filp,
389 struct dentry* dentry = inode->i_sb->s_root; 389 struct dentry* dentry = inode->i_sb->s_root;
390 390
391 if (dentry) { 391 if (dentry) {
392 struct inode* inode = dentry->d_inode; 392 struct inode* s_inode = dentry->d_inode;
393 393
394 if (inode) { 394 if (s_inode) {
395 sr.volNumber = NCP_FINFO(inode)->volNumber; 395 sr.volNumber = NCP_FINFO(s_inode)->volNumber;
396 sr.dirEntNum = NCP_FINFO(inode)->dirEntNum; 396 sr.dirEntNum = NCP_FINFO(s_inode)->dirEntNum;
397 sr.namespace = server->name_space[sr.volNumber]; 397 sr.namespace = server->name_space[sr.volNumber];
398 } else 398 } else
399 DPRINTK("ncpfs: s_root->d_inode==NULL\n"); 399 DPRINTK("ncpfs: s_root->d_inode==NULL\n");
@@ -439,12 +439,12 @@ static int __ncp_ioctl(struct inode *inode, struct file *filp,
439 dentry = inode->i_sb->s_root; 439 dentry = inode->i_sb->s_root;
440 server->root_setuped = 1; 440 server->root_setuped = 1;
441 if (dentry) { 441 if (dentry) {
442 struct inode* inode = dentry->d_inode; 442 struct inode* s_inode = dentry->d_inode;
443 443
444 if (inode) { 444 if (inode) {
445 NCP_FINFO(inode)->volNumber = vnum; 445 NCP_FINFO(s_inode)->volNumber = vnum;
446 NCP_FINFO(inode)->dirEntNum = de; 446 NCP_FINFO(s_inode)->dirEntNum = de;
447 NCP_FINFO(inode)->DosDirNum = dosde; 447 NCP_FINFO(s_inode)->DosDirNum = dosde;
448 } else 448 } else
449 DPRINTK("ncpfs: s_root->d_inode==NULL\n"); 449 DPRINTK("ncpfs: s_root->d_inode==NULL\n");
450 } else 450 } else
@@ -519,7 +519,6 @@ static int __ncp_ioctl(struct inode *inode, struct file *filp,
519 } 519 }
520 { 520 {
521 struct ncp_lock_ioctl rqdata; 521 struct ncp_lock_ioctl rqdata;
522 int result;
523 522
524 if (copy_from_user(&rqdata, argp, sizeof(rqdata))) 523 if (copy_from_user(&rqdata, argp, sizeof(rqdata)))
525 return -EFAULT; 524 return -EFAULT;