[xlnx:master 59/60] drivers/net/ethernet/xilinx/xilinx_axienet.h:916:2: warning: 'pmap' may be used uninitialized in this function
kernel test robot
lkp at intel.com
Thu Feb 25 23:15:23 EST 2021
tree: https://github.com/Xilinx/linux-xlnx master
head: 043f8a226a752a1dd11f7ff64cee6dbe7334d394
commit: c0b33b8ccd38096c815f2dd39746044d0aa079d3 [59/60] staging: xlnxsync: Fix the uapi header license
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
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
# https://github.com/Xilinx/linux-xlnx/commit/c0b33b8ccd38096c815f2dd39746044d0aa079d3
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx master
git checkout c0b33b8ccd38096c815f2dd39746044d0aa079d3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
In file included from arch/m68k/include/asm/io_mm.h:25,
from arch/m68k/include/asm/io.h:8,
from include/linux/scatterlist.h:9,
from include/linux/dma-mapping.h:11,
from include/linux/skbuff.h:31,
from include/linux/if_ether.h:19,
from include/uapi/linux/ethtool.h:19,
from include/linux/ethtool.h:18,
from include/linux/netdevice.h:37,
from drivers/net/ethernet/xilinx/xilinx_axienet.h:12,
from drivers/net/ethernet/xilinx/xilinx_tsn_switch.h:21,
from drivers/net/ethernet/xilinx/xilinx_tsn_switch.c:18:
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used [-Wunused-but-set-variable]
83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8'
430 | rom_out_8(port, *buf++);
| ^~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro 'rom_out_be16'
448 | rom_out_be16(port, *buf++);
| ^~~~~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro 'rom_out_le16'
466 | rom_out_le16(port, *buf++);
| ^~~~~~~~~~~~
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:24,
from drivers/net/ethernet/xilinx/xilinx_axienet.h:12,
from drivers/net/ethernet/xilinx/xilinx_tsn_switch.h:21,
from drivers/net/ethernet/xilinx/xilinx_tsn_switch.c:18:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/ktime.h:24,
from include/linux/timer.h:6,
from include/linux/netdevice.h:24,
from drivers/net/ethernet/xilinx/xilinx_axienet.h:12,
from drivers/net/ethernet/xilinx/xilinx_tsn_switch.h:21,
from drivers/net/ethernet/xilinx/xilinx_tsn_switch.c:18:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/asm-generic/bug.h:139:27: note: in definition of macro 'WARN_ON_ONCE'
139 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/dma-mapping.h:355:19: note: in expansion of macro 'pfn_valid'
355 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
In file included from drivers/net/ethernet/xilinx/xilinx_tsn_switch.h:21,
from drivers/net/ethernet/xilinx/xilinx_tsn_switch.c:18:
drivers/net/ethernet/xilinx/xilinx_tsn_switch.c: In function 'tsnswitch_probe':
>> drivers/net/ethernet/xilinx/xilinx_axienet.h:916:2: warning: 'pmap' may be used uninitialized in this function [-Wmaybe-uninitialized]
916 | iowrite32(value, lp->regs + offset);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/xilinx/xilinx_tsn_switch.c:723:6: note: 'pmap' was declared here
723 | u32 pmap;
| ^~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for NEED_MULTIPLE_NODES
Depends on DISCONTIGMEM || NUMA
Selected by
- SINGLE_MEMORY_CHUNK && MMU
vim +/pmap +916 drivers/net/ethernet/xilinx/xilinx_axienet.h
882119ff969da4 Kurt Kanzenbach 2019-05-19 903
8a3b7a252dca9f Daniel Borkmann 2012-01-19 904 /**
8a3b7a252dca9f Daniel Borkmann 2012-01-19 905 * axienet_iow - Memory mapped Axi Ethernet register write
8a3b7a252dca9f Daniel Borkmann 2012-01-19 906 * @lp: Pointer to axienet local structure
8a3b7a252dca9f Daniel Borkmann 2012-01-19 907 * @offset: Address offset from the base address of Axi Ethernet core
8a3b7a252dca9f Daniel Borkmann 2012-01-19 908 * @value: Value to be written into the Axi Ethernet register
8a3b7a252dca9f Daniel Borkmann 2012-01-19 909 *
8a3b7a252dca9f Daniel Borkmann 2012-01-19 910 * This function writes the desired value into the corresponding Axi Ethernet
8a3b7a252dca9f Daniel Borkmann 2012-01-19 911 * register.
8a3b7a252dca9f Daniel Borkmann 2012-01-19 912 */
8a3b7a252dca9f Daniel Borkmann 2012-01-19 913 static inline void axienet_iow(struct axienet_local *lp, off_t offset,
8a3b7a252dca9f Daniel Borkmann 2012-01-19 914 u32 value)
8a3b7a252dca9f Daniel Borkmann 2012-01-19 915 {
d85f5f3e4eb383 Robert Hancock 2019-06-06 @916 iowrite32(value, lp->regs + offset);
8a3b7a252dca9f Daniel Borkmann 2012-01-19 917 }
8a3b7a252dca9f Daniel Borkmann 2012-01-19 918
:::::: The code at line 916 was first introduced by commit
:::::: d85f5f3e4eb38300642d2b54c5740b351c0bdcc5 net: axienet: Use standard IO accessors
:::::: TO: Robert Hancock <hancock at sedsystems.ca>
:::::: CC: David S. Miller <davem at davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 52173 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210226/955bda98/attachment-0001.gz>
More information about the linux-arm-kernel
mailing list