From 8b3a70058bfe711b2d05ba2134178bae623183ce Mon Sep 17 00:00:00 2001 From: Kris Katterjohn Date: Wed, 11 Jan 2006 15:56:43 -0800 Subject: [NET]: Remove more unneeded typecasts on *malloc() This removes more unneeded casts on the return value for kmalloc(), sock_kmalloc(), and vmalloc(). Signed-off-by: Kris Katterjohn Acked-by: James Morris Signed-off-by: David S. Miller --- net/sunrpc/auth.c | 2 +- net/sunrpc/auth_unix.c | 2 +- net/sunrpc/clnt.c | 4 ++-- net/sunrpc/svc.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'net/sunrpc') diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index 8c7756036e9..9ac1b8c26c0 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c @@ -94,7 +94,7 @@ rpcauth_init_credcache(struct rpc_auth *auth, unsigned long expire) struct rpc_cred_cache *new; int i; - new = (struct rpc_cred_cache *)kmalloc(sizeof(*new), GFP_KERNEL); + new = kmalloc(sizeof(*new), GFP_KERNEL); if (!new) return -ENOMEM; for (i = 0; i < RPC_CREDCACHE_NR; i++) diff --git a/net/sunrpc/auth_unix.c b/net/sunrpc/auth_unix.c index 890fb5ea0dc..1b3ed4fd198 100644 --- a/net/sunrpc/auth_unix.c +++ b/net/sunrpc/auth_unix.c @@ -70,7 +70,7 @@ unx_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags) dprintk("RPC: allocating UNIX cred for uid %d gid %d\n", acred->uid, acred->gid); - if (!(cred = (struct unx_cred *) kmalloc(sizeof(*cred), GFP_KERNEL))) + if (!(cred = kmalloc(sizeof(*cred), GFP_KERNEL))) return ERR_PTR(-ENOMEM); atomic_set(&cred->uc_count, 1); diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 4cef7fa2b74..d2f0550c4ba 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -118,7 +118,7 @@ rpc_new_client(struct rpc_xprt *xprt, char *servname, goto out_err; err = -ENOMEM; - clnt = (struct rpc_clnt *) kmalloc(sizeof(*clnt), GFP_KERNEL); + clnt = kmalloc(sizeof(*clnt), GFP_KERNEL); if (!clnt) goto out_err; memset(clnt, 0, sizeof(*clnt)); @@ -225,7 +225,7 @@ rpc_clone_client(struct rpc_clnt *clnt) { struct rpc_clnt *new; - new = (struct rpc_clnt *)kmalloc(sizeof(*new), GFP_KERNEL); + new = kmalloc(sizeof(*new), GFP_KERNEL); if (!new) goto out_no_clnt; memcpy(new, clnt, sizeof(*new)); diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index a8bd34d4742..b08419e1fc6 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -32,7 +32,7 @@ svc_create(struct svc_program *prog, unsigned int bufsize) int vers; unsigned int xdrsize; - if (!(serv = (struct svc_serv *) kmalloc(sizeof(*serv), GFP_KERNEL))) + if (!(serv = kmalloc(sizeof(*serv), GFP_KERNEL))) return NULL; memset(serv, 0, sizeof(*serv)); serv->sv_name = prog->pg_name; -- cgit v1.2.3