lkml.org 
[lkml]   [2011]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] USB: EHCI: Move sysfs related bits into ehci-sysfs.c
On Wed, 29 Jun 2011, Kirill Smelkov wrote:

> Yes, but still it would be good to always keep the invariant
>
> allocated <= uframe_periodic_max
>
> and that debug is there to catch when this breaks.

Then perhaps it should print out the maximum number of microseconds
already allocated for any uframe, instead of stopping as soon as it
finds something above the new limit.

> > Can you make that check conditional on DEBUG being set?
>
> Yes I can, but it seems to me we are starting to complicate the code.
>
> What's the problem with returning error on setting uframe_periodic_max <
> already allocated usb bandwith?

No problem, really.

> The checking is not a priority for me here, so if you think it's better not
> to check or do it under #ifdef - let's do it. Though of course we all
> have our preferences :)

Yes, it's just a matter of taste. I prefer to add as little code as
possible for a feature that won't be used much.

Alan Stern



\
 
 \ /
  Last update: 2011-06-29 20:53    [W:0.065 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site