From: Miquel Raynal <miquel.raynal@bootlin.com>
To: kernel test robot <lkp@intel.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [linux-next:master 990/1252] drivers/mtd/nand/raw/brcmnand/bcma_nand.c:61:23: sparse: sparse: cast to restricted __be32
Date: Tue, 25 Jan 2022 10:28:22 +0100 [thread overview]
Message-ID: <20220125102822.436e5fff@xps13> (raw)
In-Reply-To: <202201242253.FYuBom60-lkp@intel.com>
Hi Florian,
lkp@intel.com wrote on Mon, 24 Jan 2022 22:30:29 +0800:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 74e5dee6a5b9683e4e78aad784c6c807833cb89b
> commit: feca4cc4765a67907a97bddfa94aa6901cbbce7d [990/1252] mtd: rawnand: brcmnand: Add BCMA shim
> config: alpha-randconfig-s032-20220124 (https://download.01.org/0day-ci/archive/20220124/202201242253.FYuBom60-lkp@intel.com/config)
> compiler: alpha-linux-gcc (GCC) 11.2.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # apt-get install sparse
> # sparse version: v0.6.4-dirty
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=feca4cc4765a67907a97bddfa94aa6901cbbce7d
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout feca4cc4765a67907a97bddfa94aa6901cbbce7d
> # save the config file to linux build tree
> mkdir build_dir
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=alpha SHELL=/bin/bash drivers/mtd/nand/raw/brcmnand/
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
>
> sparse warnings: (new ones prefixed by >>)
> >> drivers/mtd/nand/raw/brcmnand/bcma_nand.c:61:23: sparse: sparse: cast to restricted __be32
> >> drivers/mtd/nand/raw/brcmnand/bcma_nand.c:61:23: sparse: sparse: cast to restricted __be32
> >> drivers/mtd/nand/raw/brcmnand/bcma_nand.c:61:23: sparse: sparse: cast to restricted __be32
> >> drivers/mtd/nand/raw/brcmnand/bcma_nand.c:61:23: sparse: sparse: cast to restricted __be32
> >> drivers/mtd/nand/raw/brcmnand/bcma_nand.c:61:23: sparse: sparse: cast to restricted __be32
> >> drivers/mtd/nand/raw/brcmnand/bcma_nand.c:61:23: sparse: sparse: cast to restricted __be32
> >> drivers/mtd/nand/raw/brcmnand/bcma_nand.c:78:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] val @@ got restricted __be32 [usertype] @@
> drivers/mtd/nand/raw/brcmnand/bcma_nand.c:78:21: sparse: expected unsigned int [usertype] val
> drivers/mtd/nand/raw/brcmnand/bcma_nand.c:78:21: sparse: got restricted __be32 [usertype]
>
Can you send a fixup! for that? If it applies easily on nand/next I'll
squash it, otherwise please just send a regular patch and I will queue
it as usual.
> vim +61 drivers/mtd/nand/raw/brcmnand/bcma_nand.c
>
> 45
> 46 static u32 brcmnand_bcma_read_reg(struct brcmnand_soc *soc, u32 offset)
> 47 {
> 48 struct brcmnand_bcma_soc *sc = to_bcma_soc(soc);
> 49 u32 val;
> 50
> 51 /* Offset into the NAND block and deal with the flash cache separately */
> 52 if (offset == BRCMNAND_NON_MMIO_FC_ADDR)
> 53 offset = BCMA_CC_NAND_CACHE_DATA;
> 54 else
> 55 offset += BCMA_CC_NAND_REVISION;
> 56
> 57 val = bcma_cc_read32(sc->cc, offset);
> 58
> 59 /* Swap if necessary */
> 60 if (brcmnand_bcma_needs_swapping(offset))
> > 61 val = be32_to_cpu(val);
> 62 return val;
> 63 }
> 64
> 65 static void brcmnand_bcma_write_reg(struct brcmnand_soc *soc, u32 val,
> 66 u32 offset)
> 67 {
> 68 struct brcmnand_bcma_soc *sc = to_bcma_soc(soc);
> 69
> 70 /* Offset into the NAND block */
> 71 if (offset == BRCMNAND_NON_MMIO_FC_ADDR)
> 72 offset = BCMA_CC_NAND_CACHE_DATA;
> 73 else
> 74 offset += BCMA_CC_NAND_REVISION;
> 75
> 76 /* Swap if necessary */
> 77 if (brcmnand_bcma_needs_swapping(offset))
> > 78 val = cpu_to_be32(val);
> 79
> 80 bcma_cc_write32(sc->cc, offset, val);
> 81 }
> 82
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Thanks,
Miquèl
next prev parent reply other threads:[~2022-01-25 9:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-24 14:30 [linux-next:master 990/1252] drivers/mtd/nand/raw/brcmnand/bcma_nand.c:61:23: sparse: sparse: cast to restricted __be32 kernel test robot
2022-01-25 9:28 ` Miquel Raynal [this message]
2022-01-25 22:42 ` Florian Fainelli
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=20220125102822.436e5fff@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=f.fainelli@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
/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).