lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180323102123.GG3417@piout.net>
Date:   Fri, 23 Mar 2018 11:21:23 +0100
From:   Alexandre Belloni <alexandre.belloni@...e-electrons.com>
To:     sean.wang@...iatek.com
Cc:     robh+dt@...nel.org, mark.rutland@....com, sre@...nel.org,
        lee.jones@...aro.org, a.zummo@...ertech.it,
        eddie.huang@...iatek.com, devicetree@...r.kernel.org,
        linux-rtc@...r.kernel.org, linux-pm@...r.kernel.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 06/16] rtc: mediatek: remove unnecessary parentheses

On 23/03/2018 at 17:15:03 +0800, sean.wang@...iatek.com wrote:
> From: Sean Wang <sean.wang@...iatek.com>
> 
> Remove unnecessary parentheses due to explicit C operator precedence.
> 
> Signed-off-by: Sean Wang <sean.wang@...iatek.com>
> ---
>  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.

>  		rtc_update_irq(rtc->rtc_dev, 1, RTC_IRQF | RTC_AF);
>  		irqen = irqsta & ~RTC_IRQ_EN_AL;
>  		mutex_lock(&rtc->lock);
> -- 
> 2.7.4
> 

-- 
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ