From owner-freebsd-scsi@FreeBSD.ORG Tue Dec 5 04:42:55 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7ECCE16A412; Tue, 5 Dec 2006 04:42:55 +0000 (UTC) (envelope-from ade@lovett.com) Received: from mail.lovett.com (foo.lovett.com [67.134.38.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3840A43CA3; Tue, 5 Dec 2006 04:42:18 +0000 (GMT) (envelope-from ade@lovett.com) Received: from hellfire.canal.lovett.com ([172.16.32.20]:61482) by mail.lovett.com with esmtpa (Exim 4.63 (FreeBSD)) (envelope-from ) id 1GrS8s-0000CO-QY; Mon, 04 Dec 2006 20:42:54 -0800 In-Reply-To: <20061204202639.B20246@ns1.feral.com> References: <20061119161631.L44297@ns1.feral.com> <3bbf2fe10611191631h6883b862uf8088533913a7bc6@mail.gmail.com> <20061120221153.GA5155@lor.one-eyed-alien.net> <3bbf2fe10611201418m15d50703m37d9d5620e5c832d@mail.gmail.com> <20061204150922.F18492@ns1.feral.com> <20061205140644.Q28464@delplex.bde.org> <20061204192720.P19791@ns1.feral.com> <20061204202639.B20246@ns1.feral.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <02408F0C-838D-496A-8BE3-6049C9E77C76@freebsd.org> Content-Transfer-Encoding: 7bit From: Ade Lovett Date: Mon, 4 Dec 2006 20:42:54 -0800 To: mjacob@freebsd.org X-Mailer: Apple Mail (2.752.2) Sender: ade@lovett.com Cc: freebsd-scsi@freebsd.org Subject: Re: a code reduction function addition to cam_xpt X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2006 04:42:55 -0000 On Dec 04, 2006, at 20:27 , mjacob@freebsd.org wrote: >> On Dec 04, 2006, at 19:27 , mjacob@freebsd.org wrote: >>> IOCCC? >> >> http://www.ioccc.org/ >> >> Consider this another vote for "function" ;) > > Bruce is usually less indirect. What gives? Multi-line #define's are 'orrible (IMO) -- of course, our tree is littered with them, but it's highly preferable to have a function over a define, particularly when it comes to reading the code n months later, trying to track something down. In this particular case, the minimal overhead of calling a function rather than having it inline (via #define) is vastly outweighed by code-readability, and reduction in kernel size. -aDe