* [PATCH] drm/bridge: it6505: Fix return value check for pm_runtime_get_sync
@ 2022-10-27 3:21 Pin-yen Lin
2022-10-27 7:52 ` AngeloGioacchino Del Regno
2022-10-27 11:48 ` Neil Armstrong
0 siblings, 2 replies; 4+ messages in thread
From: Pin-yen Lin @ 2022-10-27 3:21 UTC (permalink / raw)
To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter,
AngeloGioacchino Del Regno
Cc: Pin-yen Lin, linux-kernel, dri-devel
`pm_runtime_get_sync` may return 1 on success. Fix the `if` statement
here to make the code less confusing, even though additional calls to
`it6505_poweron` doesn't break anything when it's already powered.
This was reported by Dan Carpenter <dan.carpenter@oracle.com> in
https://lore.kernel.org/all/Y1fMCs6VnxbDcB41@kili/
Fixes: 10517777d302 ("drm/bridge: it6505: Adapt runtime power management framework")
Signed-off-by: Pin-yen Lin <treapking@chromium.org>
---
drivers/gpu/drm/bridge/ite-it6505.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c
index b929fc766e24..21a9b8422bda 100644
--- a/drivers/gpu/drm/bridge/ite-it6505.c
+++ b/drivers/gpu/drm/bridge/ite-it6505.c
@@ -2699,7 +2699,7 @@ static void it6505_extcon_work(struct work_struct *work)
* pm_runtime_force_resume re-enables runtime power management.
* Handling the error here to make sure the bridge is powered on.
*/
- if (ret)
+ if (ret < 0)
it6505_poweron(it6505);
complete_all(&it6505->extcon_completion);
--
2.38.0.135.g90850a2211-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/bridge: it6505: Fix return value check for pm_runtime_get_sync
2022-10-27 3:21 [PATCH] drm/bridge: it6505: Fix return value check for pm_runtime_get_sync Pin-yen Lin
@ 2022-10-27 7:52 ` AngeloGioacchino Del Regno
2022-10-27 11:48 ` Neil Armstrong
1 sibling, 0 replies; 4+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-10-27 7:52 UTC (permalink / raw)
To: Pin-yen Lin, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec, David Airlie,
Daniel Vetter
Cc: linux-kernel, dri-devel
Il 27/10/22 05:21, Pin-yen Lin ha scritto:
> `pm_runtime_get_sync` may return 1 on success. Fix the `if` statement
> here to make the code less confusing, even though additional calls to
> `it6505_poweron` doesn't break anything when it's already powered.
>
> This was reported by Dan Carpenter <dan.carpenter@oracle.com> in
> https://lore.kernel.org/all/Y1fMCs6VnxbDcB41@kili/
>
> Fixes: 10517777d302 ("drm/bridge: it6505: Adapt runtime power management framework")
> Signed-off-by: Pin-yen Lin <treapking@chromium.org>
>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/bridge: it6505: Fix return value check for pm_runtime_get_sync
2022-10-27 3:21 [PATCH] drm/bridge: it6505: Fix return value check for pm_runtime_get_sync Pin-yen Lin
@ 2022-10-27 11:48 ` Neil Armstrong
2022-10-27 11:48 ` Neil Armstrong
1 sibling, 0 replies; 4+ messages in thread
From: Neil Armstrong @ 2022-10-27 11:48 UTC (permalink / raw)
To: Andrzej Hajda, AngeloGioacchino Del Regno, David Airlie,
Pin-yen Lin, Laurent Pinchart, Jonas Karlman, Robert Foss,
Daniel Vetter, Jernej Skrabec
Cc: dri-devel, linux-kernel
Hi,
On Thu, 27 Oct 2022 11:21:49 +0800, Pin-yen Lin wrote:
> `pm_runtime_get_sync` may return 1 on success. Fix the `if` statement
> here to make the code less confusing, even though additional calls to
> `it6505_poweron` doesn't break anything when it's already powered.
>
> This was reported by Dan Carpenter <dan.carpenter@oracle.com> in
> https://lore.kernel.org/all/Y1fMCs6VnxbDcB41@kili/
>
> [...]
Thanks, Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-next)
[1/1] drm/bridge: it6505: Fix return value check for pm_runtime_get_sync
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=3e4a21a29dd924995f1135cd50e8b7e0d023729c
--
Neil
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/bridge: it6505: Fix return value check for pm_runtime_get_sync
@ 2022-10-27 11:48 ` Neil Armstrong
0 siblings, 0 replies; 4+ messages in thread
From: Neil Armstrong @ 2022-10-27 11:48 UTC (permalink / raw)
To: Andrzej Hajda, AngeloGioacchino Del Regno, David Airlie,
Pin-yen Lin, Laurent Pinchart, Jonas Karlman, Robert Foss,
Daniel Vetter, Jernej Skrabec
Cc: linux-kernel, dri-devel
Hi,
On Thu, 27 Oct 2022 11:21:49 +0800, Pin-yen Lin wrote:
> `pm_runtime_get_sync` may return 1 on success. Fix the `if` statement
> here to make the code less confusing, even though additional calls to
> `it6505_poweron` doesn't break anything when it's already powered.
>
> This was reported by Dan Carpenter <dan.carpenter@oracle.com> in
> https://lore.kernel.org/all/Y1fMCs6VnxbDcB41@kili/
>
> [...]
Thanks, Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-next)
[1/1] drm/bridge: it6505: Fix return value check for pm_runtime_get_sync
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=3e4a21a29dd924995f1135cd50e8b7e0d023729c
--
Neil
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-27 11:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-27 3:21 [PATCH] drm/bridge: it6505: Fix return value check for pm_runtime_get_sync Pin-yen Lin
2022-10-27 7:52 ` AngeloGioacchino Del Regno
2022-10-27 11:48 ` Neil Armstrong
2022-10-27 11:48 ` Neil Armstrong
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.