Skip to contentSkip to conversation

fs/ncpfs/dir.c unused variable sb

PATCH New Connor Hansen 1 participant 1 message Jun 8, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/ncpfs/dir.c unused variable sb

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.

---
 fs/ncpfs/dir.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
fs/ncpfs/dir.c +1 -2
index 9c51f62..a8d42af 100644
@@ -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]),
Signature · 1 line
1.7.4.4