From: Linus Torvalds <torvalds@linux-foundation.org>
To: Kyle McMartin <kyle@infradead.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
Mikael Pettersson <mikpe@it.uu.se>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: "eliminate warn_on_slowpath()" change causes many gcc-3.2.3 warnings
Date: Sun, 18 Jan 2009 10:37:22 +1100 (EST) [thread overview]
Message-ID: <alpine.LFD.2.00.0901181032350.3006@localhost.localdomain> (raw)
In-Reply-To: <20090117204421.GA1700@bombadil.infradead.org>
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
next prev parent reply other threads:[~2009-01-17 23:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-17 15:19 Mikael Pettersson
2009-01-17 16:18 ` Ingo Molnar
2009-01-17 20:01 ` H. Peter Anvin
2009-01-17 20:44 ` Kyle McMartin
2009-01-17 20:57 ` Kyle McMartin
2009-01-17 21:07 ` H. Peter Anvin
2009-01-17 21:38 ` Kyle McMartin
2009-01-17 23:37 ` Linus Torvalds [this message]
2009-01-17 23:40 ` H. Peter Anvin
2009-01-18 0:01 ` Linus Torvalds
2009-01-18 0:10 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.0901181032350.3006@localhost.localdomain \
--to=torvalds@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=kyle@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@it.uu.se \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®