Skip to contentSkip to conversation

SQUASHME: pnfsd-lexp: Fix compiler warning when CONFIG_SUNRPC_DEBUG is not set

PATCH Applied Boaz Harrosh 2 participants 3 messages May 21, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SQUASHME: pnfsd-lexp: Fix compiler warning when CONFIG_SUNRPC_DEBUG is not set

Fix "Unused variable" warning if CONFIG_SUNRPC_DEBUG is not set

---
git diff --stat -p -M fs/nfsd/nfs4pnfsds.c

 fs/nfsd/nfs4pnfsds.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/nfsd/nfs4pnfsds.c +1 -2
index 2732f20..ab67523 100644
@@ -170,10 +170,9 @@ static int stateid_hashval(stateid_t *stidp)
 	hashval = stateid_hashval(stidp);
 	list_for_each_entry(local, &ds_stid_hashtbl[hashval], ds_hash)
 		if (!memcmp(&local->ds_stid.si_opaque, &stidp->si_opaque, sizeof(stidp->si_opaque))) {
-			stateid_t *sid = &local->ds_stid;
 			dprintk("NFSD: %s <-- %p ds_flags %lx " STATEID_FMT "\n",
 				__func__, local, local->ds_flags,
-				STATEID_VAL(sid));
+				STATEID_VAL(&local->ds_stid));
 			return local;
 		}
 	return NULL;
Applied
#1 lore raw
Quoted 3 lines · Boaz Harrosh

Fix "Unused variable" warning if CONFIG_SUNRPC_DEBUG is not set

Merged, thanks!

Quoted 26 lines

---
git diff --stat -p -M fs/nfsd/nfs4pnfsds.c

 fs/nfsd/nfs4pnfsds.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/nfsd/nfs4pnfsds.c +1 -3
index 2732f20..ab67523 100644
@@ -170,10 +170,9 @@ static int stateid_hashval(stateid_t *stidp)
 	hashval = stateid_hashval(stidp);
 	list_for_each_entry(local, &ds_stid_hashtbl[hashval], ds_hash)
 		if (!memcmp(&local->ds_stid.si_opaque, &stidp->si_opaque, sizeof(stidp->si_opaque))) {
-			stateid_t *sid = &local->ds_stid;
 			dprintk("NFSD: %s <-- %p ds_flags %lx " STATEID_FMT "\n",
 				__func__, local, local->ds_flags,
-				STATEID_VAL(sid));
+				STATEID_VAL(&local->ds_stid));
 			return local;
 		}
 	return NULL;
--

To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 7 lines · Benny Halevy
Quoted 3 lines · Boaz Harrosh

Fix "Unused variable" warning if CONFIG_SUNRPC_DEBUG is not set

Merged, thanks!

Not that I'm at the stage where I don't configure CONFIG_SUNRPC_DEBUG=y It was recently changed and my oldconfig base removed it.

Actually I got lucky, because I would have run without dprints and would have pulled my hair what's going on with my setup.

I wish it would stay to protect me for a while ;-)

Thanks
Boaz