From: J. Bruce Fields Date: Fri, 8 Feb 2008 04:10:21 +0000 (-0500) Subject: nfsd: clean up svc_reserve_auth() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fbb7878c1a2ee40a1e983bf20f3dd3a80255dcf2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git nfsd: clean up svc_reserve_auth() This is a void function attempting to return the return value from another void function, which seems harmless but extremely weird, and apparently makes some compilers complain. While we're there, clean up a little (e.g. the switch statement had a minor style problem and seemed overkill as long as there's only one case). Thanks to Trond for noticing this. Signed-off-by: J. Bruce Fields Cc: Trond Myklebust --- diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 64c771056187..64c97552964a 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h @@ -409,16 +409,13 @@ char * svc_print_addr(struct svc_rqst *, char *, size_t); * for all cases without actually generating the checksum, so we just use a * static value. */ -static inline void -svc_reserve_auth(struct svc_rqst *rqstp, int space) +static inline void svc_reserve_auth(struct svc_rqst *rqstp, int space) { - int added_space = 0; + int added_space = 0; - switch(rqstp->rq_authop->flavour) { - case RPC_AUTH_GSS: - added_space = RPC_MAX_AUTH_SIZE; - } - return svc_reserve(rqstp, space + added_space); + if (rqstp->rq_authop->flavour) + added_space = RPC_MAX_AUTH_SIZE; + svc_reserve(rqstp, space + added_space); } #endif /* SUNRPC_SVC_H */