Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752801AbZADJtR (ORCPT ); Sun, 4 Jan 2009 04:49:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751063AbZADJtD (ORCPT ); Sun, 4 Jan 2009 04:49:03 -0500 Received: from gate.crashing.org ([63.228.1.57]:35056 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750980AbZADJtB (ORCPT ); Sun, 4 Jan 2009 04:49:01 -0500 Subject: Re: [PATCH] printk: Let %pR handle NULL pointers From: Benjamin Herrenschmidt To: Trent Piepho Cc: Linus Torvalds , Linux Kernel Mailing List , Harvey Harrison , "David S. Miller" In-Reply-To: References: <1230979341-23029-1-git-send-email-xyzzy@speakeasy.org> <1231019614.15389.104.camel@pasglop> Content-Type: text/plain Date: Sun, 04 Jan 2009 20:48:13 +1100 Message-Id: <1231062493.15389.105.camel@pasglop> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 759 Lines: 21 > I thought of doing that too, but then all the various %pX formats would all > have to print the same for NULL pointers. For instance a resource prints > out like "[0x1000-0x100f]", so I chose "[NULL]" for printing a null > resource pointer. Maybe "[]" or "[-]" would be better? A null MAC address > could be ":::::" or "x:x:x:x:x:x". "N.U.L.L" or "x.x.x.x" for a null IP4 > address. And so on. So the printout looks nicer when a NULL pointer isn't > a bug. And how often is that ? Seriously... Ben. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/