[PATCH v2 5/5] xhci: Remove recursive call to xhci_handle_event
Matt Evans
matt at ozlabs.org
Thu Mar 31 10:10:05 EST 2011
On 30/03/11 07:00, Dmitry Torokhov wrote:
> On Sunday, March 27, 2011 09:53:00 pm Matt Evans wrote:
>> @@ -2282,7 +2284,7 @@ hw_died:
>> /* FIXME this should be a delayed service routine
>> * that clears the EHB.
>> */
>> - xhci_handle_event(xhci);
>> + while (xhci_handle_event(xhci)) {}
>>
>
> I must admit I dislike the style with empty loop bodies, do you think
> we could have something like below instead?
Well, although I don't mind empty while()s at all (they're clean and obvious
IMHO) I would remove an empty blightful while loop with something like this:
do {
ret = xhci_handle_event(xhci);
} while (ret > 0);
;-) (Not sure that refactoring its contents into the IRQ handler is a good idea,
if that area's going to be revisited soon to extend error
handling/reporting.)
Cheers,
Matt
More information about the Linuxppc-dev
mailing list