From: Krzysztof Kozlowski <krzk@kernel.org>
To: Zhang Qilong <zhangqilong3@huawei.com>
Cc: matthias.bgg@gmail.com, linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] memory: mtk-smi: Fix PM usage counter unbalance in mtk_smi ops
Date: Wed, 25 Nov 2020 19:32:10 +0100 [thread overview]
Message-ID: <20201125183210.GA3665@kozik-lap> (raw)
In-Reply-To: <20201123102118.3866195-1-zhangqilong3@huawei.com>
On Mon, Nov 23, 2020 at 06:21:18PM +0800, Zhang Qilong wrote:
> pm_runtime_get_sync will increment pm usage counter
> even it failed. Forgetting to putting operation will
> result in reference leak here. We fix it by replacing
> it with pm_runtime_resume_and_get to keep usage counter
> balanced.
>
> Fixes: 4f0a1a1ae3519 ("memory: mtk-smi: Invoke pm runtime_callback to enable clocks")
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
> ---
> drivers/memory/mtk-smi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c
> index ac350f8d1e20..82d09b88240e 100644
> --- a/drivers/memory/mtk-smi.c
> +++ b/drivers/memory/mtk-smi.c
> @@ -130,7 +130,7 @@ static void mtk_smi_clk_disable(const struct mtk_smi *smi)
>
> int mtk_smi_larb_get(struct device *larbdev)
> {
> - int ret = pm_runtime_get_sync(larbdev);
> + int ret = pm_runtime_resume_and_get(larbdev);
Thanks for the patch, but it cannot be applied.
There is no pm_runtime_resume_and_get() in v5.10-rc1. I see you authored it
around middle of November, so don't expect that it gets magically to all
other trees. In such case - when you know that your patch cannot be
applied or you suspect any dependencies, you should describe
requirements for the patch.
Best regards,
Krzysztof
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
next prev parent reply other threads:[~2020-11-25 18:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-23 10:21 [PATCH] memory: mtk-smi: Fix PM usage counter unbalance in mtk_smi ops Zhang Qilong
2020-11-25 18:32 ` Krzysztof Kozlowski [this message]
2020-11-26 1:20 ` 答复: " zhangqilong
2021-01-03 16:32 ` Krzysztof Kozlowski
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=20201125183210.GA3665@kozik-lap \
--to=krzk@kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=zhangqilong3@huawei.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).