Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp5811276pxb; Sun, 7 Nov 2021 21:03:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjUQdXZIOYuUu7aY+Dx+2s0yEERr3MuVi5ylC9MoGouqvL3eBxo7WEQpzAQ2iR+J29X1pK X-Received: by 2002:a5d:994f:: with SMTP id v15mr12053468ios.88.1636347823384; Sun, 07 Nov 2021 21:03:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636347823; cv=none; d=google.com; s=arc-20160816; b=csJ4R/AFmhxB/RO5w18xcctiHrsK3Far427rXQtuY+noid/1m0AtdXwSHWJN2POsVM YhJkS4Z8wdv0mJ9DOIv9ArrebaaLoxmes3sEkmE4LUNaaWiIQCZKC5zNJGZf+snSNfJ2 adrjR18oznoeKLUgS/GPpn4iopQ07LK2Cnn3R+sivGNX/VW20U9glzzURooUS4d+HPov nUCVX0DXeLTWjv8aFvLjSbnPCwj+uM3c31HBBz6YWKrXrFLmncDul5WCVgTnIE4roZ5W S4flwNcQbDwHky5Zq8tDkWAzkc/oJaOymXxVh4IOmSBD7n+GL/ZQ8MaWD89Lib/FuWxL Zfgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=nzQI1G0aJ9Q9rTY8g3xQtke/fskImAnPzE0SaO9mGX4=; b=xjqaPZ5ENYlxTMDvA67XwX8n9ZH7EHF86tRz4Ray3qfi6Yi6yrE2Vyn/oawGtdqloe HJpLi52jmw4HylfYZ54mpO0dhocRHisJt8+Tble1a9mVjiXpKtelz2RMXh9oriPNuvxW nBTqwUr2J7b30siNwbe73OgpEt9ED6pvYGpc/fRjFZtktf1cmPnzRpX6V5byNl832DYd qquC4A0P0yXGWmF1R0mO1WnCbl4AwVDKawxhS2773OiYWqoTEPhsLIky1x0KHoeP0i2W lEyot6lvk8mtcaXlWs42KqQxR3BF8X+1qXoKnbNJL0cKM82VUh1MaXpSRn0HnlKNUL/Q ZkfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si31194132ile.118.2021.11.07.21.03.28; Sun, 07 Nov 2021 21:03:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236676AbhKGW4j (ORCPT + 99 others); Sun, 7 Nov 2021 17:56:39 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:40335 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236697AbhKGW4i (ORCPT ); Sun, 7 Nov 2021 17:56:38 -0500 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id D2796240003; Sun, 7 Nov 2021 22:53:53 +0000 (UTC) From: Alexandre Belloni To: Alessandro Zummo , Alexandre Belloni Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot Subject: [PATCH] rtc: pcf85063: silence cppcheck warning Date: Sun, 7 Nov 2021 23:53:48 +0100 Message-Id: <20211107225349.110707-1-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cppcheck warnings: (new ones prefixed by >>) >> drivers/rtc/rtc-pcf85063.c:292:40: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] status = status & PCF85063_REG_SC_OS ? RTC_VL_DATA_INVALID : 0; Reported-by: kernel test robot Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-pcf85063.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-pcf85063.c b/drivers/rtc/rtc-pcf85063.c index 4a70d6bae859..15e50bb10cf0 100644 --- a/drivers/rtc/rtc-pcf85063.c +++ b/drivers/rtc/rtc-pcf85063.c @@ -299,7 +299,7 @@ static int pcf85063_ioctl(struct device *dev, unsigned int cmd, if (ret < 0) return ret; - status = status & PCF85063_REG_SC_OS ? RTC_VL_DATA_INVALID : 0; + status = (status & PCF85063_REG_SC_OS) ? RTC_VL_DATA_INVALID : 0; return put_user(status, (unsigned int __user *)arg); -- 2.31.1