* [PATCH 10/10] mach-osiris-dvs.c : use "&&" (not "&") with bool operands
@ 2015-03-13 14:31 Ameen Ali
2015-03-13 14:47 ` Giedrius Statkevičius
0 siblings, 1 reply; 2+ messages in thread
From: Ameen Ali @ 2015-03-13 14:31 UTC (permalink / raw)
To: linux-arm-kernel
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
---
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);
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH 10/10] mach-osiris-dvs.c : use "&&" (not "&") with bool operands
2015-03-13 14:31 [PATCH 10/10] mach-osiris-dvs.c : use "&&" (not "&") with bool operands Ameen Ali
@ 2015-03-13 14:47 ` Giedrius Statkevičius
0 siblings, 0 replies; 2+ messages in thread
From: Giedrius Statkevičius @ 2015-03-13 14:47 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-13 14:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-13 14:31 [PATCH 10/10] mach-osiris-dvs.c : use "&&" (not "&") with bool operands Ameen Ali
2015-03-13 14:47 ` Giedrius Statkevičius
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).