Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753582AbaGJMrs (ORCPT ); Thu, 10 Jul 2014 08:47:48 -0400 Received: from mail-la0-f50.google.com ([209.85.215.50]:52905 "EHLO mail-la0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751484AbaGJMrp (ORCPT ); Thu, 10 Jul 2014 08:47:45 -0400 From: Andrey Utkin To: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: linux@arm.linux.org.uk, kgene.kim@samsung.com, ben-linux@fluff.org, dcb314@hotmail.com, Andrey Utkin Subject: [PATCH] arch/arm/mach-s3c24xx/mach-osiris-dvs.c: use "&&" (not "&") with bool operands Date: Thu, 10 Jul 2014 15:47:30 +0300 Message-Id: <1404996450-4617-1-git-send-email-andrey.krieger.utkin@gmail.com> X-Mailer: git-send-email 1.8.3.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The issue was discovered by static analysis. Bitwise AND ("&") was used in logical expressions with operands having "bool" type. Replaced bitwise AND operators with logical AND. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=79781 Reported-by: David Binderman Signed-off-by: Andrey Utkin --- 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 33afb91..b2d620d 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); -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/