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
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;