From: Andrew Morton <akpm@linux-foundation.org>
To: Cesar Eduardo Barros <cesarb@cesarb.net>
Cc: linux-kernel@vger.kernel.org, rolandd@cisco.com,
cesarb@cesarb.net, dwalker@fifo99.com
Subject: Re: [PATCH] WARN_ONCE(): use bool for condition
Date: Tue, 29 Sep 2009 13:59:47 -0700 [thread overview]
Message-ID: <20090929135947.7ccc3d8c.akpm@linux-foundation.org> (raw)
In-Reply-To: <1254075912-17557-1-git-send-email-cesarb@cesarb.net>
On Sun, 27 Sep 2009 15:25:12 -0300
Cesar Eduardo Barros <cesarb@cesarb.net> wrote:
> Use the type bool for __ret_warn_once and __ret_warn_on, instead of int
> with a double negation. This matches the intent of the code better and
> should allow the compiler to generate better code, like in commit
> 70867453092297be9afb2249e712a1f960ec0a09. However, some versions of gcc
> seems to pessimize the code instead when the condition is not trivial.
>
> Cc: Daniel Walker <dwalker@fifo99.com>
> Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
> ---
> arch/avr32/include/asm/bug.h | 2 +-
> arch/blackfin/include/asm/bug.h | 2 +-
> arch/parisc/include/asm/bug.h | 2 +-
> arch/powerpc/include/asm/bug.h | 2 +-
> arch/s390/include/asm/bug.h | 2 +-
> arch/sh/include/asm/bug.h | 4 ++--
> include/asm-generic/bug.h | 12 ++++++------
There's a small reject in include/asm-generic/bug.h against current
mainline, easily fixed.
It would be nice if we had some accurate numbers on the kernel size
reductions from this, please. I assume that the patch is still of
benefit in 2.6.32-rc1(2?), but it's always good to confirm.
next prev parent reply other threads:[~2009-09-29 21:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-27 13:53 [PATCH] WARN_ONCE(): use bool for boolean flag Cesar Eduardo Barros
2009-09-27 14:03 ` Daniel Walker
2009-09-27 15:56 ` Cesar Eduardo Barros
2009-09-27 16:52 ` Daniel Walker
2009-09-27 17:24 ` Cesar Eduardo Barros
2009-09-27 17:32 ` Daniel Walker
2009-09-27 17:48 ` Cesar Eduardo Barros
2009-09-27 18:12 ` Cesar Eduardo Barros
2009-09-27 18:25 ` [PATCH] WARN_ONCE(): use bool for condition Cesar Eduardo Barros
2009-09-27 18:28 ` Daniel Walker
2009-09-27 18:55 ` Cesar Eduardo Barros
2009-09-27 19:03 ` Daniel Walker
2009-09-29 20:59 ` Andrew Morton [this message]
2009-09-29 23:11 ` Cesar Eduardo Barros
2009-09-29 23:12 ` [PATCH] WARN_ONCE(): use bool for boolean flag Cesar Eduardo Barros
2009-09-30 0:17 ` Andrew Morton
2009-09-30 0:37 ` Cesar Eduardo Barros
2009-09-29 23:18 ` [PATCH] WARN_ONCE(): use bool for condition Cesar Eduardo Barros
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=20090929135947.7ccc3d8c.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=cesarb@cesarb.net \
--cc=dwalker@fifo99.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rolandd@cisco.com \
/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