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: <fdf63e0d-e342-3506-e441-c898c29569c4@linux.alibaba.com>
Date:   Wed, 27 Sep 2023 17:05:10 +0800
From:   Baolin Wang <baolin.wang@...ux.alibaba.com>
To:     Wenhua Lin <Wenhua.Lin@...soc.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Andy Shevchenko <andy@...nel.org>,
        Bartosz Golaszewski <brgl@...ev.pl>
Cc:     Orson Zhai <orsonzhai@...il.com>,
        Chunyan Zhang <zhang.lyra@...il.com>,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
        wenhua lin <wenhua.lin1994@...il.com>,
        Xiongpeng Wu <xiongpeng.wu@...soc.com>
Subject: Re: [PATCH V2 2/2] gpio: pmic-eic-sprd: Add can_sleep flag for PMIC
 EIC chip



On 9/21/2023 8:25 PM, Wenhua Lin wrote:
> The drivers uses a mutex and I2C bus access in its PMIC EIC chip
> get implementation. This means these functions can sleep and the PMIC EIC
> chip should set the can_sleep property to true.
> 
> This will ensure that a warning is printed when trying to get the
> value from a context that potentially can't sleep.

LGTM.
Reviewed-by: Baolin Wang <baolin.wang@...ux.alibaba.com>

> Signed-off-by: Wenhua Lin <Wenhua.Lin@...soc.com>
> ---
>   drivers/gpio/gpio-pmic-eic-sprd.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpio/gpio-pmic-eic-sprd.c b/drivers/gpio/gpio-pmic-eic-sprd.c
> index 442968bb2490..f04a40288638 100644
> --- a/drivers/gpio/gpio-pmic-eic-sprd.c
> +++ b/drivers/gpio/gpio-pmic-eic-sprd.c
> @@ -353,6 +353,7 @@ static int sprd_pmic_eic_probe(struct platform_device *pdev)
>   	pmic_eic->chip.set_config = sprd_pmic_eic_set_config;
>   	pmic_eic->chip.set = sprd_pmic_eic_set;
>   	pmic_eic->chip.get = sprd_pmic_eic_get;
> +	pmic_eic->chip.can_sleep = true;
>   
>   	irq = &pmic_eic->chip.irq;
>   	gpio_irq_chip_set_chip(irq, &pmic_eic_irq_chip);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ