Commit ca04cb99 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] knfsd: NFS4XDR get rid of warning

There is a warning because of calling return with an argument on a void
function.  The root cause is putting a return statement in a macro (evil
side effect).

Change ENCODE_SEQID_OP_TAIL to be a more proper macro, change all
calling functions to return void.
parent 26be93ad
...@@ -1116,13 +1116,13 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp) ...@@ -1116,13 +1116,13 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
* where seqids are incremented * where seqids are incremented
*/ */
#define ENCODE_SEQID_OP_TAIL(stateowner) \ #define ENCODE_SEQID_OP_TAIL(stateowner) do { \
BUG_ON(!stateowner); \ BUG_ON(!stateowner); \
if (seqid_mutating_err(nfserr) && stateowner) { \ if (seqid_mutating_err(nfserr) && stateowner) { \
if (stateowner->so_confirmed) \ if (stateowner->so_confirmed) \
stateowner->so_seqid++; \ stateowner->so_seqid++; \
} \ } \
return nfserr; } while(0)
static u32 nfs4_ftypes[16] = { static u32 nfs4_ftypes[16] = {
...@@ -1773,7 +1773,7 @@ nfsd4_encode_open(struct nfsd4_compoundres *resp, int nfserr, struct nfsd4_open ...@@ -1773,7 +1773,7 @@ nfsd4_encode_open(struct nfsd4_compoundres *resp, int nfserr, struct nfsd4_open
ENCODE_SEQID_OP_TAIL(open->op_stateowner); ENCODE_SEQID_OP_TAIL(open->op_stateowner);
} }
static int static void
nfsd4_encode_open_confirm(struct nfsd4_compoundres *resp, int nfserr, struct nfsd4_open_confirm *oc) nfsd4_encode_open_confirm(struct nfsd4_compoundres *resp, int nfserr, struct nfsd4_open_confirm *oc)
{ {
ENCODE_HEAD; ENCODE_HEAD;
...@@ -1788,7 +1788,7 @@ nfsd4_encode_open_confirm(struct nfsd4_compoundres *resp, int nfserr, struct nfs ...@@ -1788,7 +1788,7 @@ nfsd4_encode_open_confirm(struct nfsd4_compoundres *resp, int nfserr, struct nfs
ENCODE_SEQID_OP_TAIL(oc->oc_stateowner); ENCODE_SEQID_OP_TAIL(oc->oc_stateowner);
} }
static int static void
nfsd4_encode_open_downgrade(struct nfsd4_compoundres *resp, int nfserr, struct nfsd4_open_downgrade *od) nfsd4_encode_open_downgrade(struct nfsd4_compoundres *resp, int nfserr, struct nfsd4_open_downgrade *od)
{ {
ENCODE_HEAD; ENCODE_HEAD;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment