[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201909071242.izw3tDp7%lkp@intel.com>
Date: Sat, 7 Sep 2019 12:24:55 +0800
From: kbuild test robot <lkp@...el.com>
To: Juliet Kim <julietk@...ux.vnet.ibm.com>
Cc: kbuild-all@...org, netdev@...r.kernel.org,
julietk@...ux.vnet.ibm.com, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH] net/ibmvnic: free reset work of removed device from queue
Hi Juliet,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc7 next-20190904]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Juliet-Kim/net-ibmvnic-free-reset-work-of-removed-device-from-queue/20190906-195317
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>
All error/warnings (new ones prefixed by >>):
drivers/net/ethernet/ibm/ibmvnic.c: In function '__ibmvnic_reset':
>> drivers/net/ethernet/ibm/ibmvnic.c:1986:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (adapter->state == VNIC_REMOVING ||
^~
drivers/net/ethernet/ibm/ibmvnic.c:1989:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
rc = EBUSY;
^~
>> drivers/net/ethernet/ibm/ibmvnic.c:2002:4: error: break statement not within loop or switch
break;
^~~~~
drivers/net/ethernet/ibm/ibmvnic.c: At top level:
>> drivers/net/ethernet/ibm/ibmvnic.c:2007:2: error: expected identifier or '(' before 'if'
if (adapter->wait_for_reset) {
^~
drivers/net/ethernet/ibm/ibmvnic.c:2013:2: error: expected identifier or '(' before 'if'
if (rc) {
^~
>> drivers/net/ethernet/ibm/ibmvnic.c:2018:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
adapter->resetting = false;
^~
drivers/net/ethernet/ibm/ibmvnic.c:2019:2: error: expected identifier or '(' before 'if'
if (we_lock_rtnl)
^~
>> drivers/net/ethernet/ibm/ibmvnic.c:2021:1: error: expected identifier or '(' before '}' token
}
^
drivers/net/ethernet/ibm/ibmvnic.c:1953:13: warning: 'free_all_rwi' defined but not used [-Wunused-function]
static void free_all_rwi(struct ibmvnic_adapter *adapter)
^~~~~~~~~~~~
vim +2002 drivers/net/ethernet/ibm/ibmvnic.c
ed651a10875f13 Nathan Fontenot 2017-05-03 1963
ed651a10875f13 Nathan Fontenot 2017-05-03 1964 static void __ibmvnic_reset(struct work_struct *work)
ed651a10875f13 Nathan Fontenot 2017-05-03 1965 {
ed651a10875f13 Nathan Fontenot 2017-05-03 1966 struct ibmvnic_rwi *rwi;
ed651a10875f13 Nathan Fontenot 2017-05-03 1967 struct ibmvnic_adapter *adapter;
a5681e20b541a5 Juliet Kim 2018-11-19 1968 bool we_lock_rtnl = false;
ed651a10875f13 Nathan Fontenot 2017-05-03 1969 u32 reset_state;
c26eba03e4073b John Allen 2017-10-26 1970 int rc = 0;
ed651a10875f13 Nathan Fontenot 2017-05-03 1971
ed651a10875f13 Nathan Fontenot 2017-05-03 1972 adapter = container_of(work, struct ibmvnic_adapter, ibmvnic_reset);
ed651a10875f13 Nathan Fontenot 2017-05-03 1973
a5681e20b541a5 Juliet Kim 2018-11-19 1974 /* netif_set_real_num_xx_queues needs to take rtnl lock here
a5681e20b541a5 Juliet Kim 2018-11-19 1975 * unless wait_for_reset is set, in which case the rtnl lock
a5681e20b541a5 Juliet Kim 2018-11-19 1976 * has already been taken before initializing the reset
a5681e20b541a5 Juliet Kim 2018-11-19 1977 */
a5681e20b541a5 Juliet Kim 2018-11-19 1978 if (!adapter->wait_for_reset) {
a5681e20b541a5 Juliet Kim 2018-11-19 1979 rtnl_lock();
a5681e20b541a5 Juliet Kim 2018-11-19 1980 we_lock_rtnl = true;
a5681e20b541a5 Juliet Kim 2018-11-19 1981 }
ed651a10875f13 Nathan Fontenot 2017-05-03 1982 reset_state = adapter->state;
ed651a10875f13 Nathan Fontenot 2017-05-03 1983
ed651a10875f13 Nathan Fontenot 2017-05-03 1984 rwi = get_next_rwi(adapter);
ed651a10875f13 Nathan Fontenot 2017-05-03 1985 while (rwi) {
36f1031c51a253 Thomas Falcon 2019-08-27 @1986 if (adapter->state == VNIC_REMOVING ||
36f1031c51a253 Thomas Falcon 2019-08-27 1987 adapter->state == VNIC_REMOVED)
42a863ed7971cb Juliet Kim 2019-09-05 1988 kfree(rwi);
42a863ed7971cb Juliet Kim 2019-09-05 @1989 rc = EBUSY;
42a863ed7971cb Juliet Kim 2019-09-05 1990 break;
42a863ed7971cb Juliet Kim 2019-09-05 1991 }
36f1031c51a253 Thomas Falcon 2019-08-27 1992
2770a7984db588 Thomas Falcon 2018-05-23 1993 if (adapter->force_reset_recovery) {
2770a7984db588 Thomas Falcon 2018-05-23 1994 adapter->force_reset_recovery = false;
2770a7984db588 Thomas Falcon 2018-05-23 1995 rc = do_hard_reset(adapter, rwi, reset_state);
2770a7984db588 Thomas Falcon 2018-05-23 1996 } else {
ed651a10875f13 Nathan Fontenot 2017-05-03 1997 rc = do_reset(adapter, rwi, reset_state);
2770a7984db588 Thomas Falcon 2018-05-23 1998 }
ed651a10875f13 Nathan Fontenot 2017-05-03 1999 kfree(rwi);
2770a7984db588 Thomas Falcon 2018-05-23 2000 if (rc && rc != IBMVNIC_INIT_FAILED &&
2770a7984db588 Thomas Falcon 2018-05-23 2001 !adapter->force_reset_recovery)
ed651a10875f13 Nathan Fontenot 2017-05-03 @2002 break;
ed651a10875f13 Nathan Fontenot 2017-05-03 2003
ed651a10875f13 Nathan Fontenot 2017-05-03 2004 rwi = get_next_rwi(adapter);
ed651a10875f13 Nathan Fontenot 2017-05-03 2005 }
ed651a10875f13 Nathan Fontenot 2017-05-03 2006
c26eba03e4073b John Allen 2017-10-26 @2007 if (adapter->wait_for_reset) {
c26eba03e4073b John Allen 2017-10-26 2008 adapter->wait_for_reset = false;
c26eba03e4073b John Allen 2017-10-26 2009 adapter->reset_done_rc = rc;
c26eba03e4073b John Allen 2017-10-26 2010 complete(&adapter->reset_done);
c26eba03e4073b John Allen 2017-10-26 2011 }
c26eba03e4073b John Allen 2017-10-26 2012
ed651a10875f13 Nathan Fontenot 2017-05-03 @2013 if (rc) {
d1cf33d93166f1 Nathan Fontenot 2017-08-08 2014 netdev_dbg(adapter->netdev, "Reset failed\n");
ed651a10875f13 Nathan Fontenot 2017-05-03 2015 free_all_rwi(adapter);
ed651a10875f13 Nathan Fontenot 2017-05-03 2016 }
42a863ed7971cb Juliet Kim 2019-09-05 2017
ed651a10875f13 Nathan Fontenot 2017-05-03 @2018 adapter->resetting = false;
a5681e20b541a5 Juliet Kim 2018-11-19 2019 if (we_lock_rtnl)
a5681e20b541a5 Juliet Kim 2018-11-19 2020 rtnl_unlock();
ed651a10875f13 Nathan Fontenot 2017-05-03 @2021 }
ed651a10875f13 Nathan Fontenot 2017-05-03 2022
:::::: The code at line 2002 was first introduced by commit
:::::: ed651a10875f13135a5f59c1bae4d51b377b3925 ibmvnic: Updated reset handling
:::::: TO: Nathan Fontenot <nfont@...ux.vnet.ibm.com>
:::::: CC: David S. Miller <davem@...emloft.net>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (62432 bytes)
Powered by blists - more mailing lists