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] [day] [month] [year] [list]
Message-ID: <20231109192639.77yjq7o2bioyvf5j@pengutronix.de>
Date:   Thu, 9 Nov 2023 20:26:39 +0100
From:   Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To:     Marek Szyprowski <m.szyprowski@...sung.com>
Cc:     linux-arm-kernel@...ts.infradead.org,
        linux-samsung-soc@...r.kernel.org, linux-pwm@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        Alim Akhtar <alim.akhtar@...sung.com>,
        Thierry Reding <thierry.reding@...il.com>,
        Sam Protsenko <semen.protsenko@...aro.org>,
        Dan Carpenter <dan.carpenter@...aro.org>
Subject: Re: [PATCH 1/2] pwm: samsung: Fix broken resume after putting
 per-channel data into driver data

Hello,

On Thu, Nov 09, 2023 at 11:47:47AM +0100, Marek Szyprowski wrote:
> PWMF_EXPORTED is misleadingly used as a bit numer in the pwm->flags, not
> as a flag value, so the proper test for it must use test_bit() helper.
> This fixes broken resume after putting per-channel data into driver data.
> 
> Fixes: e3fe982b2e4e ("pwm: samsung: Put per-channel data into driver data")
> Signed-off-by: Marek Szyprowski <m.szyprowski@...sung.com>
> ---
>  drivers/pwm/pwm-samsung.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pwm/pwm-samsung.c b/drivers/pwm/pwm-samsung.c
> index 568491ed6829..69d9f4577b34 100644
> --- a/drivers/pwm/pwm-samsung.c
> +++ b/drivers/pwm/pwm-samsung.c
> @@ -631,7 +631,7 @@ static int pwm_samsung_resume(struct device *dev)
>  		struct pwm_device *pwm = &chip->pwms[i];
>  		struct samsung_pwm_channel *chan = &our_chip->channel[i];
>  
> -		if (!(pwm->flags & PWMF_REQUESTED))
> +		if (!test_bit(PWMF_REQUESTED, &pwm->flags))
>  			continue;

This is prior art:
https://lore.kernel.org/linux-pwm/e031db45-add0-4da7-97fa-dee95ee936ad@moroto.mountain/

unfortunately this was missed to be included in Thierry's PR for
v6.7-rc1 :-\

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ