Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933140AbZAQXh7 (ORCPT ); Sat, 17 Jan 2009 18:37:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761680AbZAQXht (ORCPT ); Sat, 17 Jan 2009 18:37:49 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:32821 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761620AbZAQXhs (ORCPT ); Sat, 17 Jan 2009 18:37:48 -0500 Date: Sun, 18 Jan 2009 10:37:22 +1100 (EST) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Kyle McMartin cc: "H. Peter Anvin" , Ingo Molnar , Mikael Pettersson , Linux Kernel Mailing List Subject: Re: "eliminate warn_on_slowpath()" change causes many gcc-3.2.3 warnings In-Reply-To: <20090117204421.GA1700@bombadil.infradead.org> Message-ID: References: <200901171519.n0HFJZuf028704@harpo.it.uu.se> <20090117161817.GA10825@elte.hu> <49723912.6020108@zytor.com> <20090117204421.GA1700@bombadil.infradead.org> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 903 Lines: 28 On Sat, 17 Jan 2009, Kyle McMartin wrote: > > How about something utterly evil? (Since you can't pass a zero-length > string to a printf attributed function either...) Don't do this. That just forces a load off a complex pointer instead, with no upsides. At least if it was extern const char warn_slowpath_nofmt[]; it would only load the pointer itself, which is still a fairly expensive op, but at least doesn't require the extra memory load. But you'd be better off jusst making it something like #define NO_FMT ((const char *)(-1)) instead, which is really much more obvious, and doesn't need any of that "get a pointer" overhead. Linus -- 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/