mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] media: qcom: iris: initialize OPP pointer at declaration
@ 2026-06-08 12:05 ` Hungyu Lin
  2026-07-28 13:15   ` Bryan O'Donoghue
  2026-07-28 13:57   ` Dmitry Baryshkov
  0 siblings, 2 replies; 3+ messages in thread
From: Hungyu Lin @ 2026-06-08 12:05 UTC (permalink / raw)
  To: vikash.garodia, dikshita.agarwal, bod, mchehab, linux-media
  Cc: abhinav.kumar, linux-arm-msm, linux-kernel, dmitry.baryshkov, Hungyu Lin

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] media: qcom: iris: initialize OPP pointer at declaration
  2026-06-08 12:05 ` [PATCH v2] media: qcom: iris: initialize OPP pointer at declaration Hungyu Lin
@ 2026-07-28 13:15   ` Bryan O'Donoghue
  2026-07-28 13:57   ` Dmitry Baryshkov
  1 sibling, 0 replies; 3+ messages in thread
From: Bryan O'Donoghue @ 2026-07-28 13:15 UTC (permalink / raw)
  To: Hungyu Lin, vikash.garodia, dikshita.agarwal, mchehab, linux-media
  Cc: abhinav.kumar, linux-arm-msm, linux-kernel, dmitry.baryshkov

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] media: qcom: iris: initialize OPP pointer at declaration
  2026-06-08 12:05 ` [PATCH v2] media: qcom: iris: initialize OPP pointer at declaration Hungyu Lin
  2026-07-28 13:15   ` Bryan O'Donoghue
@ 2026-07-28 13:57   ` Dmitry Baryshkov
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Baryshkov @ 2026-07-28 13:57 UTC (permalink / raw)
  To: Hungyu Lin
  Cc: vikash.garodia, dikshita.agarwal, bod, mchehab, linux-media,
	abhinav.kumar, linux-arm-msm, linux-kernel, dmitry.baryshkov

On Mon, Jun 08, 2026 at 12:05:31PM +0000, 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(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

> 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-28 13:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <p8NSmvECOk-_jIx5uEArAnQfJobHR1C_jG70cWLVtkRStz0rvBYXIAo_84HqPEqAcXpiSbAxVuyosr4vkDMjWQ==@protonmail.internalid>
2026-06-08 12:05 ` [PATCH v2] media: qcom: iris: initialize OPP pointer at declaration Hungyu Lin
2026-07-28 13:15   ` Bryan O'Donoghue
2026-07-28 13:57   ` Dmitry Baryshkov

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®