PERFORCE change 170842 for review
Nathan Whitehorn
nwhitehorn at freebsd.org
Fri Nov 20 16:11:49 UTC 2009
Hans Petter Selasky wrote:
> On Thursday 19 November 2009 23:47:59 Nathan Whitehorn wrote:
>
>> Hans Petter Selasky wrote:
>>
>>> http://p4web.freebsd.org/chv.cgi?CH=170842
>>>
>>> Change 170842 by hselasky at hselasky_laptop001 on 2009/11/19 22:34:49
>>>
>>>
>>> USB input:
>>> - ATP patch from Rohit Grover:
>>> - fixes some minor issues and
>>> makes the control transfer
>>> fully asynchronous
>>>
>> [...]
>>
>>
>>> @@ -1530,7 +1574,7 @@
>>> return (ENXIO);
>>>
>>> if (usbd_lookup_id_by_uaa(atp_devs, sizeof(atp_devs), uaa) == 0)
>>> - return BUS_PROBE_SPECIFIC;
>>> + return 0;
>>> else
>>> return ENXIO;
>>> }
>>>
>> Why are you replacing symbolic constants with less informative numeric
>> ones? -Nathan
>>
>
> Because returning zero in probe has special meaning and is hardcoded in the
> subr_bus.c code aswell. The other return values will not be changed.
>
It's the same thing as far as the code is concerned, of course, my
complaint was merely a style issue. Using the constant makes the meaning
of the return value clearer, especially since this driver uses this
return value to override the BUS_PROBE_GENERIC priority of ums(4).
Changing it from the constant that was already there seemed like a step
backward in readability.
-Nathan
More information about the p4-projects
mailing list