mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	linux-arm-msm@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Dan Carpenter <dan.carpenter@linaro.org>,
	Konrad Dybcio <konradybcio@kernel.org>
Subject: Re: [PATCH v3] soc: qcom: icc-bwmon: Fix handling dev_pm_opp_find_bw_*() errors
Date: Mon, 18 Aug 2025 17:09:28 +0200	[thread overview]
Message-ID: <9c581f57-3fe1-4048-bdb6-bc5f403cd1f2@web.de> (raw)
In-Reply-To: <20250818123851.111326-2-krzysztof.kozlowski@linaro.org>

…
> let's make the code just obvious to silence warning reported by Smatch:
> 
>   icc-bwmon.c:693 bwmon_intr_thread() error: 'target_opp' dereferencing possible ERR_PTR()
…

How do you think about to add any tags (like “Fixes” and “Cc”) accordingly?


…
> +++ b/drivers/soc/qcom/icc-bwmon.c
> @@ -656,6 +656,9 @@ static irqreturn_t bwmon_intr_thread(int irq, void *dev_id)
>  	if (IS_ERR(target_opp) && PTR_ERR(target_opp) == -ERANGE)
>  		target_opp = dev_pm_opp_find_bw_floor(bwmon->dev, &bw_kbps, 0);
>  
> +	if (IS_ERR(target_opp))
> +		return IRQ_HANDLED;
> +
>  	bwmon->target_kbps = bw_kbps;
…

Would you like to avoid a duplicate condition check here?

	if (IS_ERR(target_opp) {
		if (PTR_ERR(target_opp) == -ERANGE)
			target_opp = dev_pm_opp_find_bw_floor(bwmon->dev, &bw_kbps, 0);

		return IRQ_HANDLED;
	}


Regards,
Markus

  reply	other threads:[~2025-08-18 15:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18 12:38 Krzysztof Kozlowski
2025-08-18 15:09 ` Markus Elfring [this message]
2025-08-24  2:55 ` Bjorn Andersson

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=9c581f57-3fe1-4048-bdb6-bc5f403cd1f2@web.de \
    --to=markus.elfring@web.de \
    --cc=andersson@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=konradybcio@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®