linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Boris Brezillon <boris.brezillon@bootlin.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Linux-Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: linux-next: build warning after merge of the nand tree
Date: Mon, 9 Jul 2018 08:51:38 +0200	[thread overview]
Message-ID: <20180709085138.4b28e898@xps13> (raw)
In-Reply-To: <20180709081632.0ed241d6@bbrezillon>

Hi Stephen, Boris,

Boris Brezillon <boris.brezillon@bootlin.com> wrote on Mon, 9 Jul 2018
08:16:32 +0200:

> Hi Stephen,
> 
> On Mon, 9 Jul 2018 11:51:15 +1000
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > Hi Boris,
> > 
> > After merging the nand tree, today's linux-next build (x86_64
> > allmodconfig) produced this warning:
> > 
> > drivers/mtd/nand/raw/davinci_nand.c: In function 'nand_davinci_hwcontrol':
> > drivers/mtd/nand/raw/davinci_nand.c:115:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> >    nand->IO_ADDR_W = (void __iomem __force *)addr;
> >                      ^
> > drivers/mtd/nand/raw/davinci_nand.c: In function 'nand_davinci_select_chip':
> > drivers/mtd/nand/raw/davinci_nand.c:132:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> >   info->chip.IO_ADDR_W = (void __iomem __force *)addr;
> >                          ^
> > In file included from arch/x86/include/asm/bug.h:83:0,
> >                  from include/linux/bug.h:5,
> >                  from include/linux/thread_info.h:12,
> >                  from arch/x86/include/asm/preempt.h:7,
> >                  from include/linux/preempt.h:81,
> >                  from include/linux/spinlock.h:51,
> >                  from include/linux/seqlock.h:36,
> >                  from include/linux/time.h:6,
> >                  from include/linux/stat.h:19,
> >                  from include/linux/module.h:10,
> >                  from drivers/mtd/nand/raw/davinci_nand.c:27:
> > drivers/mtd/nand/raw/davinci_nand.c: In function 'nand_davinci_correct_4bit':
> > drivers/mtd/nand/raw/davinci_nand.c:322:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> >   if (WARN_ON(0x01 & (unsigned) ecc_code))
> >                      ^
> > include/asm-generic/bug.h:112:25: note: in definition of macro 'WARN_ON'
> >   int __ret_warn_on = !!(condition);    \
> >                          ^~~~~~~~~
> > drivers/mtd/nand/raw/davinci_nand.c: In function 'nand_davinci_read_buf':
> > drivers/mtd/nand/raw/davinci_nand.c:444:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> >   if ((0x03 & ((unsigned)buf)) == 0 && (0x03 & len) == 0)
> >                ^
> > drivers/mtd/nand/raw/davinci_nand.c:446:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> >   else if ((0x01 & ((unsigned)buf)) == 0 && (0x01 & len) == 0)
> >                     ^
> > drivers/mtd/nand/raw/davinci_nand.c: In function 'nand_davinci_write_buf':
> > drivers/mtd/nand/raw/davinci_nand.c:457:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> >   if ((0x03 & ((unsigned)buf)) == 0 && (0x03 & len) == 0)
> >                ^
> > drivers/mtd/nand/raw/davinci_nand.c:459:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> >   else if ((0x01 & ((unsigned)buf)) == 0 && (0x01 & len) == 0)
> >                     ^
> > drivers/mtd/nand/raw/davinci_nand.c: In function 'nand_davinci_probe':
> > drivers/mtd/nand/raw/davinci_nand.c:683:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> >   info->ioaddr  = (uint32_t __force) vaddr;
> >                   ^
> > drivers/mtd/nand/raw/atmel/nand-controller.c: In function 'atmel_smc_nand_controller_init':
> > drivers/mtd/nand/raw/atmel/nand-controller.c:2053:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> >   nc->ebi_csa_offs = (unsigned int)match->data;
> >                      ^
> > drivers/mtd/nand/raw/sunxi_nand.c: In function 'sunxi_nfc_hw_ecc_read_chunks_dma':
> > drivers/mtd/nand/raw/sunxi_nand.c:130:22: warning: large integer implicitly truncated to unsigned type [-Woverflow]
> >  #define NFC_PAGE_OP  (2 << 30)
> >                       ^
> > drivers/mtd/nand/raw/sunxi_nand.c:1040:9: note: in expansion of macro 'NFC_PAGE_OP'
> >   writel(NFC_PAGE_OP | NFC_DATA_SWAP_METHOD | NFC_DATA_TRANS,
> >          ^~~~~~~~~~~
> > drivers/mtd/nand/raw/sunxi_nand.c: In function 'sunxi_nfc_hw_ecc_write_page_dma':
> > drivers/mtd/nand/raw/sunxi_nand.c:130:22: warning: large integer implicitly truncated to unsigned type [-Woverflow]
> >  #define NFC_PAGE_OP  (2 << 30)
> >                       ^
> > drivers/mtd/nand/raw/sunxi_nand.c:1406:9: note: in expansion of macro 'NFC_PAGE_OP'
> >   writel(NFC_PAGE_OP | NFC_DATA_SWAP_METHOD |
> >          ^~~~~~~~~~~
> > 
> > Presumably exposed by commits
> > 
> >   347af8918e8a ("mtd: rawnand: davinci: Allow selection of this driver when COMPILE_TEST=y")
> >   b3d926a3d6e0 ("mtd: rawnand: sunxi: Allow selection of this driver when COMPILE_TEST=y")
> >   
> 
> Stephen, thanks for this report.
> 
> Miquel, can you drop those 2 commits from the nand tree? I'll resubmit a
> series fixing that.

Both commits dropped from nand/next. The branch is clean, it should
build correctly now.

Thanks,
Miquèl

> 
> Thanks,
> 
> Boris



-- 
Miquel Raynal, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-07-09  6:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-09  1:51 linux-next: build warning after merge of the nand tree Stephen Rothwell
2018-07-09  6:16 ` Boris Brezillon
2018-07-09  6:51   ` Miquel Raynal [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-07-19  2:28 Stephen Rothwell
2018-10-08  0:38 Stephen Rothwell
2018-10-08  7:53 ` Miquel Raynal
2018-10-08 11:06   ` Stephen Rothwell
2019-04-02 23:22 Stephen Rothwell
2019-04-03  7:49 ` Miquel Raynal
2020-03-11  2:06 Stephen Rothwell
2020-09-14  1:40 Stephen Rothwell
2020-11-03  6:37 Stephen Rothwell
2020-11-06  4:31 ` Stephen Rothwell
2020-11-20  0:39 Stephen Rothwell
2020-11-20 11:23 ` Miquel Raynal
2020-11-20 12:01   ` Boris Brezillon
2020-11-20 12:58     ` Serge Semin
2020-11-20 13:01     ` Serge Semin
2022-02-08  6:00 Stephen Rothwell
2023-01-16  3:32 Stephen Rothwell
2023-12-01  1:56 Stephen Rothwell
2023-12-01  5:03 ` David Regan
2023-12-01 11:55   ` Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180709085138.4b28e898@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=boris.brezillon@bootlin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).