netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Edward Cree <ecree@solarflare.com>,
	linux-net-drivers@solarflare.com, davem@davemloft.net
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next 06/15] sfc_ef100: don't call efx_reset_down()/up() on EF100
Date: Sat, 4 Jul 2020 10:15:27 +0800	[thread overview]
Message-ID: <202007041037.LcRVwmQK%lkp@intel.com> (raw)
In-Reply-To: <be1d33ee-4a31-f2d2-d4f8-77380a07dcc9@solarflare.com>

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

Hi Edward,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Edward-Cree/sfc_ef100-driver-for-EF100-family-NICs-part-1/20200703-233750
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 8c8278a5b1a81e099ba883d8a0f9e3df9bdb1a74
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project ca464639a1c9dd3944eb055ffd2796e8c2e7639f)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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/sfc/efx_common.c:856:6: warning: variable 'rc2' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           if (efx_nic_rev(efx) != EFX_REV_EF100)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/sfc/efx_common.c:858:6: note: uninitialized use occurs here
           if (rc2) {
               ^~~
   drivers/net/ethernet/sfc/efx_common.c:856:2: note: remove the 'if' if its condition is always true
           if (efx_nic_rev(efx) != EFX_REV_EF100)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/sfc/efx_common.c:818:13: note: initialize the variable 'rc2' to silence this warning
           int rc, rc2;
                      ^
                       = 0
   1 warning generated.

vim +856 drivers/net/ethernet/sfc/efx_common.c

   809	
   810	/* Reset the NIC using the specified method.  Note that the reset may
   811	 * fail, in which case the card will be left in an unusable state.
   812	 *
   813	 * Caller must hold the rtnl_lock.
   814	 */
   815	int efx_reset(struct efx_nic *efx, enum reset_type method)
   816	{
   817		bool disabled;
   818		int rc, rc2;
   819	
   820		netif_info(efx, drv, efx->net_dev, "resetting (%s)\n",
   821			   RESET_TYPE(method));
   822	
   823		efx_device_detach_sync(efx);
   824		/* efx_reset_down() grabs locks that prevent recovery on EF100.
   825		 * EF100 reset is handled in the efx_nic_type callback below.
   826		 */
   827		if (efx_nic_rev(efx) != EFX_REV_EF100)
   828			efx_reset_down(efx, method);
   829	
   830		rc = efx->type->reset(efx, method);
   831		if (rc) {
   832			netif_err(efx, drv, efx->net_dev, "failed to reset hardware\n");
   833			goto out;
   834		}
   835	
   836		/* Clear flags for the scopes we covered.  We assume the NIC and
   837		 * driver are now quiescent so that there is no race here.
   838		 */
   839		if (method < RESET_TYPE_MAX_METHOD)
   840			efx->reset_pending &= -(1 << (method + 1));
   841		else /* it doesn't fit into the well-ordered scope hierarchy */
   842			__clear_bit(method, &efx->reset_pending);
   843	
   844		/* Reinitialise bus-mastering, which may have been turned off before
   845		 * the reset was scheduled. This is still appropriate, even in the
   846		 * RESET_TYPE_DISABLE since this driver generally assumes the hardware
   847		 * can respond to requests.
   848		 */
   849		pci_set_master(efx->pci_dev);
   850	
   851	out:
   852		/* Leave device stopped if necessary */
   853		disabled = rc ||
   854			method == RESET_TYPE_DISABLE ||
   855			method == RESET_TYPE_RECOVER_OR_DISABLE;
 > 856		if (efx_nic_rev(efx) != EFX_REV_EF100)
   857			rc2 = efx_reset_up(efx, method, !disabled);
   858		if (rc2) {
   859			disabled = true;
   860			if (!rc)
   861				rc = rc2;
   862		}
   863	
   864		if (disabled) {
   865			dev_close(efx->net_dev);
   866			netif_err(efx, drv, efx->net_dev, "has been disabled\n");
   867			efx->state = STATE_DISABLED;
   868		} else {
   869			netif_dbg(efx, drv, efx->net_dev, "reset complete\n");
   870			efx_device_attach_if_not_resetting(efx);
   871		}
   872		return rc;
   873	}
   874	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 75323 bytes --]

  reply	other threads:[~2020-07-04  2:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03 15:28 [PATCH net-next 00/15] sfc_ef100: driver for EF100 family NICs, part 1 Edward Cree
2020-07-03 15:30 ` [PATCH net-next 01/15] sfc_ef100: add EF100 register definitions Edward Cree
2020-07-03 15:30 ` [PATCH net-next 02/15] sfc_ef100: register accesses on EF100 Edward Cree
2020-07-03 15:31 ` [PATCH net-next 03/15] sfc_ef100: skeleton EF100 PF driver Edward Cree
2020-07-03 17:43   ` Jakub Kicinski
2020-07-03 17:46   ` kernel test robot
2020-07-08 19:16     ` Edward Cree
2020-07-03 17:46   ` [RFC PATCH] sfc_ef100: ef100_hard_start_xmit() can be static kernel test robot
2020-07-03 19:41   ` [PATCH net-next 03/15] sfc_ef100: skeleton EF100 PF driver kernel test robot
2020-07-04  4:16   ` kernel test robot
2020-07-07 18:34     ` Edward Cree
2020-07-08  3:15       ` [kbuild-all] " Xia, Hui
2020-07-03 15:31 ` [PATCH net-next 04/15] sfc_ef100: reset-handling stub Edward Cree
2020-07-03 15:32 ` [PATCH net-next 05/15] sfc_ef100: PHY probe stub Edward Cree
2020-07-03 15:32 ` [PATCH net-next 06/15] sfc_ef100: don't call efx_reset_down()/up() on EF100 Edward Cree
2020-07-04  2:15   ` kernel test robot [this message]
2020-07-03 15:33 ` [PATCH net-next 07/15] sfc_ef100: implement MCDI transport Edward Cree
2020-07-03 15:33 ` [PATCH net-next 08/15] sfc_ef100: implement ndo_open/close and EVQ probing Edward Cree
2020-07-03 15:34 ` [PATCH net-next 09/15] sfc_ef100: process events for MCDI completions Edward Cree
2020-07-03 15:34 ` [PATCH net-next 10/15] sfc_ef100: read datapath caps, implement check_caps Edward Cree
2020-07-03 15:35 ` [PATCH net-next 11/15] sfc_ef100: extend ef100_check_caps to cover datapath_caps3 Edward Cree
2020-07-03 15:35 ` [PATCH net-next 12/15] sfc_ef100: actually perform resets Edward Cree
2020-07-03 15:35 ` [PATCH net-next 13/15] sfc_ef100: probe the PHY and configure the MAC Edward Cree
2020-07-03 15:36 ` [PATCH net-next 14/15] sfc_ef100: read device MAC address at probe time Edward Cree
2020-07-03 15:36 ` [PATCH net-next 15/15] sfc_ef100: implement ndo_get_phys_port_{id,name} Edward Cree

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=202007041037.LcRVwmQK%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=davem@davemloft.net \
    --cc=ecree@solarflare.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-net-drivers@solarflare.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).