[<prev] [next>] [day] [month] [year] [list]
Message-ID: <5c931c7c-323f-8a84-103f-7fa2cbede773@intel.com>
Date: Mon, 30 May 2022 11:39:06 +0800
From: kernel test robot <yujie.liu@...el.com>
To: Arkadiusz Kubalewski <arkadiusz.kubalewski@...el.com>
CC: <llvm@...ts.linux.dev>, <kbuild-all@...ts.01.org>,
"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
Tony Nguyen <anthony.l.nguyen@...el.com>,
Aleksandr Loktionov <aleksandr.loktionov@...el.com>
Subject: drivers/net/ethernet/intel/i40e/i40e_main.c:4643:2: warning: Value
stored to 'pf_q' is never read [clang-analyzer-deadcode.DeadStores]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7f50d4dfe816dd916a7cbf39039674825c2b388b
commit: 65662a8dcdd01342b71ee44234bcfd0162e195af i40e: Fix logic of disabling queues
date: 10 months ago
config: arm-randconfig-c002-20220522 (https://download.01.org/0day-ci/archive/20220527/202205271213.1X7QjLjM-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 1443dbaba6f0e57be066995db9164f89fb57b413)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=65662a8dcdd01342b71ee44234bcfd0162e195af
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 65662a8dcdd01342b71ee44234bcfd0162e195af
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <yujie.liu@...el.com>
clang-analyzer warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/intel/i40e/i40e_main.c:4643:2: warning: Value stored to 'pf_q' is never read [clang-analyzer-deadcode.DeadStores]
pf_q = vsi->base_queue;
^ ~~~~~~~~~~~~~~~
vim +/pf_q +4643 drivers/net/ethernet/intel/i40e/i40e_main.c
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4616
3aa7b74dbeedfb Filip Sadowski 2016-10-11 4617 /**
3aa7b74dbeedfb Filip Sadowski 2016-10-11 4618 * i40e_vsi_stop_rings - Stop a VSI's rings
3aa7b74dbeedfb Filip Sadowski 2016-10-11 4619 * @vsi: the VSI being configured
3aa7b74dbeedfb Filip Sadowski 2016-10-11 4620 **/
3aa7b74dbeedfb Filip Sadowski 2016-10-11 4621 void i40e_vsi_stop_rings(struct i40e_vsi *vsi)
3aa7b74dbeedfb Filip Sadowski 2016-10-11 4622 {
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4623 struct i40e_pf *pf = vsi->back;
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4624 int pf_q, err, q_end;
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4625
3480756f2cb93c Jacob Keller 2017-04-13 4626 /* When port TX is suspended, don't wait */
0da36b9774cc24 Jacob Keller 2017-04-19 4627 if (test_bit(__I40E_PORT_SUSPENDED, vsi->back->state))
3480756f2cb93c Jacob Keller 2017-04-13 4628 return i40e_vsi_stop_rings_no_wait(vsi);
3480756f2cb93c Jacob Keller 2017-04-13 4629
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4630 q_end = vsi->base_queue + vsi->num_queue_pairs;
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4631 for (pf_q = vsi->base_queue; pf_q < q_end; pf_q++)
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4632 i40e_pre_tx_queue_cfg(&pf->hw, (u32)pf_q, false);
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4633
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4634 for (pf_q = vsi->base_queue; pf_q < q_end; pf_q++) {
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4635 err = i40e_control_wait_rx_q(pf, pf_q, false);
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4636 if (err)
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4637 dev_info(&pf->pdev->dev,
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4638 "VSI seid %d Rx ring %d dissable timeout\n",
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4639 vsi->seid, pf_q);
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4640 }
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4641
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4642 msleep(I40E_DISABLE_TX_GAP_MSEC);
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 @4643 pf_q = vsi->base_queue;
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 @4644 for (pf_q = vsi->base_queue; pf_q < q_end; pf_q++)
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4645 wr32(&pf->hw, I40E_QTX_ENA(pf_q), 0);
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4646
65662a8dcdd013 Arkadiusz Kubalewski 2021-04-29 4647 i40e_vsi_wait_queues_disabled(vsi);
3aa7b74dbeedfb Filip Sadowski 2016-10-11 4648 }
3aa7b74dbeedfb Filip Sadowski 2016-10-11 4649
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists