[PATCH] bnx2x: remove cast around the kmalloc in bnx2x_prev_mark_path

Subsystems: broadcom bnx2x 10 gigabit ethernet driver, networking drivers, the rest

STALE5126d

3 messages, 3 authors, 2012-07-30 · open the first message on its own page

[PATCH] bnx2x: remove cast around the kmalloc in bnx2x_prev_mark_path

From: Devendra Naga <hidden>
Date: 2012-07-29 13:19:32

casting the void pointer is redundant (Documentation/CodingStyle)

Signed-off-by: Devendra Naga <redacted>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 9aaf863..dd451c3 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -9360,8 +9360,7 @@ static int __devinit bnx2x_prev_mark_path(struct bnx2x *bp)
 	struct bnx2x_prev_path_list *tmp_list;
 	int rc;
 
-	tmp_list = (struct bnx2x_prev_path_list *)
-		    kmalloc(sizeof(struct bnx2x_prev_path_list), GFP_KERNEL);
+	tmp_list = kmalloc(sizeof(struct bnx2x_prev_path_list), GFP_KERNEL);
 	if (!tmp_list) {
 		BNX2X_ERR("Failed to allocate 'bnx2x_prev_path_list'\n");
 		return -ENOMEM;
-- 
1.7.9.5

Re: [PATCH] bnx2x: remove cast around the kmalloc in bnx2x_prev_mark_path

From: Eilon Greenstein <hidden>
Date: 2012-07-30 04:50:57

On Sun, 2012-07-29 at 19:04 +0545, Devendra Naga wrote:
casting the void pointer is redundant (Documentation/CodingStyle)

Signed-off-by: Devendra Naga <redacted>
Thanks Devendra, obviously, I’m acking this patch. I’m not so sure if it
should go into net though, and net-next is closed right now  but this is
up to Dave.

Acked-by: Eilon Greenstein <redacted>

Re: [PATCH] bnx2x: remove cast around the kmalloc in bnx2x_prev_mark_path

From: David Miller <davem@davemloft.net>
Date: 2012-07-30 06:19:28

From: Devendra Naga <redacted>
Date: Sun, 29 Jul 2012 19:04:23 +0545
casting the void pointer is redundant (Documentation/CodingStyle)

Signed-off-by: Devendra Naga <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help