From: Andrew Morton <akpm@linux-foundation.org>
To: Javi Merino <javi.merino@arm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] smp: harmonize prototypes of smp functions
Date: Tue, 17 Sep 2013 14:22:28 -0700 [thread overview]
Message-ID: <20130917142228.0cb08371ea5259ca53055fe4@linux-foundation.org> (raw)
In-Reply-To: <1378132393-17089-1-git-send-email-javi.merino@arm.com>
On Mon, 2 Sep 2013 15:33:13 +0100 Javi Merino <javi.merino@arm.com> wrote:
> Avoid unnecessary casts from int to bool in smp functions. Some
> functions in kernel/smp.c have a wait parameter that can be set to one
> if you want to wait for the command to complete. It's defined as bool
> in a few of them and int in the rest. If a function with wait
> declared as int calls a function whose prototype has wait defined as
> bool, the compiler needs to test if the int is != 0 and change it to 1
> if so. This useless check can be avoided if we are consistent and
> make all the functions use the same type for this parameter.
Yes, that's a problem with bool.
But the `wait' argument *is* a boolean and switching everything over to
use "bool" (instead of "int") should provide similar code-size savings.
Did you evaluate that approach?
next prev parent reply other threads:[~2013-09-17 21:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-02 14:33 Javi Merino
2013-09-17 21:22 ` Andrew Morton [this message]
2013-09-18 8:35 ` Javi Merino
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=20130917142228.0cb08371ea5259ca53055fe4@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=javi.merino@arm.com \
--cc=linux-kernel@vger.kernel.org \
/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®