[PATCH 6/8] pseries: phyp dump: debugging print routines.

Arnd Bergmann arnd at arndb.de
Tue Jan 8 11:49:49 EST 2008


On Tuesday 08 January 2008, Manish Ahuja wrote:
> +#ifdef DEBUG
> +static void print_dump_header(const struct phyp_dump_header *ph)
> +{
> +       printk(KERN_INFO "dump header:\n");
> ...
> +       printk(KERN_INFO "SRSD length_copied =%lx\n",ph->kernel_data.length_copied);
> +}
> +#endif
> +

If you move the #if to inside of the function,

>                 printk (KERN_ERR "phyp-dump: unexpected error (%d) on register\n", rc);
> +#ifdef DEBUG
> +               print_dump_header (ph);
> +#endif
>         }

>         }
> +#ifdef DEBUG
> +       print_dump_header (dump_header);
> +#endif


you don't need the #ifdefs here.

	Arnd <><



More information about the Linuxppc-dev mailing list