b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batman-adv: Remove cast after kmalloc
@ 2011-06-08 20:33 Sven Eckelmann
  2011-06-09 15:03 ` Marek Lindner
  0 siblings, 1 reply; 2+ messages in thread
From: Sven Eckelmann @ 2011-06-08 20:33 UTC (permalink / raw)
  To: b.a.t.m.a.n

Casting (void *) value returned by kmalloc is useless as mentioned in
Documentation/CodingStyle, Chap 14.

This regression was introduced in
cea194d90b11aff7fc289149e4c7f305fad3535a

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 translation-table.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/translation-table.c b/translation-table.c
index d2a9f80..adecf1b 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -148,8 +148,7 @@ static void tt_local_event(struct bat_priv *bat_priv, uint8_t op,
 {
 	struct tt_change_node *tt_change_node;
 
-	tt_change_node = (struct tt_change_node *)
-		kmalloc(sizeof(*tt_change_node), GFP_ATOMIC);
+	tt_change_node = kmalloc(sizeof(*tt_change_node), GFP_ATOMIC);
 
 	if (!tt_change_node)
 		return;
-- 
1.7.5.3


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

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Remove cast after kmalloc
  2011-06-08 20:33 [B.A.T.M.A.N.] [PATCH] batman-adv: Remove cast after kmalloc Sven Eckelmann
@ 2011-06-09 15:03 ` Marek Lindner
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2011-06-09 15:03 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Wednesday, June 08, 2011 10:33:53 PM Sven Eckelmann wrote:
> Casting (void *) value returned by kmalloc is useless as mentioned in
> Documentation/CodingStyle, Chap 14.
> 
> This regression was introduced in
> cea194d90b11aff7fc289149e4c7f305fad3535a

Applied in revision 4591fc4.

Thanks,
Marek

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

end of thread, other threads:[~2011-06-09 15:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-08 20:33 [B.A.T.M.A.N.] [PATCH] batman-adv: Remove cast after kmalloc Sven Eckelmann
2011-06-09 15:03 ` Marek Lindner

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).