Received: by 10.213.65.68 with SMTP id h4csp1001734imn; Sat, 24 Mar 2018 00:15:32 -0700 (PDT) X-Google-Smtp-Source: AG47ELuFmBqNva7LckZ1PleIU6DDcq3nURytXEJm4Vktv857TX5nBmk/N+ZQYNIrVgQnRgs6BIUl X-Received: by 2002:a17:902:6ec5:: with SMTP id l5-v6mr32300316pln.113.1521875732105; Sat, 24 Mar 2018 00:15:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521875732; cv=none; d=google.com; s=arc-20160816; b=F55Oi9Kyo9ztbtd3O5UgZcK7heMs6+sxmzQavVXUQ8eoQvtsDqgOE6irJOHPoDtu5z sfhXb3fiJUObQGoJV0xlZZAXDk56P7QLJiiE/dxJ+WsX2pDDfBv/z5NPnPnSHztQrFCO 6ie6EhVWPZNSCgGAnDma3etU7AvVPx9Nq+cpl/TCQnMYNrKORcNehtChXH1jGtDv7xOT ESS/syRujcSSHXYRN6k3SOpy+vDZpO8FN7+715jBw5eUzLWEttYdrlaqtfpRdElMWbyf vHdqFeudvUkAmer/rqzUW0VNpwEKPnt1agmfBaLE8WOl/Tx0Qx3FgDTGWunuvO48pw7C gvAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=tVxztMevHakwbdXV5krhs0AadCkefzPVSV8lqE3Skik=; b=OIB1zrSWRRgOt9P5FNEKWXdyxBlMIjA+Lg5VRnIgbTriE/QPuZgLezpI8HuU2KSmfq 0r2pEifh/gEZ9QnwgL4gunvf8tTt4Dl8fv6r+VOTgH3vuD11j8awnKbt9EXrxrZAycSj rqsPHOlq1yXnXI0feo/OY0s3ACQDspRWrQvDL1qYUJ2/Q6mYXln/CWO1HwcV8Rm4ihKu gpuOwg7/+y1Pa2tDs4NyyfEhJUw77szbc0gL33hCh10kJYYPg5xLxzljcuvH7l47yNj0 VbWA4EaJYTvEieKofceKgBad2seI+9rken5K0I4clpeWlfAOQV1xY4jRZCMeuS8/PIRS ID0A== ARC-Authentication-Results: i=1; mx.google.com; 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 z13-v6si9822473plo.614.2018.03.24.00.15.17; Sat, 24 Mar 2018 00:15:32 -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; 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 S1751841AbeCXHOU (ORCPT + 99 others); Sat, 24 Mar 2018 03:14:20 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:25311 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751699AbeCXHOS (ORCPT ); Sat, 24 Mar 2018 03:14:18 -0400 X-UUID: e1b9e5066b32427ea6d264f6105da62e-20180324 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 910130037; Sat, 24 Mar 2018 15:14:14 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Sat, 24 Mar 2018 15:14:12 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Sat, 24 Mar 2018 15:14:12 +0800 Message-ID: <1521875652.28226.29.camel@mtkswgap22> Subject: Re: [PATCH v1 06/16] rtc: mediatek: remove unnecessary parentheses From: Sean Wang To: Alexandre Belloni CC: , , , , , , , , , , Date: Sat, 24 Mar 2018 15:14:12 +0800 In-Reply-To: <20180323102123.GG3417@piout.net> References: <92d07e90f43899981a82fbc684c3d15aaecaf591.1521794177.git.sean.wang@mediatek.com> <20180323102123.GG3417@piout.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-12.5.0.5042-8.2.9001-23738.005 X-TM-AS-Result: No-11.586300-8.000000-10 X-TMASE-MatchedRID: pBwXUM+nCwsOwH4pD14DsPHkpkyUphL9+Vb3woyMZbs7Pn66tDbCt3nv qbLkjGO6xUlM+UQkYGPbCHv011Gy9ZCoy9iDotiwaK+MsTwM+1nyCFKQHr4iUuIpRqgiF5rt+Hm BPyReSgyuv3vwUNtBWJGTpe1iiCJq71zr0FZRMbALbigRnpKlKSPzRlrdFGDwtpHrB0PBLDf5ar 8vnv02KV5WhwOfIZfOhu75pgsqcy0cHSFvc3VC3w== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--11.586300-8.000000 X-TMASE-Version: SMEX-12.5.0.5042-8.2.9001-23738.005 X-TMASE-POSTMAN: 2-d; X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2018-03-23 at 11:21 +0100, Alexandre Belloni wrote: > On 23/03/2018 at 17:15:03 +0800, sean.wang@mediatek.com wrote: > > From: Sean Wang > > > > Remove unnecessary parentheses due to explicit C operator precedence. > > > > Signed-off-by: Sean Wang > > --- > > drivers/rtc/rtc-mt6397.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/rtc/rtc-mt6397.c b/drivers/rtc/rtc-mt6397.c > > index 0df7ccd..4411c08 100644 > > --- a/drivers/rtc/rtc-mt6397.c > > +++ b/drivers/rtc/rtc-mt6397.c > > @@ -106,7 +106,7 @@ static irqreturn_t mtk_rtc_irq_handler_thread(int irq, void *data) > > int ret; > > > > ret = regmap_read(rtc->regmap, rtc->addr_base + RTC_IRQ_STA, &irqsta); > > - if ((ret >= 0) && (irqsta & RTC_IRQ_STA_AL)) { > > + if (ret >= 0 && irqsta & RTC_IRQ_STA_AL) { > > I don't think this makes the code particularly clearer. > But it is still a one of check items in checkpatch CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'ret >= 0' #126: FILE: drivers/rtc/rtc-xxx.c:109: + if ((ret >= 0) && (irqsta & RTC_IRQ_STA_AL)) { or we still want to keep it in parentheses around here? > > rtc_update_irq(rtc->rtc_dev, 1, RTC_IRQF | RTC_AF); > > irqen = irqsta & ~RTC_IRQ_EN_AL; > > mutex_lock(&rtc->lock); > > -- > > 2.7.4 > > >