[PATCH] fs/ncpfs/dir.c unused variable sb

From: Connor Hansen
Date: Wed Jun 08 2011 - 03:01:05 EST


during randconfig testing,

fs/ncpfs/dir.c: in function ncp_hash_dentry:
fs/nspfs/dir.c:128:23: warning: unused variable sb

pass dentry->d_sb instead of first creating an
unnecessary pointer to it.

Signed-off-by: Connor Hansen <cmdkhh@xxxxxxxxx>
---
fs/ncpfs/dir.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c
index 9c51f62..a8d42af 100644
--- a/fs/ncpfs/dir.c
+++ b/fs/ncpfs/dir.c
@@ -125,12 +125,11 @@ ncp_hash_dentry(const struct dentry *dentry, const struct inode *inode,
struct qstr *this)
{
if (!ncp_case_sensitive(inode)) {
- struct super_block *sb = dentry->d_sb;
struct nls_table *t;
unsigned long hash;
int i;

- t = NCP_IO_TABLE(sb);
+ t = NCP_IO_TABLE(dentry->d_sb);
hash = init_name_hash();
for (i=0; i<this->len ; i++)
hash = partial_name_hash(ncp_tolower(t, this->name[i]),
--
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/