On Wed, Jan 12, 2022 at 08:58:00PM +0100, Hans de Goede wrote:
On 1/8/22 19:54, kernel test robot wrote:
>>> drivers/pinctrl/intel/pinctrl-baytrail.c:1483:58:
warning: format specifies type 'long' but the argument has type 'int'
[-Wformat]
> dev_dbg(vg->dev, "Pin %i: uses direct IRQ %ld\n",
pin, match - direct_irq);
> ~~~
^~~~~~~~~~~~~~~~~~
> %d
> include/linux/dev_printk.h:163:47: note: expanded from macro 'dev_dbg'
> dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
> ~~~ ^~~~~~~~~~~
> include/linux/dev_printk.h:129:34: note: expanded from macro
'dev_printk'
> _dev_printk(level, dev, fmt, ##__VA_ARGS__); \
> ~~~ ^~~~~~~~~~~
> 1 warning generated.
Hmm, ok. so x86_64 needs a %ld for the pointer arithmic result on i386 needs a %d
without the 'l' what fun. I'll just store it in a temp int variable in the
next
version.
Why not to use uintptr_t and corresponding specifier (or ptrdiff_t)?
--
With Best Regards,
Andy Shevchenko