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: <20231006102641.GZ3208943@black.fi.intel.com>
Date:   Fri, 6 Oct 2023 13:26:41 +0300
From:   Mika Westerberg <mika.westerberg@...ux.intel.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
        Andy Shevchenko <andy@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Raag Jadav <raag.jadav@...el.com>
Subject: Re: [PATCH v1 2/2] pinctrl: cherryview: Simplify code with cleanup
 helpers

On Fri, Oct 06, 2023 at 12:40:33PM +0300, Andy Shevchenko wrote:
> @@ -1119,28 +1099,26 @@ static struct pinctrl_desc chv_pinctrl_desc = {
>  static int chv_gpio_get(struct gpio_chip *chip, unsigned int offset)
>  {
>  	struct intel_pinctrl *pctrl = gpiochip_get_data(chip);
> -	unsigned long flags;
>  	u32 ctrl0, cfg;
>  
> -	raw_spin_lock_irqsave(&chv_lock, flags);
> -	ctrl0 = chv_readl(pctrl, offset, CHV_PADCTRL0);
> -	raw_spin_unlock_irqrestore(&chv_lock, flags);
> +	scoped_guard(raw_spinlock_irqsave, &chv_lock)
> +		ctrl0 = chv_readl(pctrl, offset, CHV_PADCTRL0);
>  
>  	cfg = ctrl0 & CHV_PADCTRL0_GPIOCFG_MASK;
>  	cfg >>= CHV_PADCTRL0_GPIOCFG_SHIFT;
>  
>  	if (cfg == CHV_PADCTRL0_GPIOCFG_GPO)
>  		return !!(ctrl0 & CHV_PADCTRL0_GPIOTXSTATE);
> +

Unrelated whitespace change.

Otherwise looks good,

Acked-by: Mika Westerberg <mika.westerberg@...ux.intel.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ