[LinuxBIOS] [PATCH] LBv3: fix printk format warnings

ron minnich rminnich at gmail.com
Fri Aug 10 18:31:28 CEST 2007


Thanks very much for this. I have a suggestion. Nowadays, for things
that are pointers, even if they are not typed as such, I've taken to
this style:


On 8/9/07, Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net> wrote:

> +               printk(BIOS_SPEW, "base = 0x%04lx, reg = 0x%02x, value = 0x%02x\r\n", base, reg,value);

                                           vvv
                             vvvvvvv
printk(BIOS_SPEW, "base = %p, reg = 0x%02x, value = 0x%02x\r\n", (void
*) base, reg,value);


> +       printk(BIOS_DEBUG, "ROM address for %s = %lx\n", dev_path(dev),
>                rom_address);

                                                                   vvvvv
printk(BIOS_DEBUG, "ROM address for %s = %p\n", dev_path(dev),(void *)
rom_address);

Why do this? It's actually more portable, even across plan 9 and
linux. It will probably work correctly in 64 bit mode. And, that
rom_address really *is* an address.

I am wondering what people think of this idea. Comments?

On another note, we're experimenting, for various reasons, with -fPIC
mode on v3, so as to support execute-in-place. I have a question I
would like to toss at some willing experimenters. If anyone is
interested I will ask in this forum. Let me know.

thanks again

ron




More information about the coreboot mailing list