netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/6] net: Remove unneeded kmalloc() return value casts
@ 2005-12-11 19:34 Jesper Juhl
  2005-12-11 19:44 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Jesper Juhl @ 2005-12-11 19:34 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Maxim Krasnyansky, Olaf Kirch, netdev, davem, yoshfuji,
	Andrew Morton, Jesper Juhl


Get rid of needless casting of kmalloc() return value in net/


Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---

 net/bluetooth/hci_conn.c |    2 +-
 net/sunrpc/svc.c         |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

--- linux-2.6.15-rc5-git1-orig/net/bluetooth/hci_conn.c	2005-10-28 02:02:08.000000000 +0200
+++ linux-2.6.15-rc5-git1/net/bluetooth/hci_conn.c	2005-12-11 19:50:32.000000000 +0100
@@ -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))) {
--- linux-2.6.15-rc5-git1-orig/net/sunrpc/svc.c	2005-12-04 18:49:00.000000000 +0100
+++ linux-2.6.15-rc5-git1/net/sunrpc/svc.c	2005-12-11 19:54:05.000000000 +0100
@@ -167,8 +167,8 @@ svc_create_thread(svc_thread_fn func, st
 	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;
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 3/6] net: Remove unneeded kmalloc() return value casts
  2005-12-11 19:34 [PATCH 3/6] net: Remove unneeded kmalloc() return value casts Jesper Juhl
@ 2005-12-11 19:44 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2005-12-11 19:44 UTC (permalink / raw)
  To: Jesper Juhl
  Cc: Linux Kernel Mailing List, Maxim Krasnyansky, Olaf Kirch, netdev,
	davem, yoshfuji, Andrew Morton

Hi Jesper,

> Get rid of needless casting of kmalloc() return value in net/

the net/bluetooth/ part is fine with me.

> Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

Regards

Marcel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-11 19:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-11 19:34 [PATCH 3/6] net: Remove unneeded kmalloc() return value casts Jesper Juhl
2005-12-11 19:44 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).