From owner-freebsd-scsi@FreeBSD.ORG Tue Jul 23 22:04:10 2013 Return-Path: Delivered-To: scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 84505E42; Tue, 23 Jul 2013 22:04:10 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from aslan.scsiguy.com (aslan.scsiguy.com [70.89.174.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5B6CD278B; Tue, 23 Jul 2013 22:04:10 +0000 (UTC) Received: from [192.168.6.167] (207-225-98-3.dia.static.qwest.net [207.225.98.3]) (authenticated bits=0) by aslan.scsiguy.com (8.14.7/8.14.5) with ESMTP id r6NM49vJ086361 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 23 Jul 2013 22:04:09 GMT (envelope-from gibbs@FreeBSD.org) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: Please review patch for aic7xxx_pci.c From: "Justin T. Gibbs" In-Reply-To: <20130723214126.GG9030@acme.spoerlein.net> Date: Tue, 23 Jul 2013 16:04:04 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20130716094927.GA9030@acme.spoerlein.net> <20130723071129.GD9030@acme.spoerlein.net> <20130723204530.GE9030@acme.spoerlein.net> <86E509ED-694D-49B0-A3D9-C9C7B71F67CE@FreeBSD.org> <20130723214126.GG9030@acme.spoerlein.net> To: =?iso-8859-1?Q?Ulrich_Sp=F6rlein?= X-Mailer: Apple Mail (2.1508) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (aslan.scsiguy.com [70.89.174.89]); Tue, 23 Jul 2013 22:04:09 +0000 (UTC) Cc: scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jul 2013 22:04:10 -0000 On Jul 23, 2013, at 3:41 PM, Ulrich Sp=F6rlein wrote: > On Tue, 2013-07-23 at 15:15:53 -0600, Justin T. Gibbs wrote: >> On Jul 23, 2013, at 2:45 PM, Ulrich Sp=F6rlein = wrote: >>=20 >>> Thanks, but maybe it's better to have the discussion here. >>>=20 >>> You wrote: >>> The difference in the argument order between the declaration and = definition is >>> likely what led to this programming error. Your patch should also = correct the >>> argument reversal in the declaration of ahc_9005_subdevinfo_valid(). >>>=20 >>> The argument order you've used seems the best choice since it = matches what is >>> used in ahc_compose_id(). >>>=20 >>>=20 >>>=20 >>> I'm not sure that reversing the arguments in the function definition = is >>> the right way. This would make the patch a no-op. >>=20 >> Read the quote again. I said change the "declaration", not the >> "definition". To be extremely clear, the code currently looks like >> this: >=20 > D'oh, that's what I get for reading too fast. I've opted to change the > function definition, in the end, so that declaration, definition and > call-site are in sync, see > = https://github.com/uqs/freebsd-head/commit/e699b2fde01f235a22e1125e9f3aef1= 6623b512f >=20 > Thanks! > Uli But now the order of the arguments does not match ahc_compose_id(). It seems to me that we want to only have a single convention in how this data is passed to functions. -- Justin=