Re: [RFC PATCH 09/20] xhci: introduce ring ops to handle event vs non-event rings

2014-08-26 Thread Dan Williams
On Tue, Aug 26, 2014 at 9:21 AM, David Laight wrote: > From: Dan Williams [mailto:dan.j.willi...@intel.com] >> On Tue, Aug 26, 2014 at 3:37 AM, David Laight >> wrote: >> > From: Dan Williams >> >> It's confusing (to me at least) to keep on remembering the differences >> >> between event rings (m

RE: [RFC PATCH 09/20] xhci: introduce ring ops to handle event vs non-event rings

2014-08-26 Thread David Laight
From: Dan Williams [mailto:dan.j.willi...@intel.com] > On Tue, Aug 26, 2014 at 3:37 AM, David Laight wrote: > > From: Dan Williams > >> It's confusing (to me at least) to keep on remembering the differences > >> between event rings (managed by the hardware) and non-event rings > >> managed by the

Re: [RFC PATCH 09/20] xhci: introduce ring ops to handle event vs non-event rings

2014-08-26 Thread Dan Williams
On Tue, Aug 26, 2014 at 3:37 AM, David Laight wrote: > From: Dan Williams >> It's confusing (to me at least) to keep on remembering the differences >> between event rings (managed by the hardware) and non-event rings >> managed by the host. Replace "if (ring->type == FOO)" branches with >> ring o

RE: [RFC PATCH 09/20] xhci: introduce ring ops to handle event vs non-event rings

2014-08-26 Thread David Laight
From: Dan Williams > It's confusing (to me at least) to keep on remembering the differences > between event rings (managed by the hardware) and non-event rings > managed by the host. Replace "if (ring->type == FOO)" branches with > ring ops that are specific to the type of ring. > > This is a tra

[RFC PATCH 09/20] xhci: introduce ring ops to handle event vs non-event rings

2014-08-22 Thread Dan Williams
It's confusing (to me at least) to keep on remembering the differences between event rings (managed by the hardware) and non-event rings managed by the host. Replace "if (ring->type == FOO)" branches with ring ops that are specific to the type of ring. This is a tradeoff of direct code readabilit