From: giedrius.statkevicius@gmail.com (Giedrius Statkevičius)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 10/10] mach-osiris-dvs.c : use "&&" (not "&") with bool operands
Date: Fri, 13 Mar 2015 16:47:30 +0200 [thread overview]
Message-ID: <5502F882.2010502@gmail.com> (raw)
In-Reply-To: <1426257067-5723-1-git-send-email-ameenali023@gmail.com>
On 2015.03.13 16:31, Ameen Ali wrote:
> itwise AND ("&") was used
> in logical expressions with operands having "bool" type. Replaced
> bitwise AND operators with logical AND.
>
> Signed-off-by : <AmeenAli023@gmail.com
This line's messed up. The correct format is:
Signed-off-by: Full name <email>
Always use checkpatch to check the .patch for these kinds of issues.
Also the Subject: is not properly formatted. Usually we do something
like:
subsystem/architecture: bla bla bla
You can look at the 'git log' for examples and format it similarly.
> ---
> arch/arm/mach-s3c24xx/mach-osiris-dvs.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
> index ce2db23..e189836 100644
> --- a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
> +++ b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
> @@ -70,16 +70,16 @@ 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);
>
--
Thanks,
Giedrius
WARNING: multiple messages have this Message-ID (diff)
From: "Giedrius Statkevičius" <giedrius.statkevicius@gmail.com>
To: Ameen Ali <ameenali023@gmail.com>,
kgene@kernel.org, linux@arm.linux.org.uk
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 10/10] mach-osiris-dvs.c : use "&&" (not "&") with bool operands
Date: Fri, 13 Mar 2015 16:47:30 +0200 [thread overview]
Message-ID: <5502F882.2010502@gmail.com> (raw)
In-Reply-To: <1426257067-5723-1-git-send-email-ameenali023@gmail.com>
On 2015.03.13 16:31, Ameen Ali wrote:
> itwise AND ("&") was used
> in logical expressions with operands having "bool" type. Replaced
> bitwise AND operators with logical AND.
>
> Signed-off-by : <AmeenAli023@gmail.com
This line's messed up. The correct format is:
Signed-off-by: Full name <email>
Always use checkpatch to check the .patch for these kinds of issues.
Also the Subject: is not properly formatted. Usually we do something
like:
subsystem/architecture: bla bla bla
You can look at the 'git log' for examples and format it similarly.
> ---
> arch/arm/mach-s3c24xx/mach-osiris-dvs.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
> index ce2db23..e189836 100644
> --- a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
> +++ b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
> @@ -70,16 +70,16 @@ 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);
>
--
Thanks,
Giedrius
next prev parent reply other threads:[~2015-03-13 14:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 14:31 [PATCH 10/10] mach-osiris-dvs.c : use "&&" (not "&") with bool operands Ameen Ali
2015-03-13 14:31 ` Ameen Ali
2015-03-13 14:47 ` Giedrius Statkevičius [this message]
2015-03-13 14:47 ` Giedrius Statkevičius
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=5502F882.2010502@gmail.com \
--to=giedrius.statkevicius@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.