From owner-p4-projects@FreeBSD.ORG Fri Nov 20 16:11:49 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1D538106568D; Fri, 20 Nov 2009 16:11:49 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D355E1065698 for ; Fri, 20 Nov 2009 16:11:48 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id A66178FC13 for ; Fri, 20 Nov 2009 16:11:48 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7.0-5.01 32bit (built Feb 19 2009)) id <0KTE00A00Y7NSX00@smtpauth1.wiscmail.wisc.edu>; Fri, 20 Nov 2009 09:11:47 -0600 (CST) Received: from comporellon.tachypleus.net (adsl-75-50-88-113.dsl.mdsnwi.sbcglobal.net [75.50.88.113]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7.0-5.01 32bit (built Feb 19 2009)) with ESMTPSA id <0KTE00J17Y74C360@smtpauth1.wiscmail.wisc.edu>; Fri, 20 Nov 2009 09:11:29 -0600 (CST) Date: Fri, 20 Nov 2009 09:11:27 -0600 From: Nathan Whitehorn In-reply-to: <200911200846.54559.hselasky@freebsd.org> To: Hans Petter Selasky Message-id: <4B06B19F.7050501@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=75.50.88.113 X-Spam-PmxInfo: Server=avs-10, Version=5.5.5.374460, Antispam-Engine: 2.7.1.369594, Antispam-Data: 2009.11.20.150038, SenderIP=75.50.88.113 References: <200911192235.nAJMZ2XH072195@repoman.freebsd.org> <4B05CB1F.8020100@freebsd.org> <200911200846.54559.hselasky@freebsd.org> User-Agent: Thunderbird 2.0.0.23 (X11/20090905) Cc: Perforce Change Reviews Subject: Re: PERFORCE change 170842 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2009 16:11:49 -0000 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@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