linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [powerpc] change get_property to return void *
@ 2006-06-29 10:28 Jeremy Kerr
  2006-06-29 10:37 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 3+ messages in thread
From: Jeremy Kerr @ 2006-06-29 10:28 UTC (permalink / raw)
  To: linuxppc-dev

Change the get_property() function to return a void *. This allows us
to later remove the cast done in the majority of callers.

Built for pseries, iseries, pmac32, cell, cbesim, g5, systemsim, maple,
and mpc* defconfigs

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
---

 arch/powerpc/kernel/prom.c |    3 +--
 include/asm-powerpc/prom.h |    4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

Index: linux-2.6/arch/powerpc/kernel/prom.c
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/prom.c
+++ linux-2.6/arch/powerpc/kernel/prom.c
@@ -1975,8 +1975,7 @@ struct property *of_find_property(struct
  * Find a property with a given name for a given node
  * and return the value.
  */
-unsigned char *get_property(struct device_node *np, const char *name,
-			    int *lenp)
+void *get_property(struct device_node *np, const char *name, int *lenp)
 {
 	struct property *pp = of_find_property(np,name,lenp);
 	return pp ? pp->value : NULL;
Index: linux-2.6/include/asm-powerpc/prom.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/prom.h
+++ linux-2.6/include/asm-powerpc/prom.h
@@ -167,8 +167,8 @@ extern void unflatten_device_tree(void);
 extern void early_init_devtree(void *);
 extern int device_is_compatible(struct device_node *device, const char *);
 extern int machine_is_compatible(const char *compat);
-extern unsigned char *get_property(struct device_node *node, const char *name,
-				   int *lenp);
+extern void *get_property(struct device_node *node, const char *name,
+		int *lenp);
 extern void print_properties(struct device_node *node);
 extern int prom_n_addr_cells(struct device_node* np);
 extern int prom_n_size_cells(struct device_node* np);

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

* Re: [PATCH] [powerpc] change get_property to return void *
  2006-06-29 10:28 [PATCH] [powerpc] change get_property to return void * Jeremy Kerr
@ 2006-06-29 10:37 ` Benjamin Herrenschmidt
  2006-06-29 11:29   ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2006-06-29 10:37 UTC (permalink / raw)
  To: Jeremy Kerr; +Cc: linuxppc-dev

On Thu, 2006-06-29 at 20:28 +1000, Jeremy Kerr wrote:
> Change the get_property() function to return a void *. This allows us
> to later remove the cast done in the majority of callers.
> 
> Built for pseries, iseries, pmac32, cell, cbesim, g5, systemsim, maple,
> and mpc* defconfigs
> 
> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

It was time to do that !

Acked-by: Benjamin Herremschmidt <benh@kernel.crashing.org>

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

* Re: [PATCH] [powerpc] change get_property to return void *
  2006-06-29 10:37 ` Benjamin Herrenschmidt
@ 2006-06-29 11:29   ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2006-06-29 11:29 UTC (permalink / raw)
  To: Jeremy Kerr; +Cc: linuxppc-dev


> Acked-by: Benjamin Herremschmidt <benh@kernel.crashing.org>

And as Segher-lynx-eye noticed, there is a typo :) Here's a proper one

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

:)

Ben.

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

end of thread, other threads:[~2006-06-29 11:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-29 10:28 [PATCH] [powerpc] change get_property to return void * Jeremy Kerr
2006-06-29 10:37 ` Benjamin Herrenschmidt
2006-06-29 11:29   ` Benjamin Herrenschmidt

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