From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: linux-arm-msm@vger.kernel.org
Subject: Re: [bug report] soc: qcom: icc-bwmon: Add bandwidth monitoring driver
Date: Thu, 14 Aug 2025 08:19:22 +0200 [thread overview]
Message-ID: <695a4459-c9fd-4073-bdf2-1339bc65b3c5@linaro.org> (raw)
In-Reply-To: <aJTNEQsRFjrFknG9@stanley.mountain>
On 07/08/2025 17:58, Dan Carpenter wrote:
> Hello Krzysztof Kozlowski,
>
> Commit b9c2ae6cac40 ("soc: qcom: icc-bwmon: Add bandwidth monitoring
> driver") from Jul 4, 2022 (linux-next), leads to the following Smatch
> static checker warning:
>
> drivers/soc/qcom/icc-bwmon.c:693 bwmon_intr_thread()
> error: 'target_opp' dereferencing possible ERR_PTR()
>
> drivers/soc/qcom/icc-bwmon.c
> 645 static irqreturn_t bwmon_intr_thread(int irq, void *dev_id)
> 646 {
> 647 struct icc_bwmon *bwmon = dev_id;
> 648 unsigned int irq_enable = 0;
> 649 struct dev_pm_opp *opp, *target_opp;
> 650 unsigned int bw_kbps, up_kbps, down_kbps, meas_kbps;
> 651
> 652 bw_kbps = bwmon->target_kbps;
> 653 meas_kbps = bwmon->target_kbps;
> 654
> 655 target_opp = dev_pm_opp_find_bw_ceil(bwmon->dev, &bw_kbps, 0);
> 656 if (IS_ERR(target_opp) && PTR_ERR(target_opp) == -ERANGE)
> 657 target_opp = dev_pm_opp_find_bw_floor(bwmon->dev, &bw_kbps, 0);
>
> Smatch thinks both dev_pm_opp_find_bw_ceil() and dev_pm_opp_find_bw_floor()
> can return error pointers.
Indeed, thanks. I'll fix it.
Best regards,
Krzysztof
prev parent reply other threads:[~2025-08-14 6:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-07 15:58 [bug report] soc: qcom: icc-bwmon: Add bandwidth monitoring driver Dan Carpenter
2025-08-14 6:19 ` Krzysztof Kozlowski [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=695a4459-c9fd-4073-bdf2-1339bc65b3c5@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=dan.carpenter@linaro.org \
--cc=linux-arm-msm@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.