From: Johnson Wang <johnson.wang@mediatek.com>
To: <matthias.bgg@kernel.org>, <dan.carpenter@oracle.com>
Cc: <linux-pm@vger.kernel.org>, <linux-mediatek@lists.infradead.org>,
<angelogioacchino.delregno@collabora.com>,
Matthias Brugger <matthias.bgg@gmail.com>
Subject: Re: [PATCH] PM / devfreq: mediatek: Fix unnecessary check of drvdata
Date: Tue, 21 Jun 2022 16:26:35 +0800 [thread overview]
Message-ID: <1b58a827f2b7a4798091c785a845465ed18e331a.camel@mediatek.com> (raw)
In-Reply-To: <20220620154347.14756-1-matthias.bgg@kernel.org>
On Mon, 2022-06-20 at 17:43 +0200, matthias.bgg@kernel.org wrote:
> From: Matthias Brugger <matthias.bgg@gmail.com>
>
> Probe function will error out if drvdata 'mtk_ccifreq_drv' is null.
> So when mtk_ccifreq_target get's called, the drv pointer will never
> be
> NULL. This fixes a static checker warning.
>
> Cc: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> ---
> drivers/devfreq/mtk-cci-devfreq.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/devfreq/mtk-cci-devfreq.c b/drivers/devfreq/mtk-
> cci-devfreq.c
> index 71abb3fbd042..ad05b152071d 100644
> --- a/drivers/devfreq/mtk-cci-devfreq.c
> +++ b/drivers/devfreq/mtk-cci-devfreq.c
> @@ -132,9 +132,6 @@ static int mtk_ccifreq_target(struct device *dev,
> unsigned long *freq,
> unsigned long opp_rate;
> int voltage, pre_voltage, inter_voltage, target_voltage, ret;
>
> - if (!drv)
> - return -EINVAL;
> -
> if (drv->pre_freq == *freq)
> return 0;
>
Hi Matthias,
Thank you for improving this driver.
I've tested this patch on the MT8183 and MT8186 platforms.
Tested-by: Johnson Wang <johnson.wang@mediatek.com>
BRs,
Johnson Wang
prev parent reply other threads:[~2022-06-21 8:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-20 15:43 [PATCH] PM / devfreq: mediatek: Fix unnecessary check of drvdata matthias.bgg
2022-06-21 7:31 ` AngeloGioacchino Del Regno
2022-06-21 8:26 ` Johnson Wang [this message]
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=1b58a827f2b7a4798091c785a845465ed18e331a.camel@mediatek.com \
--to=johnson.wang@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=dan.carpenter@oracle.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=matthias.bgg@kernel.org \
/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