Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

SUNRPC: Simplify rpc_alloc_iostats by removing pointless local variable

Hi,

We can simplify net/sunrpc/stats.c::rpc_alloc_iostats() a bit by getting
rid of the unneeded local variable 'new'.

Please CC me on replies.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

authored by

Jesper Juhl and committed by
Trond Myklebust
94f58df8 5685b971

+1 -3
+1 -3
net/sunrpc/stats.c
··· 115 115 */ 116 116 struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) 117 117 { 118 - struct rpc_iostats *new; 119 - new = kcalloc(clnt->cl_maxproc, sizeof(struct rpc_iostats), GFP_KERNEL); 120 - return new; 118 + return kcalloc(clnt->cl_maxproc, sizeof(struct rpc_iostats), GFP_KERNEL); 121 119 } 122 120 EXPORT_SYMBOL_GPL(rpc_alloc_iostats); 123 121