* [PATCH] ks8*/ksz8*: Casting (void *) value returned by kmalloc is useless
@ 2011-11-17 22:43 Thomas Meyer
2011-11-21 20:06 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Meyer @ 2011-11-17 22:43 UTC (permalink / raw)
To: netdev, linux-kernel
The semantic patch that makes this change is available
in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
diff -u -p a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c
--- a/drivers/net/ethernet/micrel/ks8851_mll.c 2011-11-07 19:37:59.170122280 +0100
+++ b/drivers/net/ethernet/micrel/ks8851_mll.c 2011-11-08 09:00:03.544702580 +0100
@@ -1500,8 +1500,7 @@ static int ks_hw_init(struct ks_net *ks)
ks->all_mcast = 0;
ks->mcast_lst_size = 0;
- ks->frame_head_info = (struct type_frame_head *) \
- kmalloc(MHEADER_SIZE, GFP_KERNEL);
+ ks->frame_head_info = kmalloc(MHEADER_SIZE, GFP_KERNEL);
if (!ks->frame_head_info) {
pr_err("Error: Fail to allocate frame memory\n");
return false;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ks8*/ksz8*: Casting (void *) value returned by kmalloc is useless
2011-11-17 22:43 [PATCH] ks8*/ksz8*: Casting (void *) value returned by kmalloc is useless Thomas Meyer
@ 2011-11-21 20:06 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-11-21 20:06 UTC (permalink / raw)
To: thomas; +Cc: netdev, linux-kernel
From: Thomas Meyer <thomas@m3y3r.de>
Date: Thu, 17 Nov 2011 23:43:40 +0100
> The semantic patch that makes this change is available
> in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.
>
> Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-21 20:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-17 22:43 [PATCH] ks8*/ksz8*: Casting (void *) value returned by kmalloc is useless Thomas Meyer
2011-11-21 20:06 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.