* [linux-next:pending-fixes 192/251] drivers/soc/ixp4xx/ixp4xx-qmgr.c:149:37: sparse: sparse: dereference of noderef expression
@ 2021-08-03 7:01 kernel test robot
2021-08-03 8:19 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2021-08-03 7:01 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: kbuild-all, Linux Memory Management List, Linus Walleij
[-- Attachment #1: Type: text/plain, Size: 8338 bytes --]
Hi Arnd,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git pending-fixes
head: be32e0f17dc184e41da2e83e5bf700f3f1c7e93f
commit: 7f94b69ece515ac82defa60ef7cba2cf26180216 [192/251] ARM: ixp4xx: fix compile-testing soc drivers
config: h8300-randconfig-s031-20210803 (attached as .config)
compiler: h8300-linux-gcc (GCC) 10.3.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.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=7f94b69ece515ac82defa60ef7cba2cf26180216
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next pending-fixes
git checkout 7f94b69ece515ac82defa60ef7cba2cf26180216
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=h8300 SHELL=/bin/bash drivers/soc/ixp4xx/
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/soc/ixp4xx/ixp4xx-qmgr.c: note: in included file (through include/linux/io.h, include/linux/irq.h, include/asm-generic/hardirq.h, ...):
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/soc/ixp4xx/ixp4xx-qmgr.c:149:37: sparse: sparse: dereference of noderef expression
drivers/soc/ixp4xx/ixp4xx-qmgr.c:153:40: sparse: sparse: dereference of noderef expression
drivers/soc/ixp4xx/ixp4xx-qmgr.c:154:40: sparse: sparse: dereference of noderef expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
drivers/soc/ixp4xx/ixp4xx-qmgr.c:174:38: sparse: sparse: dereference of noderef expression
drivers/soc/ixp4xx/ixp4xx-qmgr.c:174:44: sparse: sparse: dereference of noderef expression
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
vim +149 drivers/soc/ixp4xx/ixp4xx-qmgr.c
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Halasa 2008-01-01 139
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Halasa 2008-01-01 140
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 141 static irqreturn_t qmgr_irq1_a0(int irq, void *pdev)
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 142 {
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 143 int i, ret = 0;
0771c6939484d2 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-04-28 144 u32 en_bitmap, src, stat;
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 145
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 146 /* ACK - it may clear any bits so don't rely on it */
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 147 __raw_writel(0xFFFFFFFF, &qmgr_regs->irqstat[0]);
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 148
0771c6939484d2 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-04-28 @149 en_bitmap = qmgr_regs->irqen[0];
0771c6939484d2 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-04-28 150 while (en_bitmap) {
0771c6939484d2 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-04-28 151 i = __fls(en_bitmap); /* number of the last "low" queue */
0771c6939484d2 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-04-28 152 en_bitmap &= ~BIT(i);
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 153 src = qmgr_regs->irqsrc[i >> 3];
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 154 stat = qmgr_regs->stat1[i >> 3];
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 155 if (src & 4) /* the IRQ condition is inverted */
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 156 stat = ~stat;
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 157 if (stat & BIT(src & 3)) {
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 158 irq_handlers[i](irq_pdevs[i]);
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 159 ret = IRQ_HANDLED;
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 160 }
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 161 }
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 162 return ret;
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 163 }
d4c9e9fc975155 arch/arm/mach-ixp4xx/ixp4xx_qmgr.c Krzysztof Hałasa 2009-05-23 164
:::::: The code at line 149 was first introduced by commit
:::::: 0771c6939484d2ebe0ec28257c2570aecd9911e0 IXP42x: Use __fls() in QMgr interrupt handlers.
:::::: TO: Krzysztof Hałasa <khc@pm.waw.pl>
:::::: CC: Krzysztof Hałasa <khc@pm.waw.pl>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24088 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-next:pending-fixes 192/251] drivers/soc/ixp4xx/ixp4xx-qmgr.c:149:37: sparse: sparse: dereference of noderef expression
2021-08-03 7:01 [linux-next:pending-fixes 192/251] drivers/soc/ixp4xx/ixp4xx-qmgr.c:149:37: sparse: sparse: dereference of noderef expression kernel test robot
@ 2021-08-03 8:19 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2021-08-03 8:19 UTC (permalink / raw)
To: kernel test robot
Cc: Arnd Bergmann, kbuild-all, Linux Memory Management List,
Linus Walleij, moderated list:H8/300 ARCHITECTURE, Yoshinori Sato
On Tue, Aug 3, 2021 at 9:01 AM kernel test robot <lkp@intel.com> wrote:
>
> sparse warnings: (new ones prefixed by >>)
> drivers/soc/ixp4xx/ixp4xx-qmgr.c: note: in included file (through include/linux/io.h, include/linux/irq.h, include/asm-generic/hardirq.h, ...):
> >> drivers/soc/ixp4xx/ixp4xx-qmgr.c:149:37: sparse: sparse: dereference of noderef expression
> drivers/soc/ixp4xx/ixp4xx-qmgr.c:153:40: sparse: sparse: dereference of noderef expression
> drivers/soc/ixp4xx/ixp4xx-qmgr.c:154:40: sparse: sparse: dereference of noderef expression
> arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
> drivers/soc/ixp4xx/ixp4xx-qmgr.c:174:38: sparse: sparse: dereference of noderef expression
> drivers/soc/ixp4xx/ixp4xx-qmgr.c:174:44: sparse: sparse: dereference of noderef expression
I've sent a fix for this bug in the soc driver, and applied it to the
arm/fixes tree.
> arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
> arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
> arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '__iomem' of expression
> arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '__iomem' of expression
This is a bug in the h8300 architecture code. I have given up fixing
any of the nommu
targets. If anyone wants to send the trivial fix, please go ahead.
Arnd
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-03 8:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-03 7:01 [linux-next:pending-fixes 192/251] drivers/soc/ixp4xx/ixp4xx-qmgr.c:149:37: sparse: sparse: dereference of noderef expression kernel test robot
2021-08-03 8:19 ` Arnd Bergmann
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).