All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/net/ethernet/sfc/siena/efx_common.c:767 efx_siena_reset_up() warn: missing error code 'rc'
Date: Tue, 20 Sep 2022 03:46:41 +0800	[thread overview]
Message-ID: <202209200345.EsbfkOKJ-lkp@intel.com> (raw)

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

BCC: lkp(a)intel.com
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Martin Habets <habetsm.xilinx@gmail.com>
CC: Jakub Kicinski <kuba@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   521a547ced6477c54b4b0cc206000406c221b4d6
commit: c5a13c319e10e795850b61bc7e3447b08024be2e sfc: Add a basic Siena module
date:   4 months ago
:::::: branch date: 23 hours ago
:::::: commit date: 4 months ago
config: csky-randconfig-m041-20220918 (https://download.01.org/0day-ci/archive/20220920/202209200345.EsbfkOKJ-lkp(a)intel.com/config)
compiler: csky-linux-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/net/ethernet/sfc/siena/efx_common.c:767 efx_siena_reset_up() warn: missing error code 'rc'

vim +/rc +767 drivers/net/ethernet/sfc/siena/efx_common.c

6e173d3b4af9e88 Martin Habets 2022-05-09  743  
6e173d3b4af9e88 Martin Habets 2022-05-09  744  /* This function will always ensure that the locks acquired in
71ad88f661253f5 Martin Habets 2022-05-09  745   * efx_siena_reset_down() are released. A failure return code indicates
6e173d3b4af9e88 Martin Habets 2022-05-09  746   * that we were unable to reinitialise the hardware, and the
6e173d3b4af9e88 Martin Habets 2022-05-09  747   * driver should be disabled. If ok is false, then the rx and tx
6e173d3b4af9e88 Martin Habets 2022-05-09  748   * engines are not restarted, pending a RESET_DISABLE.
6e173d3b4af9e88 Martin Habets 2022-05-09  749   */
71ad88f661253f5 Martin Habets 2022-05-09  750  int efx_siena_reset_up(struct efx_nic *efx, enum reset_type method, bool ok)
6e173d3b4af9e88 Martin Habets 2022-05-09  751  {
6e173d3b4af9e88 Martin Habets 2022-05-09  752  	int rc;
6e173d3b4af9e88 Martin Habets 2022-05-09  753  
6e173d3b4af9e88 Martin Habets 2022-05-09  754  	EFX_ASSERT_RESET_SERIALISED(efx);
6e173d3b4af9e88 Martin Habets 2022-05-09  755  
6e173d3b4af9e88 Martin Habets 2022-05-09  756  	if (method == RESET_TYPE_MCDI_TIMEOUT)
6e173d3b4af9e88 Martin Habets 2022-05-09  757  		efx->type->finish_flr(efx);
6e173d3b4af9e88 Martin Habets 2022-05-09  758  
6e173d3b4af9e88 Martin Habets 2022-05-09  759  	/* Ensure that SRAM is initialised even if we're disabling the device */
6e173d3b4af9e88 Martin Habets 2022-05-09  760  	rc = efx->type->init(efx);
6e173d3b4af9e88 Martin Habets 2022-05-09  761  	if (rc) {
6e173d3b4af9e88 Martin Habets 2022-05-09  762  		netif_err(efx, drv, efx->net_dev, "failed to initialise NIC\n");
6e173d3b4af9e88 Martin Habets 2022-05-09  763  		goto fail;
6e173d3b4af9e88 Martin Habets 2022-05-09  764  	}
6e173d3b4af9e88 Martin Habets 2022-05-09  765  
6e173d3b4af9e88 Martin Habets 2022-05-09  766  	if (!ok)
6e173d3b4af9e88 Martin Habets 2022-05-09 @767  		goto fail;
6e173d3b4af9e88 Martin Habets 2022-05-09  768  
6e173d3b4af9e88 Martin Habets 2022-05-09  769  	if (efx->port_initialized && method != RESET_TYPE_INVISIBLE &&
6e173d3b4af9e88 Martin Habets 2022-05-09  770  	    method != RESET_TYPE_DATAPATH) {
4d49e5cd4b095cd Martin Habets 2022-05-09  771  		rc = efx_siena_mcdi_port_reconfigure(efx);
6e173d3b4af9e88 Martin Habets 2022-05-09  772  		if (rc && rc != -EPERM)
6e173d3b4af9e88 Martin Habets 2022-05-09  773  			netif_err(efx, drv, efx->net_dev,
6e173d3b4af9e88 Martin Habets 2022-05-09  774  				  "could not restore PHY settings\n");
6e173d3b4af9e88 Martin Habets 2022-05-09  775  	}
6e173d3b4af9e88 Martin Habets 2022-05-09  776  
71ad88f661253f5 Martin Habets 2022-05-09  777  	rc = efx_siena_enable_interrupts(efx);
6e173d3b4af9e88 Martin Habets 2022-05-09  778  	if (rc)
6e173d3b4af9e88 Martin Habets 2022-05-09  779  		goto fail;
6e173d3b4af9e88 Martin Habets 2022-05-09  780  

:::::: The code at line 767 was first introduced by commit
:::::: 6e173d3b4af9e8804ebdbdb7a4afd7ed8f96220b sfc: Copy shared files needed for Siena (part 1)

:::::: TO: Martin Habets <habetsm.xilinx@gmail.com>
:::::: CC: Jakub Kicinski <kuba@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-09-19 19:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202209200345.EsbfkOKJ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.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 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.