From owner-svn-src-all@FreeBSD.ORG Sun Nov 8 00:39:50 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B5C9106566B; Sun, 8 Nov 2009 00:39:50 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 3C1E78FC08; Sun, 8 Nov 2009 00:39:50 +0000 (UTC) Received: from Macintosh-4.local (sam@[10.0.0.198]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id nA80dncg089641 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 7 Nov 2009 16:39:49 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <4AF61355.2080903@freebsd.org> Date: Sat, 07 Nov 2009 16:39:49 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Doug Barton References: <200911071842.nA7IgsNn060380@svn.freebsd.org> <4AF5C3C7.1020806@freebsd.org> <4AF5DDFB.10107@FreeBSD.org> In-Reply-To: <4AF5DDFB.10107@FreeBSD.org> Content-Type: multipart/mixed; boundary="------------010302030009060002060408" X-DCC-CTc-dcc2-Metrics: ebb.errno.com; whitelist Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r199018 - head/sys/dev/wpi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Nov 2009 00:39:50 -0000 This is a multi-part message in MIME format. --------------010302030009060002060408 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Doug Barton wrote: > Sam Leffler wrote: >> The right thing to do is to set wpi_debug to 0 and leave the messages >> compiled in. > > Well as you can see from the diff I did leave the messages in the > source so that anyone who wants to enable debugging again can just > define WPI_DEBUG at build time to get it. > > However defining WPI_DEBUG to 0 resulted in the debug messages being > printed on the console again so if I'm understanding what you're > suggesting correctly it seems that it would require a lot more changes > in the code to accomplish. (I did see other examples of what I think > you're suggesting in sys/ but this driver doesn't seem to have that > support.) > > If I'm not understanding something or you have a better solution feel > free to implement it. My goal was just to get a less noisy console at > boot time. Try the attached Sam --------------010302030009060002060408 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="wpi.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="wpi.patch" Index: if_wpi.c =================================================================== --- if_wpi.c (revision 199033) +++ if_wpi.c (working copy) @@ -103,6 +103,8 @@ #include #include +#define WPI_DEBUG + #ifdef WPI_DEBUG #define DPRINTF(x) do { if (wpi_debug != 0) printf x; } while (0) #define DPRINTFN(n, x) do { if (wpi_debug & n) printf x; } while (0) @@ -124,7 +126,7 @@ WPI_DEBUG_ANY = 0xffffffff }; -static int wpi_debug = 1; +static int wpi_debug = 0; SYSCTL_INT(_debug, OID_AUTO, wpi, CTLFLAG_RW, &wpi_debug, 0, "wpi debug level"); TUNABLE_INT("debug.wpi", &wpi_debug); --------------010302030009060002060408--