Re: [PATCH v2 02/14] qla2xxx: Allow relogin to proceed if remote login did not finish

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

 



On Fri, 2017-02-03 at 14:40 -0800, Himanshu Madhani wrote:
> +	if (fcport->fw_login_state == DSC_LS_PLOGI_COMP) {
> +		unsigned long t = fcport->plogi_nack_done_jiff + HZ;
> +
> +		if (time_before_eq(jiffies, t))
> +			return;
> +	}

The above code occurs two times in this patch. We try to avoid duplicating
code in the Linux kernel, especially code that contains hardcoded constants.
Have you considered to change the name of plogi_nack_done_jiff into e.g.
plogi_done_deadline and to assign jiffies + HZ to that variable instead of
jiffies?

Bart.



[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