Re: [PATCH 2/2] scsi: libfc: Skip additional kref updating work event.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Javed,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on scsi/for-next v5.8-rc2 next-20200625]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Javed-Hasan/libfc-Handling-of-extra-kref/20200622-181643
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: h8300-randconfig-m031-20200624 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

smatch warnings:
drivers/scsi/libfc/fc_rport.c:488 fc_rport_enter_delete() warn: inconsistent indenting

vim +488 drivers/scsi/libfc/fc_rport.c

   459	
   460	/**
   461	 * fc_rport_enter_delete() - Schedule a remote port to be deleted
   462	 * @rdata: The remote port to be deleted
   463	 * @event: The event to report as the reason for deletion
   464	 *
   465	 * Allow state change into DELETE only once.
   466	 *
   467	 * Call queue_work only if there's no event already pending.
   468	 * Set the new event so that the old pending event will not occur.
   469	 * Since we have the mutex, even if fc_rport_work() is already started,
   470	 * it'll see the new event.
   471	 *
   472	 * Reference counting: does not modify kref
   473	 */
   474	static void fc_rport_enter_delete(struct fc_rport_priv *rdata,
   475					  enum fc_rport_event event)
   476	{
   477		lockdep_assert_held(&rdata->rp_mutex);
   478	
   479		if (rdata->rp_state == RPORT_ST_DELETE)
   480			return;
   481	
   482		FC_RPORT_DBG(rdata, "Delete port\n");
   483	
   484		fc_rport_state_enter(rdata, RPORT_ST_DELETE);
   485	
   486		if (rdata->event == RPORT_EV_NONE) {
   487			kref_get(&rdata->kref);
 > 488		    if(!queue_work(rport_event_queue, &rdata->event_work))
   489				kref_put(&rdata->kref, fc_rport_destroy);
   490		}
   491	
   492		rdata->event = event;
   493	}
   494	

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

Attachment: .config.gz
Description: application/gzip


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux