linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Matt Evans <matt@ozlabs.org>
To: Dmitry Torokhov <dtor@vmware.com>
Cc: sarah.a.sharp@linux.intel.com, linuxppc-dev@ozlabs.org,
	linux-usb@vger.kernel.org, Sergei Shtylyov <sshtylyov@mvista.com>
Subject: Re: [PATCH v2 5/5] xhci: Remove recursive call to xhci_handle_event
Date: Thu, 31 Mar 2011 10:10:05 +1100	[thread overview]
Message-ID: <4D93B84D.7040500@ozlabs.org> (raw)
In-Reply-To: <20110329200017.GA25480@dtor-ws.eng.vmware.com>

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

      parent reply	other threads:[~2011-03-30 23:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-25  7:44 [PATCH 5/5] xhci: Remove recursive call to xhci_handle_event Matt Evans
2011-03-25 12:48 ` Sergei Shtylyov
2011-03-28  4:53   ` [PATCH v2 " Matt Evans
2011-03-28 22:34     ` Sarah Sharp
2011-03-28 23:58       ` Benjamin Herrenschmidt
2011-03-29 18:34         ` Sarah Sharp
2011-03-29 20:00     ` Dmitry Torokhov
2011-03-30  7:51       ` David Laight
2011-03-30 23:10       ` Matt Evans [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D93B84D.7040500@ozlabs.org \
    --to=matt@ozlabs.org \
    --cc=dtor@vmware.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sarah.a.sharp@linux.intel.com \
    --cc=sshtylyov@mvista.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).