From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Hungyu Lin <dennylin0707@gmail.com>,
vikash.garodia@oss.qualcomm.com,
dikshita.agarwal@oss.qualcomm.com, mchehab@kernel.org,
linux-media@vger.kernel.org
Cc: abhinav.kumar@linux.dev, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, dmitry.baryshkov@linaro.org
Subject: Re: [PATCH v2] media: qcom: iris: initialize OPP pointer at declaration
Date: Tue, 28 Jul 2026 14:15:46 +0100 [thread overview]
Message-ID: <a04ddd8c-ce8a-4543-8276-9252447e80a3@linaro.org> (raw)
In-Reply-To: <20260608120531.83459-1-dennylin0707@gmail.com>
On 08/06/2026 13:05, Hungyu Lin wrote:
> Initialize the managed OPP pointer at declaration rather than
> assigning it in a separate statement.
>
> This avoids a checkpatch warning about a potentially uninitialized
> managed pointer.
>
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---
> Changes in v2:
> - Initialize the managed pointer directly at declaration as suggested
> by Dmitry Baryshkov.
>
> drivers/media/platform/qcom/iris/iris_resources.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_resources.c b/drivers/media/platform/qcom/iris/iris_resources.c
> index 773f6548370a..fd643cbff8d2 100644
> --- a/drivers/media/platform/qcom/iris/iris_resources.c
> +++ b/drivers/media/platform/qcom/iris/iris_resources.c
> @@ -61,9 +61,9 @@ int iris_unset_icc_bw(struct iris_core *core)
>
> int iris_opp_set_rate(struct device *dev, unsigned long freq)
> {
> - struct dev_pm_opp *opp __free(put_opp);
> + struct dev_pm_opp *opp __free(put_opp) =
> + devfreq_recommended_opp(dev, &freq, 0);
>
> - opp = devfreq_recommended_opp(dev, &freq, 0);
> if (IS_ERR(opp))
> return PTR_ERR(opp);
>
> --
> 2.34.1
>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
next prev parent reply other threads:[~2026-07-28 13:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <p8NSmvECOk-_jIx5uEArAnQfJobHR1C_jG70cWLVtkRStz0rvBYXIAo_84HqPEqAcXpiSbAxVuyosr4vkDMjWQ==@protonmail.internalid>
2026-06-08 12:05 ` Hungyu Lin
2026-07-28 13:15 ` Bryan O'Donoghue [this message]
2026-07-28 13:57 ` Dmitry Baryshkov
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=a04ddd8c-ce8a-4543-8276-9252447e80a3@linaro.org \
--to=bryan.odonoghue@linaro.org \
--cc=abhinav.kumar@linux.dev \
--cc=dennylin0707@gmail.com \
--cc=dikshita.agarwal@oss.qualcomm.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=vikash.garodia@oss.qualcomm.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
all inboxes | Powered by JetHome®