Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp580099img; Fri, 22 Mar 2019 04:28:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqySlXV+46+s004dqJ2LKJ4SqiAq0FcEdnQt1PveObb6cbWOPFH0JxSS2TD0Lu+qCO0XMZp9 X-Received: by 2002:a63:1247:: with SMTP id 7mr4400212pgs.352.1553254086657; Fri, 22 Mar 2019 04:28:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553254086; cv=none; d=google.com; s=arc-20160816; b=siiiErW6cWVruB5gOhJTghXLcO+h67EmXJYk9kMKUGr93B0g+SjNZd9yp3eESaIzQp 3tJSlVzG/b8LmcOm3GfbnmTT7RlTLzOG9wMS9S/yQsDU/EXMKT9UxVqZyy8ps7435t60 37YsTXGK8T9fiZidJanEvkKaaZjmlKufrLbswXlPGhse3z7V5C83AwihZZ1bSTqk38Su ++EzL6KJDLUwOmIDH4Nblp91Bf5p7H4sKEDMnkygSYbv6HVM2oqMYKz3cZD0P7qKFKiL qLzxg4Z8F+l0r8nfETjloUfyJaRxWjUogNpdG8fdmuwRKfWfAUKdfHD70VE3P+zuNNTT XxVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mDS8XnuYrSMRI5Q95XilH5da2ksrEUTo9X0sNuGgVg0=; b=jMoMPaNWOnuboLsPbRQVeF/JXkW/C1ZBjuA/7NHV1fY5M0161aM6/iXxeynPvZRv43 EUFYHci2+RaZI0WLs6rwO3YxeVIoPfM55JzKSUxyh3eAz83GsVDn9is+sMoWMFQi+L9Q DbkRAo9K+tXkrUKARgxf0CTuzSo7xo7X+CdCrd/59cQ5J07xO6IokQRXfJCPZMamUXAM MA5caZkKj2JzAr50Io9h47LddtFyzkpLa6wau/zys0Hn8ylMLJEDCIwEqV1wQS60jUSU i6rvF6n48Hb/aasC0SpRxxvMjyYCTpImWKXSPZbMoKx8fnbWpD82Nv0kMAgemlm7VS1j tcrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jxSqqDl8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id go2si6678500plb.270.2019.03.22.04.27.51; Fri, 22 Mar 2019 04:28:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jxSqqDl8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728508AbfCVL0Y (ORCPT + 99 others); Fri, 22 Mar 2019 07:26:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:54020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729394AbfCVL0P (ORCPT ); Fri, 22 Mar 2019 07:26:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 60D2E20657; Fri, 22 Mar 2019 11:26:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553253974; bh=6zZXyh6ObCwwl4V2tIiGwrv1BdjEWUmH4N4hUXbou3g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jxSqqDl8NSQymZwUvZ62vfnG5Iwnnn9d9CPJzRM1klfnfItgO6xp4b00jnV5Pp33T 5ArgZCQSxniZDuZKZ5Ywv5atrtON6r01GDM26d9AxwRGAmzXxMQoeYmicdPNwZ4r3b tBaZwBqNPvmJTW5jJV5OQFBqIDKs2sCDupPMBMNs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Gustavo A. R. Silva" , Krzysztof Kozlowski Subject: [PATCH 3.18 128/134] ARM: s3c24xx: Fix boolean expressions in osiris_dvs_notify Date: Fri, 22 Mar 2019 12:15:41 +0100 Message-Id: <20190322111219.755765860@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190322111210.465931067@linuxfoundation.org> References: <20190322111210.465931067@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Gustavo A. R. Silva commit e2477233145f2156434afb799583bccd878f3e9f upstream. Fix boolean expressions by using logical AND operator '&&' instead of bitwise operator '&'. This issue was detected with the help of Coccinelle. Fixes: 4fa084af28ca ("ARM: OSIRIS: DVS (Dynamic Voltage Scaling) supoort.") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva [krzk: Fix -Wparentheses warning] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Greg Kroah-Hartman --- arch/arm/mach-s3c24xx/mach-osiris-dvs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- 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 noti 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);