All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/net/ethernet/intel/i40e/i40e_main.c:4643:2: warning: Value stored to 'pf_q' is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-01-03 18:08 kernel test robot
  2022-01-07  3:05   ` kernel test robot
  0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2022-01-03 18:08 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 17067 bytes --]

CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
CC: Tony Nguyen <anthony.l.nguyen@intel.com>
CC: Aleksandr Loktionov <aleksandr.loktionov@intel.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c9e6606c7fe92b50a02ce51dda82586ebdf99b48
commit: 65662a8dcdd01342b71ee44234bcfd0162e195af i40e: Fix logic of disabling queues
date:   5 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 5 months ago
config: x86_64-randconfig-c007-20220101 (https://download.01.org/0day-ci/archive/20220104/202201040200.QGI49OIz-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c054402170cd8466683a20385befc0523aba3359)
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://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 to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


clang-analyzer warnings: (new ones prefixed by >>)
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/ssb/main.c:899:8: note: 'plltype' is equal to SSB_PLLTYPE_1
                   if ((plltype == SSB_PLLTYPE_1) ||
                        ^~~~~~~
   drivers/ssb/main.c:899:34: note: Left side of '||' is true
                   if ((plltype == SSB_PLLTYPE_1) ||
                                                  ^
   drivers/ssb/main.c:904:8: note: Calling 'clkfactor_f6_resolve'
                   m3 = clkfactor_f6_resolve(m3);
                        ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/ssb/main.c:828:2: note: 'Default' branch taken. Execution continues on line 842
           switch (v) {
           ^
   drivers/ssb/main.c:842:2: note: Returning zero
           return 0;
           ^~~~~~~~
   drivers/ssb/main.c:904:8: note: Returning from 'clkfactor_f6_resolve'
                   m3 = clkfactor_f6_resolve(m3);
                        ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/ssb/main.c:904:3: note: The value 0 is assigned to 'm3'
                   m3 = clkfactor_f6_resolve(m3);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/ssb/main.c:906:3: note: Control jumps to 'case 1:'  at line 913
                   switch (mc) {
                   ^
   drivers/ssb/main.c:914:18: note: Division by zero
                           return (clock / (m1 * m2 * m3));
                                   ~~~~~~^~~~~~~~~~~~~~~~
   drivers/ssb/main.c:916:18: warning: Division by zero [clang-analyzer-core.DivideZero]
                           return (clock / (m1 * m3));
                                   ~~~~~~^~~~~~~~~~~
   drivers/ssb/main.c:853:2: note: Control jumps to 'case 65536:'  at line 858
           switch (plltype) {
           ^
   drivers/ssb/main.c:864:3: note:  Execution continues on line 877
                   break;
                   ^
   drivers/ssb/main.c:877:2: note: Control jumps to the 'default' case at line 882
           switch (plltype) {
           ^
   drivers/ssb/main.c:885:6: note: Assuming 'clock' is not equal to 0
           if (!clock)
               ^~~~~~
   drivers/ssb/main.c:885:2: note: Taking false branch
           if (!clock)
           ^
   drivers/ssb/main.c:893:2: note: Control jumps to 'case 65536:'  at line 894
           switch (plltype) {
           ^
   drivers/ssb/main.c:898:8: note: Calling 'clkfactor_f6_resolve'
                   m1 = clkfactor_f6_resolve(m1);
                        ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/ssb/main.c:828:2: note: 'Default' branch taken. Execution continues on line 842
           switch (v) {
           ^
   drivers/ssb/main.c:842:2: note: Returning zero
           return 0;
           ^~~~~~~~
   drivers/ssb/main.c:898:8: note: Returning from 'clkfactor_f6_resolve'
                   m1 = clkfactor_f6_resolve(m1);
                        ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/ssb/main.c:898:3: note: The value 0 is assigned to 'm1'
                   m1 = clkfactor_f6_resolve(m1);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/ssb/main.c:899:8: note: 'plltype' is equal to SSB_PLLTYPE_1
                   if ((plltype == SSB_PLLTYPE_1) ||
                        ^~~~~~~
   drivers/ssb/main.c:899:34: note: Left side of '||' is true
                   if ((plltype == SSB_PLLTYPE_1) ||
                                                  ^
   drivers/ssb/main.c:904:8: note: Calling 'clkfactor_f6_resolve'
                   m3 = clkfactor_f6_resolve(m3);
                        ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/ssb/main.c:828:2: note: 'Default' branch taken. Execution continues on line 842
           switch (v) {
           ^
   drivers/ssb/main.c:842:2: note: Returning zero
           return 0;
           ^~~~~~~~
   drivers/ssb/main.c:904:8: note: Returning from 'clkfactor_f6_resolve'
                   m3 = clkfactor_f6_resolve(m3);
                        ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/ssb/main.c:904:3: note: The value 0 is assigned to 'm3'
                   m3 = clkfactor_f6_resolve(m3);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/ssb/main.c:906:3: note: Control jumps to 'case 17:'  at line 915
                   switch (mc) {
                   ^
   drivers/ssb/main.c:916:18: note: Division by zero
                           return (clock / (m1 * m3));
                                   ~~~~~~^~~~~~~~~~~
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   9 warnings generated.
   Suppressed 9 warnings (9 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   10 warnings generated.
   Suppressed 10 warnings (10 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   26 warnings generated.
>> 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;
           ^      ~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:4643:2: note: Value stored to 'pf_q' is never read
           pf_q = vsi->base_queue;
           ^      ~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:7949:3: warning: Value stored to 'need_reset' is never read [clang-analyzer-deadcode.DeadStores]
                   need_reset = false;
                   ^            ~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:7949:3: note: Value stored to 'need_reset' is never read
                   need_reset = false;
                   ^            ~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:9179:6: warning: Value stored to 'queue' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           u32 queue = le32_to_cpu(data->prtdcb_rupto);
               ^~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:9179:6: note: Value stored to 'queue' during its initialization is never read
           u32 queue = le32_to_cpu(data->prtdcb_rupto);
               ^~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:9828:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                           ret = i40e_vc_process_vf_msg(pf,
                           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:9828:4: note: Value stored to 'ret' is never read
                           ret = i40e_vc_process_vf_msg(pf,
                           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:10707:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                   ret = i40e_setup_misc_vector(pf);
                   ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:10707:3: note: Value stored to 'ret' is never read
                   ret = i40e_setup_misc_vector(pf);
                   ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:14131:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                   ret = i40e_vsi_config_rss(vsi);
                   ^     ~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:14131:3: note: Value stored to 'ret' is never read
                   ret = i40e_vsi_config_rss(vsi);
                   ^     ~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 20 warnings (20 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   15 warnings generated.
   drivers/net/ethernet/intel/i40e/i40e_ethtool.c:2716:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                           ret = i40e_led_get_phy(hw, &temp_status,
                           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_ethtool.c:2716:4: note: Value stored to 'ret' is never read
                           ret = i40e_led_get_phy(hw, &temp_status,
                           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 14 warnings (14 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   sound/soc/intel/atom/sst/sst_acpi.c:315:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
           strcpy(ctx->firmware_name, mach->fw_filename);
           ^~~~~~
   sound/soc/intel/atom/sst/sst_acpi.c:315:2: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
           strcpy(ctx->firmware_name, mach->fw_filename);
           ^~~~~~
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   5 warnings generated.
   include/linux/list.h:135:13: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]
           __list_del(entry->prev, entry->next);
                      ^
   sound/virtio/virtio_ctl_msg.c:238:2: note: Loop condition is false.  Exiting loop
           spin_lock_irqsave(&queue->lock, flags);
           ^
   include/linux/spinlock.h:384:2: note: expanded from macro 'spin_lock_irqsave'
           raw_spin_lock_irqsave(spinlock_check(lock), flags);     \
           ^
   include/linux/spinlock.h:250:2: note: expanded from macro 'raw_spin_lock_irqsave'
           do {                                            \
           ^
   sound/virtio/virtio_ctl_msg.c:238:2: note: Loop condition is false.  Exiting loop
           spin_lock_irqsave(&queue->lock, flags);
           ^
   include/linux/spinlock.h:382:43: note: expanded from macro 'spin_lock_irqsave'
   #define spin_lock_irqsave(lock, flags)                          \
                                                                   ^
   sound/virtio/virtio_ctl_msg.c:239:2: note: Loop condition is true.  Entering loop body
           while (!list_empty(&snd->ctl_msgs)) {

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, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

* drivers/net/ethernet/intel/i40e/i40e_main.c:4643:2: warning: Value stored to 'pf_q' is never read [clang-analyzer-deadcode.DeadStores]
  2022-01-03 18:08 drivers/net/ethernet/intel/i40e/i40e_main.c:4643:2: warning: Value stored to 'pf_q' is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
@ 2022-01-07  3:05   ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2022-01-07  3:05 UTC (permalink / raw)
  To: Arkadiusz Kubalewski
  Cc: llvm, kbuild-all, Linux Kernel Mailing List, Tony Nguyen,
	Aleksandr Loktionov

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c9e6606c7fe92b50a02ce51dda82586ebdf99b48
commit: 65662a8dcdd01342b71ee44234bcfd0162e195af i40e: Fix logic of disabling queues
date:   5 months ago
config: x86_64-randconfig-c007-20220101 (https://download.01.org/0day-ci/archive/20220104/202201040200.QGI49OIz-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c054402170cd8466683a20385befc0523aba3359)
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://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 to linux build tree
         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.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, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

* drivers/net/ethernet/intel/i40e/i40e_main.c:4643:2: warning: Value stored to 'pf_q' is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-01-07  3:05   ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2022-01-07  3:05 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4482 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c9e6606c7fe92b50a02ce51dda82586ebdf99b48
commit: 65662a8dcdd01342b71ee44234bcfd0162e195af i40e: Fix logic of disabling queues
date:   5 months ago
config: x86_64-randconfig-c007-20220101 (https://download.01.org/0day-ci/archive/20220104/202201040200.QGI49OIz-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c054402170cd8466683a20385befc0523aba3359)
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://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 to linux build tree
         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.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, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

* drivers/net/ethernet/intel/i40e/i40e_main.c:4643:2: warning: Value stored to 'pf_q' is never read [clang-analyzer-deadcode.DeadStores]
  2022-05-27  4:31 kernel test robot
@ 2022-05-30  3:39 ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2022-05-30  3:39 UTC (permalink / raw)
  To: Arkadiusz Kubalewski
  Cc: llvm, kbuild-all, Linux Kernel Mailing List, Tony Nguyen,
	Aleksandr Loktionov

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* drivers/net/ethernet/intel/i40e/i40e_main.c:4643:2: warning: Value stored to 'pf_q' is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-05-27  4:31 kernel test robot
  2022-05-30  3:39 ` kernel test robot
  0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2022-05-27  4:31 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 18268 bytes --]

CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
CC: Tony Nguyen <anthony.l.nguyen@intel.com>
CC: Aleksandr Loktionov <aleksandr.loktionov@intel.com>

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
:::::: branch date: 4 hours ago
:::::: commit date: 10 months ago
config: arm-randconfig-c002-20220522 (https://download.01.org/0day-ci/archive/20220527/202205271213.1X7QjLjM-lkp(a)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 <lkp@intel.com>


clang-analyzer warnings: (new ones prefixed by >>)
               ^~~~~~~~~~~~~~~
   drivers/net/ethernet/cisco/enic/vnic_dev.c:1215:2: note: Taking false branch
           if (cmd == CLSF_ADD) {
           ^
   drivers/net/ethernet/cisco/enic/vnic_dev.c:1244:13: note: Assuming 'cmd' is equal to CLSF_DEL
           } else if (cmd == CLSF_DEL) {
                      ^~~~~~~~~~~~~~~
   drivers/net/ethernet/cisco/enic/vnic_dev.c:1244:9: note: Taking true branch
           } else if (cmd == CLSF_DEL) {
                  ^
   drivers/net/ethernet/cisco/enic/vnic_dev.c:1246:9: note: Calling 'vnic_dev_cmd'
                   ret = vnic_dev_cmd(vdev, CMD_DEL_FILTER, &a0, &a1, wait);
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/cisco/enic/vnic_dev.c:522:2: note: Control jumps to 'case PROXY_NONE:'  at line 529
           switch (vdev->proxy) {
           ^
   drivers/net/ethernet/cisco/enic/vnic_dev.c:531:10: note: Calling 'vnic_dev_cmd_no_proxy'
                   return vnic_dev_cmd_no_proxy(vdev, cmd, a0, a1, wait);
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/cisco/enic/vnic_dev.c:495:16: note: Assigned value is garbage or undefined
           vdev->args[1] = *a1;
                         ^ ~~~
   Suppressed 7 warnings (7 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   7 warnings generated.
   Suppressed 7 warnings (7 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   7 warnings generated.
   Suppressed 7 warnings (7 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   8 warnings generated.
   Suppressed 8 warnings (8 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   8 warnings generated.
   Suppressed 8 warnings (8 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   8 warnings generated.
   Suppressed 8 warnings (8 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   8 warnings generated.
   Suppressed 8 warnings (8 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   8 warnings generated.
   Suppressed 8 warnings (8 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   18 warnings generated.
>> 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;
           ^      ~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:4643:2: note: Value stored to 'pf_q' is never read
           pf_q = vsi->base_queue;
           ^      ~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:7949:3: warning: Value stored to 'need_reset' is never read [clang-analyzer-deadcode.DeadStores]
                   need_reset = false;
                   ^            ~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:7949:3: note: Value stored to 'need_reset' is never read
                   need_reset = false;
                   ^            ~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:9179:6: warning: Value stored to 'queue' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           u32 queue = le32_to_cpu(data->prtdcb_rupto);
               ^~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:9179:6: note: Value stored to 'queue' during its initialization is never read
           u32 queue = le32_to_cpu(data->prtdcb_rupto);
               ^~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:9828:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                           ret = i40e_vc_process_vf_msg(pf,
                           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:9828:4: note: Value stored to 'ret' is never read
                           ret = i40e_vc_process_vf_msg(pf,
                           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:10707:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                   ret = i40e_setup_misc_vector(pf);
                   ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:10707:3: note: Value stored to 'ret' is never read
                   ret = i40e_setup_misc_vector(pf);
                   ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:14131:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                   ret = i40e_vsi_config_rss(vsi);
                   ^     ~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:14131:3: note: Value stored to 'ret' is never read
                   ret = i40e_vsi_config_rss(vsi);
                   ^     ~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 12 warnings (11 in non-user code, 1 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   8 warnings generated.
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:49:39: warning: Dereference of null pointer [clang-analyzer-core.NullDereference]
                           const struct nvkm_vmm_desc *pair = page[-1].desc;
                                                              ^
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:1145:8: note: Assuming  is non-null
           if (!(*pvmm = kzalloc(sizeof(**pvmm), GFP_KERNEL)))
                 ^~~~~
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:1145:2: note: Taking false branch
           if (!(*pvmm = kzalloc(sizeof(**pvmm), GFP_KERNEL)))
           ^
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:1147:9: note: Calling 'nvkm_vmm_ctor'
           return nvkm_vmm_ctor(func, mmu, hdr, managed, addr, size, key, name, *pvmm);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:1051:43: note: Assuming 'key' is null
           __mutex_init(&vmm->mutex, "&vmm->mutex", key ? key : &_key);
                                                    ^~~
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:1051:43: note: '?' condition is false
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:1056:2: note: Loop condition is false. Execution continues on line 1063
           while (page[1].shift)
           ^
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:1063:2: note: Loop condition is false. Execution continues on line 1065
           for (levels = 0, desc = page->desc; desc->bits; desc++, levels++)
           ^
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:1068:6: note: Taking false branch
           if (WARN_ON(levels > NVKM_VMM_LEVELS_MAX))
               ^
   include/asm-generic/bug.h:122:2: note: expanded from macro 'WARN_ON'
           if (unlikely(__ret_warn_on))                                    \
           ^
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:1068:2: note: Taking false branch
           if (WARN_ON(levels > NVKM_VMM_LEVELS_MAX))
           ^
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:1072:41: note: Passing null pointer value via 3rd parameter 'page'
           vmm->pd = nvkm_vmm_pt_new(desc, false, NULL);
                                                  ^
   include/linux/stddef.h:8:14: note: expanded from macro 'NULL'
   #define NULL ((void *)0)
                ^~~~~~~~~~~
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:1072:12: note: Calling 'nvkm_vmm_pt_new'
           vmm->pd = nvkm_vmm_pt_new(desc, false, NULL);
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:47:6: note: Assuming field 'type' is > PGT
           if (desc->type > PGT) {
               ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:47:2: note: Taking true branch
           if (desc->type > PGT) {
           ^
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:48:7: note: Assuming field 'type' is equal to SPT
                   if (desc->type == SPT) {
                       ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:48:3: note: Taking true branch
                   if (desc->type == SPT) {
                   ^
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:49:39: note: Dereference of null pointer
                           const struct nvkm_vmm_desc *pair = page[-1].desc;
                                                              ^~~~~~~~~~~~~
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:535:3: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
                   const u32 ptei = it.pte[0];
                   ^
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:1869:6: note: Assuming 'ret' is not equal to 0
           if (ret)
               ^~~
   drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:1869:2: note: Taking true branch

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* drivers/net/ethernet/intel/i40e/i40e_main.c:4643:2: warning: Value stored to 'pf_q' is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-01-10  4:44 kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2022-01-10  4:44 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 19471 bytes --]

CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
CC: Tony Nguyen <anthony.l.nguyen@intel.com>
CC: Aleksandr Loktionov <aleksandr.loktionov@intel.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   df0cc57e057f18e44dac8e6c18aba47ab53202f9
commit: 65662a8dcdd01342b71ee44234bcfd0162e195af i40e: Fix logic of disabling queues
date:   6 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 6 months ago
config: x86_64-randconfig-c007-20220101 (https://download.01.org/0day-ci/archive/20220110/202201101200.Zy2802DX-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c054402170cd8466683a20385befc0523aba3359)
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://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 to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


clang-analyzer warnings: (new ones prefixed by >>)
   net/nfc/nci/hci.c:620:6: note: Assuming 'conn_info' is non-null
           if (!conn_info)
               ^~~~~~~~~~
   net/nfc/nci/hci.c:620:2: note: Taking false branch
           if (!conn_info)
           ^
   net/nfc/nci/hci.c:633:6: note: Assuming 'r' is not equal to NCI_STATUS_OK
           if (r == NCI_STATUS_OK) {
               ^~~~~~~~~~~~~~~~~~
   net/nfc/nci/hci.c:633:2: note: Taking false branch
           if (r == NCI_STATUS_OK) {
           ^
   net/nfc/nci/hci.c:643:2: note: Returning without writing to '*'
           return r;
           ^
   net/nfc/nci/hci.c:743:6: note: Returning from 'nci_hci_get_param'
           r = nci_hci_get_param(ndev, NCI_HCI_ADMIN_GATE,
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/nfc/nci/hci.c:745:6: note: Assuming 'r' is >= 0
           if (r < 0)
               ^~~~~
   net/nfc/nci/hci.c:745:2: note: Taking false branch
           if (r < 0)
           ^
   net/nfc/nci/hci.c:748:6: note: Access to field 'len' results in a dereference of an undefined pointer value (loaded from variable 'skb')
           if (skb->len &&
               ^~~
   Suppressed 8 warnings (8 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   7 warnings generated.
   Suppressed 7 warnings (7 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   7 warnings generated.
   Suppressed 7 warnings (7 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   5 warnings generated.
   Suppressed 5 warnings (5 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   sound/soc/codecs/cs35l33.c:1161:3: warning: Value stored to 'pdata' is never read [clang-analyzer-deadcode.DeadStores]
                   pdata = &cs35l33->pdata;
                   ^       ~~~~~~~~~~~~~~~
   sound/soc/codecs/cs35l33.c:1161:3: note: Value stored to 'pdata' is never read
                   pdata = &cs35l33->pdata;
                   ^       ~~~~~~~~~~~~~~~
   Suppressed 5 warnings (5 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   5 warnings generated.
   Suppressed 5 warnings (5 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   8 warnings generated.
   sound/soc/codecs/cs42l42.c:581:8: warning: Excessive padding in 'struct cs42l42_pll_params' (4 padding bytes, where 0 is optimal). 
   Optimal fields order: 
   sclk, 
   pll_div_frac, 
   mclk_int, 
   mclk_div, 
   mclk_src_sel, 
   sclk_prediv, 
   pll_div_int, 
   pll_mode, 
   pll_divout, 
   pll_cal_ratio, 
   n, 
   consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
   struct cs42l42_pll_params {
   ~~~~~~~^~~~~~~~~~~~~~~~~~~~
   sound/soc/codecs/cs42l42.c:581:8: note: Excessive padding in 'struct cs42l42_pll_params' (4 padding bytes, where 0 is optimal). Optimal fields order: sclk, pll_div_frac, mclk_int, mclk_div, mclk_src_sel, sclk_prediv, pll_div_int, pll_mode, pll_divout, pll_cal_ratio, n, consider reordering the fields or adding explicit padding members
   struct cs42l42_pll_params {
   ~~~~~~~^~~~~~~~~~~~~~~~~~~~
   sound/soc/codecs/cs42l42.c:1404:28: warning: Value stored to 'component' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct snd_soc_component *component = cs42l42->component;
                                     ^~~~~~~~~   ~~~~~~~~~~~~~~~~~~
   sound/soc/codecs/cs42l42.c:1404:28: note: Value stored to 'component' during its initialization is never read
           struct snd_soc_component *component = cs42l42->component;
                                     ^~~~~~~~~   ~~~~~~~~~~~~~~~~~~
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   9 warnings generated.
   Suppressed 9 warnings (9 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   10 warnings generated.
   Suppressed 10 warnings (10 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   26 warnings generated.
>> 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;
           ^      ~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:4643:2: note: Value stored to 'pf_q' is never read
           pf_q = vsi->base_queue;
           ^      ~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:7949:3: warning: Value stored to 'need_reset' is never read [clang-analyzer-deadcode.DeadStores]
                   need_reset = false;
                   ^            ~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:7949:3: note: Value stored to 'need_reset' is never read
                   need_reset = false;
                   ^            ~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:9179:6: warning: Value stored to 'queue' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           u32 queue = le32_to_cpu(data->prtdcb_rupto);
               ^~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:9179:6: note: Value stored to 'queue' during its initialization is never read
           u32 queue = le32_to_cpu(data->prtdcb_rupto);
               ^~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:9828:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                           ret = i40e_vc_process_vf_msg(pf,
                           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:9828:4: note: Value stored to 'ret' is never read
                           ret = i40e_vc_process_vf_msg(pf,
                           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:10707:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                   ret = i40e_setup_misc_vector(pf);
                   ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:10707:3: note: Value stored to 'ret' is never read
                   ret = i40e_setup_misc_vector(pf);
                   ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:14131:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                   ret = i40e_vsi_config_rss(vsi);
                   ^     ~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_main.c:14131:3: note: Value stored to 'ret' is never read
                   ret = i40e_vsi_config_rss(vsi);
                   ^     ~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 20 warnings (20 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   15 warnings generated.
   drivers/net/ethernet/intel/i40e/i40e_ethtool.c:2716:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                           ret = i40e_led_get_phy(hw, &temp_status,
                           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_ethtool.c:2716:4: note: Value stored to 'ret' is never read
                           ret = i40e_led_get_phy(hw, &temp_status,
                           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 14 warnings (14 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   19 warnings generated.
   drivers/net/ethernet/qlogic/qed/qed_debug.c:1019:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
                   strcpy(dump_buf, str);
                   ^~~~~~
   drivers/net/ethernet/qlogic/qed/qed_debug.c:1019:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
                   strcpy(dump_buf, str);
                   ^~~~~~
   drivers/net/ethernet/qlogic/qed/qed_debug.c:2428:4: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
                           strcpy(buf + strlen(buf), name);
                           ^~~~~~
   drivers/net/ethernet/qlogic/qed/qed_debug.c:2428:4: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
                           strcpy(buf + strlen(buf), name);
                           ^~~~~~
   drivers/net/ethernet/qlogic/qed/qed_debug.c:2430:4: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
                           strcpy(buf, name);
                           ^~~~~~
   drivers/net/ethernet/qlogic/qed/qed_debug.c:2430:4: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
                           strcpy(buf, name);
                           ^~~~~~
   drivers/net/ethernet/qlogic/qed/qed_debug.c:2460:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
                   strcpy(buf + strlen(buf), mem_group);
                   ^~~~~~
   drivers/net/ethernet/qlogic/qed/qed_debug.c:2460:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
                   strcpy(buf + strlen(buf), mem_group);
                   ^~~~~~
   drivers/net/ethernet/qlogic/qed/qed_debug.c:2462:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
                   strcpy(buf, mem_group);
                   ^~~~~~
   drivers/net/ethernet/qlogic/qed/qed_debug.c:2462:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
                   strcpy(buf, mem_group);
                   ^~~~~~
   drivers/net/ethernet/qlogic/qed/qed_debug.c:4087:2: warning: Value stored to 'byte_buf' is never read [clang-analyzer-deadcode.DeadStores]
           byte_buf += sizeof(signature);
           ^           ~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/qlogic/qed/qed_debug.c:4087:2: note: Value stored to 'byte_buf' is never read
           byte_buf += sizeof(signature);
           ^           ~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/qlogic/qed/qed_debug.c:5527:8: warning: Excessive padding in 'struct igu_fifo_addr_data' (8 padding bytes, where 0 is optimal). 
   Optimal fields order: 
   desc, 
   vf_desc, 
   type, 
   start_addr, 
   end_addr, 
   consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
   struct igu_fifo_addr_data {
   ~~~~~~~^~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/qlogic/qed/qed_debug.c:5527:8: note: Excessive padding in 'struct igu_fifo_addr_data' (8 padding bytes, where 0 is optimal). Optimal fields order: desc, vf_desc, type, start_addr, end_addr, consider reordering the fields or adding explicit padding members
   struct igu_fifo_addr_data {
   ~~~~~~~^~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/qlogic/qed/qed_debug.c:8012:3: warning: Value stored to 'offset' is never read [clang-analyzer-deadcode.DeadStores]
                   offset += (feature_size + REGDUMP_HEADER_SIZE);
                   ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/qlogic/qed/qed_debug.c:8012:3: note: Value stored to 'offset' is never read

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, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-30  3:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-03 18:08 drivers/net/ethernet/intel/i40e/i40e_main.c:4643:2: warning: Value stored to 'pf_q' is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
2022-01-07  3:05 ` kernel test robot
2022-01-07  3:05   ` kernel test robot
2022-01-10  4:44 kernel test robot
2022-05-27  4:31 kernel test robot
2022-05-30  3:39 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.