From owner-svn-src-all@FreeBSD.ORG Tue Jan 17 20:34:09 2012 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 9B0641065675; Tue, 17 Jan 2012 20:34:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6FA7E8FC24; Tue, 17 Jan 2012 20:34:09 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 8968446B09; Tue, 17 Jan 2012 15:34:08 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 17756B91C; Tue, 17 Jan 2012 15:34:08 -0500 (EST) From: John Baldwin To: Scott Long Date: Tue, 17 Jan 2012 14:34:03 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201201150709.q0F79Iif067938@svn.freebsd.org> <201201171008.28752.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201201171434.03633.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 17 Jan 2012 15:34:08 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Eitan Adler , Colin Percival Subject: Re: svn commit: r230125 - head/sys/kern 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: Tue, 17 Jan 2012 20:34:09 -0000 On Tuesday, January 17, 2012 2:22:26 pm Scott Long wrote: > On Jan 17, 2012, at 8:08 AM, John Baldwin wrote: > > On Sunday, January 15, 2012 6:32:43 pm Colin Percival wrote: > >> On 01/15/12 15:28, John Baldwin wrote: > >>> On 1/15/12 2:09 AM, Eitan Adler wrote: > >>>> Log: > >>>> - Fix undefined behavior when device_get_name is null > >>>> - Make error message more informative > >>> > >>> The in-kernel printf(9) always prints "(null)" for %s when the pointer is NULL, > >>> so that wasn't undefined behavior. Printing out the driver name is a useful > >>> change, but the "(unknown)" bits are just noise as it isn't clear that > >>> "(unknown)" is substantially better than "(null)". > >> > >> I think the change from "(null)" to "(unknown)" is useful, since when I see > >> "(null)" printed my immediate thought is "looks like there's a bug I need to > >> track down here". > > > > The entire printf is "there's a bug I need to track down here". (null) > > explicitly tells me that device_get_name() is NULL when looking at the printf > > to see what it means. Having it be (unknown) tells me the same exact thing, > > but only after I've parsed an extra 2-3 lines of code to figure out what > > (unknown) stands for. > > > > I like that change. "null" is ambiguous for those who aren't intimately familiar with the bus code. Bruce suggested in another e-mail that the entire printf should be using device_printf() instead which would also use 'unknown', but spelled slightly differently (and consistent with other device messages). -- John Baldwin