All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-pwm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Sam Protsenko <semen.protsenko@linaro.org>,
	Dan Carpenter <dan.carpenter@linaro.org>
Subject: Re: [PATCH 1/2] pwm: samsung: Fix broken resume after putting per-channel data into driver data
Date: Thu, 9 Nov 2023 20:26:39 +0100	[thread overview]
Message-ID: <20231109192639.77yjq7o2bioyvf5j@pengutronix.de> (raw)
In-Reply-To: <20231109104748.2746839-1-m.szyprowski@samsung.com>

[-- Attachment #1: Type: text/plain, Size: 1401 bytes --]

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@samsung.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/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-pwm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Sam Protsenko <semen.protsenko@linaro.org>,
	Dan Carpenter <dan.carpenter@linaro.org>
Subject: Re: [PATCH 1/2] pwm: samsung: Fix broken resume after putting per-channel data into driver data
Date: Thu, 9 Nov 2023 20:26:39 +0100	[thread overview]
Message-ID: <20231109192639.77yjq7o2bioyvf5j@pengutronix.de> (raw)
In-Reply-To: <20231109104748.2746839-1-m.szyprowski@samsung.com>


[-- Attachment #1.1: Type: text/plain, Size: 1401 bytes --]

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@samsung.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/ |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-11-09 19:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20231109104758eucas1p2e98e8cf22a42aae212a98228e46b4438@eucas1p2.samsung.com>
2023-11-09 10:47 ` [PATCH 1/2] pwm: samsung: Fix broken resume after putting per-channel data into driver data Marek Szyprowski
2023-11-09 10:47   ` Marek Szyprowski
     [not found]   ` <CGME20231109104759eucas1p1fc7343ea2b113abd18397833d70d6835@eucas1p1.samsung.com>
2023-11-09 10:47     ` [PATCH 2/2] pwm: Clarify PWMF_* enums definition Marek Szyprowski
2023-11-09 10:47       ` Marek Szyprowski
2023-11-09 17:17       ` Sam Protsenko
2023-11-09 17:17         ` Sam Protsenko
2023-11-09 17:18   ` [PATCH 1/2] pwm: samsung: Fix broken resume after putting per-channel data into driver data Sam Protsenko
2023-11-09 17:18     ` Sam Protsenko
2023-11-09 19:26   ` Uwe Kleine-König [this message]
2023-11-09 19:26     ` Uwe Kleine-König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231109192639.77yjq7o2bioyvf5j@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=alim.akhtar@samsung.com \
    --cc=dan.carpenter@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=semen.protsenko@linaro.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.