On Wed, Feb 09, 2005 at 11:33:49AM -0800, David Brownell wrote: > On Wednesday 09 February 2005 11:01 am, Nishanth Aravamudan wrote: > > On Wed, Feb 09, 2005 at 10:33:02AM -0800, David Brownell wrote: > > > On Tuesday 08 February 2005 10:05 pm, Nishanth Aravamudan wrote: > > > > - USB_REQ_CLEAR_FEATURE, USB_RT_HUB, feature, 0, NULL, 0, > > > > HZ); > > > > + USB_REQ_CLEAR_FEATURE, USB_RT_HUB, feature, 0, NULL, 0, > > > > 1000); > > > > > > You know, changing from symbols to magic numbers is not a win. > > > People know what something involving HZ is intended to mean, > > > but 1000 is just another magic number ... > > > > To be honest, I had a similar concern. But if the API is clear that the > > timeout parameter is in real time units (milliseconds, in this case), I > > do not think 1000 is as much of a "magic number" as HZ was, or > > minimally, it's the same. > > You mean you can actually tell, from looking at a large set of > function parameters, which ones indicate timeouts? Wow! Most folk > I know usually deduce that it's the one that involves HZ, MSEC, or > USEC ... or, it's the single parameter to a *sleep function. :) > > For maintainability, code needs to have a few basic accommodations > for newcomers -- or semi-forgetful oldtimers. (I think that covers > pretty much every developer, come to think of it...) One of those > accomodations is using symbolic constants.
And having to look up, "ah this field wants jiffies", was any different? No, I think this way is a bit more sane. thanks, greg k-h ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel