[PATCH 04/30] powerpc: Don't cast kmalloc return value in ibmebus.c

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE6920d

2 messages, 2 authors, 2007-08-24 · open the first message on its own page

[PATCH 04/30] powerpc: Don't cast kmalloc return value in ibmebus.c

From: Jesper Juhl <hidden>
Date: 2007-08-23 23:48:16

kmalloc() returns a void pointer so there is absolutely no need to
cast it in ibmebus_chomp().

Signed-off-by: Jesper Juhl <redacted>
---
 arch/powerpc/kernel/ibmebus.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
index 9a8c9af..9514e66 100644
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -383,7 +383,8 @@ static int ibmebus_match_path(struct device *dev, void *data)
 
 static char *ibmebus_chomp(const char *in, size_t count)
 {
-	char *out = (char*)kmalloc(count + 1, GFP_KERNEL);
+	char *out = kmalloc(count + 1, GFP_KERNEL);
+
 	if (!out)
 		return NULL;
 
-- 
1.5.2.2

Re: [PATCH 04/30] powerpc: Don't cast kmalloc return value in ibmebus.c

From: Joachim Fenkes <hidden>
Date: 2007-08-24 00:38:16

kmalloc() returns a void pointer so there is absolutely no need to
cast it in ibmebus_chomp().

Signed-off-by: Jesper Juhl <redacted>
Acked-By: Joachim Fenkes <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help