linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Avoid putting cpu node twice
@ 2007-04-06 22:57 John Rigby
  2007-04-07 18:22 ` Sylvain Munaut
  0 siblings, 1 reply; 3+ messages in thread
From: John Rigby @ 2007-04-06 22:57 UTC (permalink / raw)
  To: Linuxppc-embedded, Grant Likely, Sylvain Munaut

Call of_find_node_by_type with NULL instead of np
so the cpu node does not get put twice.
This was causing kref_put warnings.

Signed-off-by: John Rigby <jrigby@freescale.com>
---
 arch/powerpc/platforms/52xx/lite5200.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/52xx/lite5200.c
b/arch/powerpc/platforms/52xx/lite5200.c
index cc3b40d..d2f90eb 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -108,9 +108,11 @@ static void __init lite5200_setup_arch(void)
        lite5200_setup_cpu();   /* Platorm specific */

 #ifdef CONFIG_PCI
-       np = of_find_node_by_type(np, "pci");
-       if (np)
+       np = of_find_node_by_type(NULL, "pci");
+       if (np) {
                mpc52xx_add_bridge(np);
+               of_node_put(np);
+       }
 #endif

 #ifdef CONFIG_BLK_DEV_INITRD
--
1.5.0.6

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

* Re: [PATCH] Avoid putting cpu node twice
  2007-04-06 22:57 [PATCH] Avoid putting cpu node twice John Rigby
@ 2007-04-07 18:22 ` Sylvain Munaut
  2007-04-27 16:39   ` Fwd: " John Rigby
  0 siblings, 1 reply; 3+ messages in thread
From: Sylvain Munaut @ 2007-04-07 18:22 UTC (permalink / raw)
  To: John Rigby; +Cc: Linuxppc-embedded

John Rigby wrote:
> Call of_find_node_by_type with NULL instead of np
> so the cpu node does not get put twice.
> This was causing kref_put warnings.
>
> Signed-off-by: John Rigby <jrigby@freescale.com>
Acked-by: Sylvain Munaut <tnt@246tNt.com>

> ---
> arch/powerpc/platforms/52xx/lite5200.c |    6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/platforms/52xx/lite5200.c
> b/arch/powerpc/platforms/52xx/lite5200.c
> index cc3b40d..d2f90eb 100644
> --- a/arch/powerpc/platforms/52xx/lite5200.c
> +++ b/arch/powerpc/platforms/52xx/lite5200.c
> @@ -108,9 +108,11 @@ static void __init lite5200_setup_arch(void)
>        lite5200_setup_cpu();   /* Platorm specific */
>
> #ifdef CONFIG_PCI
> -       np = of_find_node_by_type(np, "pci");
> -       if (np)
> +       np = of_find_node_by_type(NULL, "pci");
> +       if (np) {
>                mpc52xx_add_bridge(np);
> +               of_node_put(np);
> +       }
> #endif
>
> #ifdef CONFIG_BLK_DEV_INITRD
> -- 
> 1.5.0.6
>

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

* Fwd: [PATCH] Avoid putting cpu node twice
  2007-04-07 18:22 ` Sylvain Munaut
@ 2007-04-27 16:39   ` John Rigby
  0 siblings, 0 replies; 3+ messages in thread
From: John Rigby @ 2007-04-27 16:39 UTC (permalink / raw)
  To: Paul Mackerras, linuxppc

This was originally sent to linuxppc-embedded.

---------- Forwarded message ----------
From: Sylvain Munaut <tnt@246tnt.com>
Date: Apr 7, 2007 12:22 PM
Subject: Re: [PATCH] Avoid putting cpu node twice
To: John Rigby <jcrigby@gmail.com>
Cc: Linuxppc-embedded <Linuxppc-embedded@ozlabs.org>, Grant Likely
<grant.likely@secretlab.ca>


John Rigby wrote:
> Call of_find_node_by_type with NULL instead of np
> so the cpu node does not get put twice.
> This was causing kref_put warnings.
>
> Signed-off-by: John Rigby <jrigby@freescale.com>
Acked-by: Sylvain Munaut <tnt@246tNt.com>

> ---
> arch/powerpc/platforms/52xx/lite5200.c |    6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/platforms/52xx/lite5200.c
> b/arch/powerpc/platforms/52xx/lite5200.c
> index cc3b40d..d2f90eb 100644
> --- a/arch/powerpc/platforms/52xx/lite5200.c
> +++ b/arch/powerpc/platforms/52xx/lite5200.c
> @@ -108,9 +108,11 @@ static void __init lite5200_setup_arch(void)
>        lite5200_setup_cpu();   /* Platorm specific */
>
> #ifdef CONFIG_PCI
> -       np = of_find_node_by_type(np, "pci");
> -       if (np)
> +       np = of_find_node_by_type(NULL, "pci");
> +       if (np) {
>                mpc52xx_add_bridge(np);
> +               of_node_put(np);
> +       }
> #endif
>
> #ifdef CONFIG_BLK_DEV_INITRD
> --
> 1.5.0.6
>

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

end of thread, other threads:[~2007-04-27 16:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-06 22:57 [PATCH] Avoid putting cpu node twice John Rigby
2007-04-07 18:22 ` Sylvain Munaut
2007-04-27 16:39   ` Fwd: " John Rigby

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