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

From: Randy Dunlap <[email-masked]>
Date: Thu, 2 Sep 2010 09:14:48 -0700

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 ***