Re: [PATCH net-next 4/8] pds_core: Prevent race issues involving the adminq

From: kernel test robot
Date: Fri Jan 05 2024 - 20:51:17 EST


Hi Brett,

kernel test robot noticed the following build warnings:

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

url: https://github.com/intel-lab-lkp/linux/commits/Brett-Creeley/pds_core-Prevent-health-thread-from-running-during-reset-remove/20240105-011706
base: net-next/main
patch link: https://lore.kernel.org/r/20240104171221.31399-5-brett.creeley%40amd.com
patch subject: [PATCH net-next 4/8] pds_core: Prevent race issues involving the adminq
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20240106/202401060952.4J8S3LbP-lkp@xxxxxxxxx/config)
compiler: s390-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240106/202401060952.4J8S3LbP-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401060952.4J8S3LbP-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/amd/pds_core/core.c:518:6: warning: no previous prototype for 'pdsc_adminq_wait_and_dec_once_unused' [-Wmissing-prototypes]
518 | void pdsc_adminq_wait_and_dec_once_unused(struct pdsc *pdsc)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/pdsc_adminq_wait_and_dec_once_unused +518 drivers/net/ethernet/amd/pds_core/core.c

517
> 518 void pdsc_adminq_wait_and_dec_once_unused(struct pdsc *pdsc)
519 {
520 /* The driver initializes the adminq_refcnt to 1 when the adminq is
521 * allocated and ready for use. Other users/requesters will increment
522 * the refcnt while in use. If the refcnt is down to 1 then the adminq
523 * is not in use and the refcnt can be cleared and adminq freed. Before
524 * calling this function the driver will set PDSC_S_FW_DEAD, which
525 * prevent subsequent attempts to use the adminq and increment the
526 * refcnt to fail. This guarantees that this function will eventually
527 * exit.
528 */
529 while (!refcount_dec_if_one(&pdsc->adminq_refcnt)) {
530 dev_dbg_ratelimited(pdsc->dev, "%s: adminq in use\n",
531 __func__);
532 cpu_relax();
533 }
534 }
535

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki