* [linux-next:master 1888/2932] drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c:220:35: warning: variable 'hwvf' is uninitialized when used here
@ 2021-07-22 13:27 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-07-22 13:27 UTC (permalink / raw)
To: Subbaraya Sundeep
Cc: clang-built-linux, kbuild-all, Linux Memory Management List,
Sunil Kovvuri Goutham
[-- Attachment #1: Type: text/plain, Size: 8176 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 7468cbf5c917ec48c66b0dd157b306f36345cab8
commit: 23109f8dd06d0bd04c9360cf7c501c97b0ab1545 [1888/2932] octeontx2-af: Introduce internal packet switching
config: riscv-randconfig-r012-20210722 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9625ca5b602616b2f5584e8a49ba93c52c141e40)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=23109f8dd06d0bd04c9360cf7c501c97b0ab1545
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 23109f8dd06d0bd04c9360cf7c501c97b0ab1545
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c:8:
In file included from drivers/net/ethernet/marvell/octeontx2/af/rvu.h:14:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c:8:
In file included from drivers/net/ethernet/marvell/octeontx2/af/rvu.h:14:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c:8:
In file included from drivers/net/ethernet/marvell/octeontx2/af/rvu.h:14:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c:220:35: warning: variable 'hwvf' is uninitialized when used here [-Wuninitialized]
for (vf = 0; vf < numvfs; vf++, hwvf++) {
^~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c:201:26: note: initialize the variable 'hwvf' to silence this warning
int pf, vf, numvfs, hwvf;
^
= 0
>> drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c:220:21: warning: variable 'numvfs' is uninitialized when used here [-Wuninitialized]
for (vf = 0; vf < numvfs; vf++, hwvf++) {
^~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c:201:20: note: initialize the variable 'numvfs' to silence this warning
int pf, vf, numvfs, hwvf;
^
= 0
9 warnings generated.
vim +/hwvf +220 drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c
194
195 void rvu_switch_disable(struct rvu *rvu)
196 {
197 struct npc_delete_flow_req uninstall_req = { 0 };
198 struct npc_mcam_free_entry_req free_req = { 0 };
199 struct rvu_switch *rswitch = &rvu->rswitch;
200 struct rvu_hwinfo *hw = rvu->hw;
201 int pf, vf, numvfs, hwvf;
202 struct msg_rsp rsp;
203 u16 pcifunc;
204 int err;
205
206 if (!rswitch->used_entries)
207 return;
208
209 for (pf = 1; pf < hw->total_pfs; pf++) {
210 if (!is_pf_cgxmapped(rvu, pf))
211 continue;
212
213 pcifunc = pf << 10;
214 err = rvu_switch_install_rx_rule(rvu, pcifunc, 0xFFF);
215 if (err)
216 dev_err(rvu->dev,
217 "Reverting RX rule for PF%d failed(%d)\n",
218 pf, err);
219
> 220 for (vf = 0; vf < numvfs; vf++, hwvf++) {
221 pcifunc = pf << 10 | ((vf + 1) & 0x3FF);
222 err = rvu_switch_install_rx_rule(rvu, pcifunc, 0xFFF);
223 if (err)
224 dev_err(rvu->dev,
225 "Reverting RX rule for PF%dVF%d failed(%d)\n",
226 pf, vf, err);
227 }
228 }
229
230 uninstall_req.start = rswitch->start_entry;
231 uninstall_req.end = rswitch->start_entry + rswitch->used_entries - 1;
232 free_req.all = 1;
233 rvu_mbox_handler_npc_delete_flow(rvu, &uninstall_req, &rsp);
234 rvu_mbox_handler_npc_mcam_free_entry(rvu, &free_req, &rsp);
235 rswitch->used_entries = 0;
236 kfree(rswitch->entry2pcifunc);
237 }
238
---
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: 39841 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-22 13:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-22 13:27 [linux-next:master 1888/2932] drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c:220:35: warning: variable 'hwvf' is uninitialized when used here kernel test robot
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).