lkml.org 
[lkml]   [2015]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 01/10] usb: host: ehci-sched: refactor scan_isoc function
From
2015-12-13 12:29 GMT-03:00 Alan Stern <stern@rowland.harvard.edu>:
> On Sun, 13 Dec 2015, Geyslan G. Bem wrote:
>
>> This patch removes an infinite 'for' loop and makes use of the already
>> existing 'restart' tag instead, reducing one leading tab.
>>
>> It also puts the easier evaluation (live variable) to be the first in
>> two conditionals.
>>
>> if (live && frame == now_frame) { ...
>>
>> if (live && ((frame == now_frame) || ...
>
> You should never do this. The first test in a conditional should be
> the one that is most likely to cause the expression to fail. In this
> case, live is almost always true whereas frame == now_frame is true
> only some percentage of the time. Therefore the frame == now_frame
> test should come first.
I see.
Doing v3 and undoing the reordering.

>
> Alan Stern
>



--
Regards,

Geyslan G. Bem
hackingbits.com


\
 
 \ /
  Last update: 2015-12-13 18:01    [W:0.044 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site