From mboxrd@z Thu Jan 1 00:00:00 1970 From: giedrius.statkevicius@gmail.com (=?UTF-8?B?R2llZHJpdXMgU3RhdGtldmnEjWl1cw==?=) Date: Fri, 13 Mar 2015 16:47:30 +0200 Subject: [PATCH 10/10] mach-osiris-dvs.c : use "&&" (not "&") with bool operands In-Reply-To: <1426257067-5723-1-git-send-email-ameenali023@gmail.com> References: <1426257067-5723-1-git-send-email-ameenali023@gmail.com> Message-ID: <5502F882.2010502@gmail.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 : 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756068AbbCMOr4 (ORCPT ); Fri, 13 Mar 2015 10:47:56 -0400 Received: from mail-wg0-f48.google.com ([74.125.82.48]:44815 "EHLO mail-wg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756023AbbCMOrw (ORCPT ); Fri, 13 Mar 2015 10:47:52 -0400 Message-ID: <5502F882.2010502@gmail.com> Date: Fri, 13 Mar 2015 16:47:30 +0200 From: =?UTF-8?B?R2llZHJpdXMgU3RhdGtldmnEjWl1cw==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Ameen Ali , 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 References: <1426257067-5723-1-git-send-email-ameenali023@gmail.com> In-Reply-To: <1426257067-5723-1-git-send-email-ameenali023@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 : 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