Re: linux-next: Tree for September 2 (printk question)

From: Randy Dunlap
Date: Thu Sep 02 2010 - 12:15:39 EST


On Thu, 2 Sep 2010 16:13:45 +1000 Stephen Rothwell wrote:

> Hi all,
>
> Changes since 20100901:


printk format warning question:

on X86_32, I see this warning:

/drivers/staging/xgifb/XGI_main_26.c:3421: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'unsigned int'

I changed the format spec to "%x", so no problem on X86_32, but X86_64 build now says:

drivers/staging/xgifb/XGI_main_26.c:3421: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'long unsigned int'


What is the correct way to fix this? a cast? or is it a gcc problem?

> gcc --version
gcc (GCC) 4.4.1 20090725 (Red Hat 4.4.1-2)

# from fc11

I've seen this in a few other cases/places as well.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/