From owner-freebsd-scsi@FreeBSD.ORG Mon Nov 20 00:46:23 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 70C4E16A47C; Mon, 20 Nov 2006 00:46:23 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB67E43D64; Mon, 20 Nov 2006 00:46:07 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from ns1.feral.com (localhost [127.0.0.1]) by ns1.feral.com (8.13.8/8.13.8) with ESMTP id kAK0kA5g045408; Sun, 19 Nov 2006 16:46:20 -0800 (PST) (envelope-from mjacob@freebsd.org) Received: from localhost (mjacob@localhost) by ns1.feral.com (8.13.8/8.13.8/Submit) with ESMTP id kAK0kArd045405; Sun, 19 Nov 2006 16:46:10 -0800 (PST) (envelope-from mjacob@freebsd.org) X-Authentication-Warning: ns1.feral.com: mjacob owned process doing -bs Date: Sun, 19 Nov 2006 16:46:10 -0800 (PST) From: mjacob@freebsd.org X-X-Sender: mjacob@ns1.feral.com To: Attilio Rao In-Reply-To: <3bbf2fe10611191631h6883b862uf8088533913a7bc6@mail.gmail.com> Message-ID: <20061119164455.I44297@ns1.feral.com> References: <20061119161631.L44297@ns1.feral.com> <3bbf2fe10611191631h6883b862uf8088533913a7bc6@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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 Reply-To: mjacob@freebsd.org List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2006 00:46:23 -0000 > Would not be better a preprocessing stub? > > something like: > > #define XPT_PRINT(path, fmt, ...) do { > \ > xpt_print_path(path); > \ > printf(fmt, __VA_ARGS__); > \ > } while (0) > Well, it's uglier (IMO0, doesn't get formal checking (which I forgot to add to the define in cam_xpt.h), and you can't port it to systems that have an older compiler. Other than that, it's probably better.