Re: [PATCH 4/8] pseries: phyp dump: use sysfs to release reserved mem

2008-01-08 Thread Linas Vepstas
On 07/01/2008, Stephen Rothwell <[EMAIL PROTECTED]> wrote:
> On Mon, 07 Jan 2008 18:21:57 -0600 Manish Ahuja <[EMAIL PROTECTED]> wrote:
> >
> > +static int __init phyp_dump_setup(void)
> > +{
> >
> > + /* Is there dump data waiting for us? */
> > + rtas = of_find_node_by_path("/rtas");
> > + dump_header = of_get_property(rtas, "ibm,kernel-dump", &header_len);
>^^^
> You could pass NULL here as header_len appears to be unused. Also you
> need "of_node_put(rtas)" somewhere (probably just here would do).

Perhaps the routine should have been "of_get_node_by_path()" ?

In ye olden days, "finds" didn't require put, but "gets" did. I'm guessing
that this has now all been fixed up for the of_xxx routines, but I think
that pci_find_xxx still does not require a pci_put.

Why did I bother to write this email? I dunno...
--linas
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 4/8] pseries: phyp dump: use sysfs to release reserved mem

2008-01-07 Thread Stephen Rothwell
On Mon, 07 Jan 2008 18:21:57 -0600 Manish Ahuja <[EMAIL PROTECTED]> wrote:
>
> +static int __init phyp_dump_setup(void)
> +{
>
> + /* Is there dump data waiting for us? */
> + rtas = of_find_node_by_path("/rtas");
> + dump_header = of_get_property(rtas, "ibm,kernel-dump", &header_len);
   ^^^
You could pass NULL here as header_len appears to be unused. Also you
need "of_node_put(rtas)" somewhere (probably just here would do).

> + if (dump_header == NULL) {
> + release_all();
> + return 0;
> + }
-- 
Cheers,
Stephen Rothwell[EMAIL PROTECTED]
http://www.canb.auug.org.au/~sfr/


pgpOilA6GewxA.pgp
Description: PGP signature
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev