From: Inki Dae <inki.dae@samsung.com>
To: Tian Tao <tiantao6@hisilicon.com>,
airlied@linux.ie, daniel@ffwll.ch,
krzysztof.kozlowski@canonical.com
Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH] drm/exynos: Use pm_runtime_resume_and_get() to replace open coding
Date: Fri, 21 May 2021 13:47:58 +0900 [thread overview]
Message-ID: <0d5b2910-079e-ecd7-0985-e2b0c8c74b24@samsung.com> (raw)
In-Reply-To: <1621517811-64765-1-git-send-email-tiantao6@hisilicon.com>
Hi,
21. 5. 20. 오후 10:36에 Tian Tao 이(가) 쓴 글:
> use pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
> pm_runtime_put_noidle. it also avoids the problem of positive return
> values so we can change if (ret < 0) to if (ret).
Could you tell me why did you change the condition? pm_runtime_resume_and_get() can return only 0 or negative value.
So I think you don't have to change the condition. Could you drop this description?
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> ---
> drivers/gpu/drm/exynos/exynos_drm_mic.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c
> index 3821ea7..6d94eae 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_mic.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c
> @@ -268,11 +268,9 @@ static void mic_pre_enable(struct drm_bridge *bridge)
> if (mic->enabled)
> goto unlock;
>
> - ret = pm_runtime_get_sync(mic->dev);
> - if (ret < 0) {
> - pm_runtime_put_noidle(mic->dev);
> + ret = pm_runtime_resume_and_get(mic->dev);
Right, we can use pm_runtime_resume_and_get function because pm_runtime_resume_and_get function does exactly same thing as existing code does.
> + if (ret)
Seems unnecessary change.
Thanks,
Inki Dae
> goto unlock;
> - }
>
> mic_set_path(mic, 1);
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-05-21 4:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20210520133703epcas1p138cb4b2bc0f0bc0ef45886a16852fa60@epcas1p1.samsung.com>
2021-05-20 13:36 ` [PATCH] drm/exynos: Use pm_runtime_resume_and_get() to replace open coding Tian Tao
2021-05-21 4:47 ` Inki Dae [this message]
2021-05-21 6:08 ` tiantao (H)
2021-05-21 8:36 ` Inki Dae
2021-05-21 8:30 ` tiantao (H)
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=0d5b2910-079e-ecd7-0985-e2b0c8c74b24@samsung.com \
--to=inki.dae@samsung.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=krzysztof.kozlowski@canonical.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=tiantao6@hisilicon.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).