[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202203201851.iT6RBOWK-lkp@intel.com>
Date: Sun, 20 Mar 2022 18:47:58 +0800
From: kernel test robot <lkp@...el.com>
To: Michael Chan <michael.chan@...adcom.com>, davem@...emloft.net
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
netdev@...r.kernel.org, kuba@...nel.org, gospo@...adcom.com
Subject: Re: [PATCH net-next 10/11] bnxt: support transmit and free of
aggregation buffers
Hi Michael,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Michael-Chan/bnxt-Support-XDP-multi-buffer/20220320-150017
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 092d992b76ed9d06389af0bc5efd5279d7b1ed9f
config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20220320/202203201851.iT6RBOWK-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 85e9b2687a13d1908aa86d1b89c5ce398a06cd39)
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/0day-ci/linux/commit/01029de5d079c1271b0cdd6f64a6ee7132b1872f
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Michael-Chan/bnxt-Support-XDP-multi-buffer/20220320-150017
git checkout 01029de5d079c1271b0cdd6f64a6ee7132b1872f
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/ethernet/broadcom/bnxt/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c:203:6: warning: variable 'shinfo' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (xdp)
^~~
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c:206:18: note: uninitialized use occurs here
for (i = 0; i < shinfo->nr_frags; i++) {
^~~~~~
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c:203:2: note: remove the 'if' if its condition is always true
if (xdp)
^~~~~~~~
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c:200:32: note: initialize the variable 'shinfo' to silence this warning
struct skb_shared_info *shinfo;
^
= NULL
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c:291:36: warning: variable 'mapping' is uninitialized when used here [-Wuninitialized]
dma_unmap_page_attrs(&pdev->dev, mapping,
^~~~~~~
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c:225:20: note: initialize the variable 'mapping' to silence this warning
dma_addr_t mapping;
^
= 0
2 warnings generated.
vim +203 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
196
197 void bnxt_xdp_buff_frags_free(struct bnxt_rx_ring_info *rxr,
198 struct xdp_buff *xdp)
199 {
200 struct skb_shared_info *shinfo;
201 int i;
202
> 203 if (xdp)
204 shinfo = xdp_get_shared_info_from_buff(xdp);
205
206 for (i = 0; i < shinfo->nr_frags; i++) {
207 struct page *page = skb_frag_page(&shinfo->frags[i]);
208
209 page_pool_recycle_direct(rxr->page_pool, page);
210 }
211 shinfo->nr_frags = 0;
212 }
213
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists