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

2017-02-08 Thread Madhani, Himanshu


On 2/8/17, 10:42 AM, "Bart Van Assche"  wrote:

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

Thanks for the review. Will update patch and resend series. 


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

2017-02-08 Thread Bart Van Assche
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.