On Fri, 20 Jul 2018 14:56:28 +1000 Stephen Rothwell <sfr at canb.auug.org.au> wrote: > Hi all, > > On Thu, 19 Jul 2018 23:11:56 +0200 Miquel Raynal <miquel.raynal at bootlin.com> wrote: > > > > Boris Brezillon <boris.brezillon at bootlin.com> wrote on Thu, 19 Jul 2018 > > 09:37:20 +0200: > > > > > In jz_nand_detect_bank(), chipnr is a size_t argument. Use %zu instead > > > of %i when printing it. > > > > > > Reported-by: Stephen Rothwell <sfr at canb.auug.org.au> > > > Signed-off-by: Boris Brezillon <boris.brezillon at bootlin.com> > > > --- > > > drivers/mtd/nand/raw/jz4740_nand.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/mtd/nand/raw/jz4740_nand.c b/drivers/mtd/nand/raw/jz4740_nand.c > > > index 1f7aff04ad8a..9bb8a89e09f9 100644 > > > --- a/drivers/mtd/nand/raw/jz4740_nand.c > > > +++ b/drivers/mtd/nand/raw/jz4740_nand.c > > > @@ -355,7 +355,7 @@ static int jz_nand_detect_bank(struct platform_device *pdev, > > > mtd->size += chip->chipsize; > > > } > > > > > > - dev_info(&pdev->dev, "Found chip %i on bank %i\n", chipnr, bank); > > > + dev_info(&pdev->dev, "Found chip %zu on bank %i\n", chipnr, bank); > > > return 0; > > > > > > notfound_id: > > > > Applied to nand/next. > > It might be a better fix to ask why chipnr is a size_t at all ... it is > only used as an index, so should probably be int ... I considered this option, and then I had a look at the rest of the file and found a few other places where size_t could be replaced by an unsigned int, so I just gave up on this solution and went for the one-liner changing the format specifier :-).