Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262417AbUKQSvi (ORCPT ); Wed, 17 Nov 2004 13:51:38 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262429AbUKQSFP (ORCPT ); Wed, 17 Nov 2004 13:05:15 -0500 Received: from parcelfarce.linux.theplanet.co.uk ([195.92.249.252]:64931 "EHLO www.linux.org.uk") by vger.kernel.org with ESMTP id S262426AbUKQR6Q (ORCPT ); Wed, 17 Nov 2004 12:58:16 -0500 Date: Wed, 17 Nov 2004 17:58:11 +0000 From: Al Viro To: Gerd Knorr Cc: "Randy.Dunlap" , jelle@foks.8m.com, lkml , akpm Subject: Re: [PATCH] cx88: fix printk arg. type Message-ID: <20041117175811.GE26051@parcelfarce.linux.theplanet.co.uk> References: <419A89A3.90903@osdl.org> <20041117172519.GB8176@bytesex> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041117172519.GB8176@bytesex> User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1351 Lines: 30 On Wed, Nov 17, 2004 at 06:25:19PM +0100, Gerd Knorr wrote: > > - dprintk(0, "ERROR: Firmware size mismatch (have %ld, expected %d)\n", > > + dprintk(0, "ERROR: Firmware size mismatch (have %Zd, expected %d)\n", > > Thanks, merged to cvs. I like that 'Z'. Or is that just a linux-kernel > printk specific thingy? Or is this standardized somewhere? So I could > use that in userspace code as well maybe? 'Z' is an obsolete equivalent of standard 'z'. That one is portable and it is, indeed, available in userland (libc6 and anything C99-compliant). To quote the manpage: z A following integer conversion corresponds to a size_t or ssize_t argument. (Linux libc5 has Z with this meaning. Don't use it.) t A following integer conversion corresponds to a ptrdiff_t argu- ment. Please, do s/Zd/zd/. One more thing: folks, please stop using crap like "%08x", (int)pointer. It's not only non-portable (consider 64bit boxen), it's extra work for no good reason. "%p" is standard and will do the right thing with less PITA. - 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/