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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1544094724.3709.60.camel@pengutronix.de>
Date:   Thu, 06 Dec 2018 12:12:04 +0100
From:   Lucas Stach <l.stach@...gutronix.de>
To:     Andrey Smirnov <andrew.smirnov@...il.com>,
        Marc Zyngier <marc.zyngier@....com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Jason Cooper <jason@...edaemon.net>, cphealy@...il.com,
        Leonard Crestez <leonard.crestez@....com>,
        "A.s. Dong" <aisheng.dong@....com>,
        Richard Zhu <hongxing.zhu@....com>, linux-imx@....com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/5] irqchip/irq-imx-gpcv2: Make use of BIT() macro

Am Mittwoch, den 05.12.2018, 23:31 -0800 schrieb Andrey Smirnov:
> Convert all instances of 1 << x to BIT(x) for consistency with other
> kernel code.
> 
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Jason Cooper <jason@...edaemon.net>
> Cc: Marc Zyngier <marc.zyngier@....com>
> Cc: cphealy@...il.com
> Cc: l.stach@...gutronix.de
> Cc: Leonard Crestez <leonard.crestez@....com>
> Cc: "A.s. Dong" <aisheng.dong@....com>
> Cc: Richard Zhu <hongxing.zhu@....com>
> Cc: linux-imx@....com
> Cc: linux-arm-kernel@...ts.infradead.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Andrey Smirnov <andrew.smirnov@...il.com>

Reviewed-by: Lucas Stach <l.stach@...gutronix.de>

> ---
>  drivers/irqchip/irq-imx-gpcv2.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-
> imx-gpcv2.c
> index b262ba8b2652..077d56b3183a 100644
> --- a/drivers/irqchip/irq-imx-gpcv2.c
> +++ b/drivers/irqchip/irq-imx-gpcv2.c
> @@ -78,7 +78,7 @@ static int imx_gpcv2_irq_set_wake(struct irq_data
> *d, unsigned int on)
>  	u32 mask, val;
>  
>  	raw_spin_lock_irqsave(&cd->rlock, flags);
> -	mask = 1 << d->hwirq % 32;
> +	mask = BIT(d->hwirq % 32);
>  	val = cd->wakeup_sources[idx];
>  
>  	cd->wakeup_sources[idx] = on ? (val & ~mask) : (val | mask);
> @@ -101,7 +101,7 @@ static void imx_gpcv2_irq_unmask(struct irq_data
> *d)
>  	raw_spin_lock(&cd->rlock);
>  	reg = gpcv2_idx_to_reg(cd, d->hwirq / 32);
>  	val = readl_relaxed(reg);
> -	val &= ~(1 << d->hwirq % 32);
> +	val &= ~BIT(d->hwirq % 32);
>  	writel_relaxed(val, reg);
>  	raw_spin_unlock(&cd->rlock);
>  
> @@ -117,7 +117,7 @@ static void imx_gpcv2_irq_mask(struct irq_data
> *d)
>  	raw_spin_lock(&cd->rlock);
>  	reg = gpcv2_idx_to_reg(cd, d->hwirq / 32);
>  	val = readl_relaxed(reg);
> -	val |= 1 << (d->hwirq % 32);
> +	val |= BIT(d->hwirq % 32);
>  	writel_relaxed(val, reg);
>  	raw_spin_unlock(&cd->rlock);
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ