* [arm-platforms:hack/vim3l-crap 2/5] drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:27:8: warning: Variable 'value' is reassigned a value before the old one has been used. [redundantAssignment]
@ 2020-04-09 6:25 ` kbuild test robot
0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2020-04-09 6:25 UTC (permalink / raw)
To: Marc Zyngier; +Cc: kbuild-all, linux-arm-kernel
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git hack/vim3l-crap
head: bdf08c52d4aaabc11f0b83dce15decda3fa67537
commit: afc99f4ddd4f97fb3af4dedca81a3a50451f85d0 [2/5] dwmac: workaround random DMA reset failures
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:27:8: warning: Variable 'value' is reassigned a value before the old one has been used. [redundantAssignment]
value = DMA_BUS_MODE_SFT_RESET;
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:24:8: note: value is assigned
value = readl(ioaddr + DMA_BUS_MODE);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:27:8: note: value is overwritten
value = DMA_BUS_MODE_SFT_RESET;
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:21:19: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(0, ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:22:19: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(0, ioaddr + DMA_INTR_ENA);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:24:23: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
value = readl(ioaddr + DMA_BUS_MODE);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:28:23: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(value, ioaddr + DMA_BUS_MODE);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:32:35: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
while (readl_poll_timeout(ioaddr + DMA_BUS_MODE, value,
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:43:19: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(1, ioaddr + DMA_XMT_POLL_DEMAND);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:48:27: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 value = readl(ioaddr + DMA_INTR_ENA);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:55:23: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(value, ioaddr + DMA_INTR_ENA);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:60:27: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 value = readl(ioaddr + DMA_INTR_ENA);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:67:23: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(value, ioaddr + DMA_INTR_ENA);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:72:27: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 value = readl(ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:74:23: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(value, ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:79:27: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 value = readl(ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:81:23: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(value, ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:86:27: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 value = readl(ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:88:23: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(value, ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:93:27: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 value = readl(ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:95:23: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(value, ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:173:33: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 intr_status = readl(ioaddr + DMA_STATUS);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:214:29: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 value = readl(ioaddr + DMA_INTR_ENA);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:234:41: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel((intr_status & 0x1ffff), ioaddr + DMA_STATUS);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:241:26: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 csr6 = readl(ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:242:42: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel((csr6 | DMA_CONTROL_FTF), ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:244:29: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
do {} while ((readl(ioaddr + DMA_CONTROL) & DMA_CONTROL_FTF));
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:257:39: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(data | GMAC_HI_REG_AE, ioaddr + high);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:259:22: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(data, ioaddr + low);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:266:27: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 value = readl(ioaddr + MAC_CTRL_REG);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:273:23: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(value, ioaddr + MAC_CTRL_REG);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:282:25: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
hi_addr = readl(ioaddr + high);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:283:25: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
lo_addr = readl(ioaddr + low);
^
vim +/value +27 drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c
15
16 int dwmac_dma_reset(void __iomem *ioaddr)
17 {
18 u32 value;
19
20
21 writel(0, ioaddr + DMA_CONTROL);
22 writel(0, ioaddr + DMA_INTR_ENA);
23 dsb(sy);
24 value = readl(ioaddr + DMA_BUS_MODE);
25
26 /* DMA SW reset */
> 27 value = DMA_BUS_MODE_SFT_RESET;
28 writel(value, ioaddr + DMA_BUS_MODE);
29
30 dsb(sy);
31
32 while (readl_poll_timeout(ioaddr + DMA_BUS_MODE, value,
33 !(value & DMA_BUS_MODE_SFT_RESET),
34 100000, 1000000))
35 pr_info("Reset failed\n");
36
37 return 0;
38 }
39
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [arm-platforms:hack/vim3l-crap 2/5] drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:27:8: warning: Variable 'value' is reassigned a value before the old one has been used. [redundantAssignment]
@ 2020-04-09 6:25 ` kbuild test robot
0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2020-04-09 6:25 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 10043 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git hack/vim3l-crap
head: bdf08c52d4aaabc11f0b83dce15decda3fa67537
commit: afc99f4ddd4f97fb3af4dedca81a3a50451f85d0 [2/5] dwmac: workaround random DMA reset failures
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:27:8: warning: Variable 'value' is reassigned a value before the old one has been used. [redundantAssignment]
value = DMA_BUS_MODE_SFT_RESET;
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:24:8: note: value is assigned
value = readl(ioaddr + DMA_BUS_MODE);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:27:8: note: value is overwritten
value = DMA_BUS_MODE_SFT_RESET;
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:21:19: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(0, ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:22:19: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(0, ioaddr + DMA_INTR_ENA);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:24:23: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
value = readl(ioaddr + DMA_BUS_MODE);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:28:23: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(value, ioaddr + DMA_BUS_MODE);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:32:35: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
while (readl_poll_timeout(ioaddr + DMA_BUS_MODE, value,
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:43:19: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(1, ioaddr + DMA_XMT_POLL_DEMAND);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:48:27: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 value = readl(ioaddr + DMA_INTR_ENA);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:55:23: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(value, ioaddr + DMA_INTR_ENA);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:60:27: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 value = readl(ioaddr + DMA_INTR_ENA);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:67:23: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(value, ioaddr + DMA_INTR_ENA);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:72:27: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 value = readl(ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:74:23: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(value, ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:79:27: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 value = readl(ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:81:23: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(value, ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:86:27: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 value = readl(ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:88:23: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(value, ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:93:27: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 value = readl(ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:95:23: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(value, ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:173:33: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 intr_status = readl(ioaddr + DMA_STATUS);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:214:29: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 value = readl(ioaddr + DMA_INTR_ENA);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:234:41: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel((intr_status & 0x1ffff), ioaddr + DMA_STATUS);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:241:26: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 csr6 = readl(ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:242:42: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel((csr6 | DMA_CONTROL_FTF), ioaddr + DMA_CONTROL);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:244:29: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
do {} while ((readl(ioaddr + DMA_CONTROL) & DMA_CONTROL_FTF));
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:257:39: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(data | GMAC_HI_REG_AE, ioaddr + high);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:259:22: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(data, ioaddr + low);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:266:27: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
u32 value = readl(ioaddr + MAC_CTRL_REG);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:273:23: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
writel(value, ioaddr + MAC_CTRL_REG);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:282:25: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
hi_addr = readl(ioaddr + high);
^
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:283:25: warning: 'ioaddr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
lo_addr = readl(ioaddr + low);
^
vim +/value +27 drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c
15
16 int dwmac_dma_reset(void __iomem *ioaddr)
17 {
18 u32 value;
19
20
21 writel(0, ioaddr + DMA_CONTROL);
22 writel(0, ioaddr + DMA_INTR_ENA);
23 dsb(sy);
24 value = readl(ioaddr + DMA_BUS_MODE);
25
26 /* DMA SW reset */
> 27 value = DMA_BUS_MODE_SFT_RESET;
28 writel(value, ioaddr + DMA_BUS_MODE);
29
30 dsb(sy);
31
32 while (readl_poll_timeout(ioaddr + DMA_BUS_MODE, value,
33 !(value & DMA_BUS_MODE_SFT_RESET),
34 100000, 1000000))
35 pr_info("Reset failed\n");
36
37 return 0;
38 }
39
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-09 6:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-09 6:25 [arm-platforms:hack/vim3l-crap 2/5] drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c:27:8: warning: Variable 'value' is reassigned a value before the old one has been used. [redundantAssignment] kbuild test robot
2020-04-09 6:25 ` kbuild test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.