From: Ben Dooks <ben@simtec.co.uk>
To: Joe Perches <joe@perches.com>
Cc: Ben Dooks <ben-linux@fluff.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] mach-osiris-dvs.c: Convert boolean bit tests to logical tests
Date: Mon, 04 Jan 2010 11:45:32 +0900 [thread overview]
Message-ID: <4B41564C.6080802@simtec.co.uk> (raw)
In-Reply-To: <1262539781.1932.128.camel@Joe-Laptop.home>
Joe Perches wrote:
> Bit tests on booleans seem odd, logical tests more appropriate
I think this is ok, don't currently have any hardware on hand to
test it.
> Signed-off-by: Joe Perches <joe@perches.com>
Ackced-by: Ben Dooks <ben-linux@fluff.org>
> diff --git a/arch/arm/mach-s3c2440/mach-osiris-dvs.c b/arch/arm/mach-s3c2440/mach-osiris-dvs.c
> index ad2792d..2367606 100644
> --- a/arch/arm/mach-s3c2440/mach-osiris-dvs.c
> +++ b/arch/arm/mach-s3c2440/mach-osiris-dvs.c
> @@ -69,16 +69,14 @@ static int osiris_dvs_notify(struct notifier_block *nb,
>
> switch (val) {
> case CPUFREQ_PRECHANGE:
> - if (old_dvs & !new_dvs ||
> - cur_dvs & !new_dvs) {
> + if ((old_dvs && !new_dvs) || (cur_dvs && !new_dvs)) {
> pr_debug("%s: exiting dvs\n", __func__);
> cur_dvs = false;
> gpio_set_value(OSIRIS_GPIO_DVS, 1);
> }
> break;
> case CPUFREQ_POSTCHANGE:
> - if (!old_dvs & new_dvs ||
> - !cur_dvs & new_dvs) {
> + if ((!old_dvs && new_dvs) || (!cur_dvs && new_dvs)) {
> pr_debug("entering dvs\n");
> cur_dvs = true;
> gpio_set_value(OSIRIS_GPIO_DVS, 0);
>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2010-01-04 3:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-03 17:29 Joe Perches
2010-01-04 2:45 ` Ben Dooks [this message]
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=4B41564C.6080802@simtec.co.uk \
--to=ben@simtec.co.uk \
--cc=ben-linux@fluff.org \
--cc=joe@perches.com \
--cc=linux-arm-kernel@lists.infradead.org \
--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
Powered by JetHome