From: Jesper Juhl Date: Tue, 10 Jan 2006 21:08:21 +0000 (-0800) Subject: [NET]: Remove unneeded kmalloc() return value casts X-Git-Tag: v2.6.16-rc1~446^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12fe2c588df77d60dfe13b432f95d00f76b8c969;p=linux-2.6 [NET]: Remove unneeded kmalloc() return value casts Get rid of needless casting of kmalloc() return value in net/ Signed-off-by: Jesper Juhl Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index a31244e588..f812ed129e 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -403,7 +403,7 @@ int hci_get_conn_list(void __user *arg) size = sizeof(req) + req.conn_num * sizeof(*ci); - if (!(cl = (void *) kmalloc(size, GFP_KERNEL))) + if (!(cl = kmalloc(size, GFP_KERNEL))) return -ENOMEM; if (!(hdev = hci_dev_get(req.dev_id))) { diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index b19cc26fa9..a8bd34d474 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -166,8 +166,8 @@ svc_create_thread(svc_thread_fn func, struct svc_serv *serv) memset(rqstp, 0, sizeof(*rqstp)); init_waitqueue_head(&rqstp->rq_wait); - if (!(rqstp->rq_argp = (u32 *) kmalloc(serv->sv_xdrsize, GFP_KERNEL)) - || !(rqstp->rq_resp = (u32 *) kmalloc(serv->sv_xdrsize, GFP_KERNEL)) + if (!(rqstp->rq_argp = kmalloc(serv->sv_xdrsize, GFP_KERNEL)) + || !(rqstp->rq_resp = kmalloc(serv->sv_xdrsize, GFP_KERNEL)) || !svc_init_buffer(rqstp, serv->sv_bufsz)) goto out_thread;