2017-06-23 01:32:10

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the l2-mtd tree

Hi Brian,

After merging the l2-mtd tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

In file included from include/linux/printk.h:6:0,
from include/linux/kernel.h:13,
from include/linux/list.h:8,
from include/linux/module.h:9,
from drivers/mtd/parsers/parser_trx.c:12:
drivers/mtd/parsers/parser_trx.c: In function 'parser_trx_data_part_name':
include/linux/kern_levels.h:4:18: warning: format '%X' expects argument of type 'unsigned int', but argument 2 has type 'size_t {aka long unsigned int}' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
#define KERN_ERR KERN_SOH "3" /* error conditions */
^
include/linux/printk.h:301:9: note: in expansion of macro 'KERN_ERR'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^
drivers/mtd/parsers/parser_trx.c:42:3: note: in expansion of macro 'pr_err'
pr_err("mtd_read error while parsing (offset: 0x%X): %d\n",
^

Introduced by commit

99352afe8f16 ("mtd: extract TRX parser out of bcm47xxpart into a separated module")

--
Cheers,
Stephen Rothwell


2017-06-23 08:34:31

by Rafał Miłecki

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the l2-mtd tree

On 2017-06-23 03:32, Stephen Rothwell wrote:
> After merging the l2-mtd tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:

This code has been just moved, so the warning was already there before.

But it's of course a good opportunity to fix it :)

2017-06-23 17:59:51

by Brian Norris

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the l2-mtd tree

On Fri, Jun 23, 2017 at 06:56:53AM +0200, Rafał Miłecki wrote:
> On 2017-06-23 03:32, Stephen Rothwell wrote:
> >After merging the l2-mtd tree, today's linux-next build (x86_64
> >allmodconfig) produced this warning:
>
> This code has been just moved, so the warning was already there before.
>
> But it's of course a good opportunity to fix it :)

We now allow it to build with COMPILE_TEST, which means it can show up
on 64-bit architectures, where sizeof(size_t) != sizeof(int). I failed
to add it to my local 64-bit build tests, so I didn't notice this.

But fixed now.

Brian