Skip to contentSkip to conversation

nfsd: fix a warning message

PATCH In review Dan Carpenter 3 participants 3 messages Nov 21, 2015 – Nov 23, 2015

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

PATCH 1/1 nfsd: fix a warning message

The WARN() macro takes a condition and a format string. The condition was accidentally left out here so it just prints the function name instead of the message.

fs/nfsd/nfs4state.c +2 -1
index 6b800b5..7af023f 100644
@@ -2240,7 +2240,8 @@ nfsd4_store_cache_entry(struct nfsd4_compoundres *resp)
 	base = resp->cstate.data_offset;
 	slot->sl_datalen = buf->len - base;
 	if (read_bytes_from_xdr_buf(buf, base, slot->sl_data, slot->sl_datalen))
-		WARN("%s: sessions DRC could not cache compound\n", __func__);
+		WARN(1, "%s: sessions DRC could not cache compound\n",
+		     __func__);
 	return;
 }
 
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · On Sat, 21 Nov 2015 13:28:50 +0300 Dan Carpenter <[email protected]>…

The WARN() macro takes a condition and a format string. The condition was accidentally left out here so it just prints the function name instead of the message.

fs/nfsd/nfs4state.c +0 -0
index 6b800b5..7af023f 100644

fs/nfsd/nfs4state.c nfsd4_store_cache_entry(struct nfsd4_compoundres *resp) · line 2247

Quoted 9 lines
fs/nfsd/nfs4state.c +2 -1
@@ -2240,7 +2240,8 @@ nfsd4_store_cache_entry(struct nfsd4_compoundres *resp)
 	base = resp->cstate.data_offset;
 	slot->sl_datalen = buf->len - base;
 	if (read_bytes_from_xdr_buf(buf, base, slot->sl_data, slot->sl_datalen))
-		WARN("%s: sessions DRC could not cache compound\n", __func__);
+		WARN(1, "%s: sessions DRC could not cache compound\n",
+		     __func__);
 	return;
 }
 
#2 lore raw
Quoted 2 lines · Jeff Layton

On Sat, 21 Nov 2015 13:28:50 +0300
Dan Carpenter <[email protected]> wrote:

Thanks, applying for 4.5.--b.

Quoted 23 lines
Quoted 12 lines

The WARN() macro takes a condition and a format string. The condition was accidentally left out here so it just prints the function name instead of the message.

fs/nfsd/nfs4state.c +0 -0
index 6b800b5..7af023f 100644

fs/nfsd/nfs4state.c nfsd4_store_cache_entry(struct nfsd4_compoundres *resp) · line 2247

Quoted 9 lines
fs/nfsd/nfs4state.c +2 -1
@@ -2240,7 +2240,8 @@ nfsd4_store_cache_entry(struct nfsd4_compoundres *resp)
 	base = resp->cstate.data_offset;
 	slot->sl_datalen = buf->len - base;
 	if (read_bytes_from_xdr_buf(buf, base, slot->sl_data, slot->sl_datalen))
-		WARN("%s: sessions DRC could not cache compound\n", __func__);
+		WARN(1, "%s: sessions DRC could not cache compound\n",
+		     __func__);
 	return;
 }