netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Michael Chan <michael.chan@broadcom.com>, davem@davemloft.net
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	netdev@vger.kernel.org, kuba@kernel.org, gospo@broadcom.com
Subject: Re: [PATCH net-next 10/11] bnxt: support transmit and free of aggregation buffers
Date: Sun, 20 Mar 2022 18:47:58 +0800	[thread overview]
Message-ID: <202203201851.iT6RBOWK-lkp@intel.com> (raw)
In-Reply-To: <1647759473-2414-11-git-send-email-michael.chan@broadcom.com>

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@intel.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

  reply	other threads:[~2022-03-20 10:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-20  6:57 [PATCH net-next 00/11] bnxt: Support XDP multi buffer Michael Chan
2022-03-20  6:57 ` [PATCH net-next 01/11] bnxt: refactor bnxt_rx_xdp to separate xdp_init_buff/xdp_prepare_buff Michael Chan
2022-03-20  9:47   ` kernel test robot
2022-03-20  6:57 ` [PATCH net-next 02/11] bnxt: add flag to denote that an xdp program is currently attached Michael Chan
2022-03-20  6:57 ` [PATCH net-next 03/11] bnxt: refactor bnxt_rx_pages operate on skb_shared_info Michael Chan
2022-03-20  6:57 ` [PATCH net-next 04/11] bnxt: rename bnxt_rx_pages to bnxt_rx_agg_pages_skb Michael Chan
2022-03-20  6:57 ` [PATCH net-next 05/11] bnxt: adding bnxt_rx_agg_pages_xdp for aggregated xdp Michael Chan
2022-03-20  6:57 ` [PATCH net-next 06/11] bnxt: set xdp_buff pfmemalloc flag if needed Michael Chan
2022-03-20  6:57 ` [PATCH net-next 07/11] bnxt: change receive ring space parameters Michael Chan
2022-03-20  6:57 ` [PATCH net-next 08/11] bnxt: add page_pool support for aggregation ring when using xdp Michael Chan
2022-03-20  6:57 ` [PATCH net-next 09/11] bnxt: adding bnxt_xdp_build_skb to build skb from multibuffer xdp_buff Michael Chan
2022-03-20  6:57 ` [PATCH net-next 10/11] bnxt: support transmit and free of aggregation buffers Michael Chan
2022-03-20 10:47   ` kernel test robot [this message]
2022-03-20  6:57 ` [PATCH net-next 11/11] bnxt: XDP multibuffer enablement Michael Chan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202203201851.iT6RBOWK-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@broadcom.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).