Re: [PATCH] fixup "qla2xxx: Optimize NPIV tear down process"

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

 



On Wed, 2019-10-02 at 08:17 -0700, Bart Van Assche wrote:
> 
> Both loops check the loop termination condition twice. Has it been
> considered to write these loops such that the loop termination
> condition
> is only tested once, e.g. using the following pattern?
> 
> for (i = 0; i < 10; i++)
> 	if (wait_event_timeout(...) > 0)
> 		break;
> 

Right, that's probably better. This was just meant as a minimal,
temporary fix for the already applied patch. I expect Himanshu or Quinn
to follow up anyway.

I also still think that it'd be better to get the wake_up() calls
right and not have to loop over wait_event_timeout() at all.

Thanks,
Martin





[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