[PATCH 5/8] pseries: phyp dump: register dump area.
    Stephen Rothwell 
    sfr at canb.auug.org.au
       
    Tue Jan  8 14:59:30 EST 2008
    
    
  
Hi Manish,
On Mon, 07 Jan 2008 18:28:30 -0600 Manish Ahuja <ahuja at austin.ibm.com> wrote:
>
> +++ linux-2.6.24-rc3-git1/arch/powerpc/platforms/pseries/phyp_dump.c	2007-11-21 16:06:52.000000000 -0600
> +static unsigned long init_dump_header(struct phyp_dump_header *ph)
> +{
> +	/* Get the required dump region sizes */
> +	rtas = of_find_node_by_path("/rtas");
You need to of_node_put(rtas) somewhere.
> +	if (sizes[0] == 1)
> +		cpu_state_size = *((unsigned long *) &sizes[1]);
We normally don't put spaces after casts.
> +	ph->first_offset_section =
> +		(u32) &(((struct phyp_dump_header *) 0)->cpu_data);
		(u32)offsetof(struct phyp_dump_header, cpu_data);
> +static void register_dump_area(struct phyp_dump_header *ph, unsigned long addr)
> +{
> +	if (rc)
> +	{
> +		printk (KERN_ERR "phyp-dump: unexpected error (%d) on register\n", rc);
> +	}
The braces are not needed.
> +
> +	dump_area_length = init_dump_header (&phdr);
We don't put spaces after function names.
> +	free_area_length = phyp_dump_info->init_reserve_size - dump_area_length;
> +	dump_area_start = phyp_dump_info->init_reserve_start + free_area_length;
> +	dump_area_start = dump_area_start & PAGE_MASK; /* align down */
> +	free_area_length = dump_area_start - phyp_dump_info->init_reserve_start;
> +
>  	if (dump_header == NULL) {
> -		release_all();
> -		return 0;
> +		register_dump_area (&phdr, dump_area_start);
Ditto.
-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080108/6be465a3/attachment.pgp>
    
    
More information about the Linuxppc-dev
mailing list