From: sashiko-bot@kernel.org
To: "Varadarajan Narayanan" <varadarajan.narayanan@oss.qualcomm.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 2/2] cpufreq: qcom-nvmem: Add IPQ5210 support
Date: Wed, 01 Jul 2026 08:56:05 +0000 [thread overview]
Message-ID: <20260701085606.33E6E1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260701-cpufreq-v1-2-98656ad20ff3@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] This problem wasn't introduced by this patch, but the function `qcom_cpufreq_kryo_name_version()` triggers a kernel `BUG()` panic when the SMEM SoC ID is not recognized, rather than gracefully failing.
--
commit efa443e3ef471a943647c359a1a0b9da9950bda0
Author: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
cpufreq: qcom-nvmem: Add IPQ5210 support
IPQ5210 SoCs expose CPU frequency limits through an eFuse speed bin, and
the valid CPU OPPs depend on the SoC variant. This patch adds IPQ5210
support to the Qualcomm NVMEM cpufreq driver and blocks the generic
cpufreq-dt platform device.
[ ... ]
> diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cpufreq-nvmem.c
> index e6d28d162442a..b2aeda7c564a9 100644
> --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
> +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
> @@ -200,6 +200,13 @@ static int qcom_cpufreq_kryo_name_version(struct device *cpu_dev,
> case QCOM_ID_IPQ9574:
> drv->versions = 1 << (unsigned int)(*speedbin);
> break;
> + case QCOM_ID_IPQ5200:
> + case QCOM_ID_IPQ5210:
> + case QCOM_ID_QCF2200:
> + case QCOM_ID_QCF3200:
> + case QCOM_ID_QCF3210:
> + drv->versions = (*speedbin != 0xcd) ? BIT(0) : BIT(1);
> + break;
[Severity: High]
This is a pre-existing issue, but should the default case for this switch
statement continue to use BUG() when an unhandled msm_id is encountered?
If a device tree successfully matches the driver, but the SMEM SoC ID
returned by qcom_smem_get_soc_id() is unexpected (such as from a mismatched
device tree, firmware issue, or prototype hardware),
qcom_cpufreq_kryo_name_version() will hit the default case:
default:
BUG();
break;
Would it be safer to return an error code like -ENODEV here instead of
triggering an immediate kernel panic during device probe?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260701-cpufreq-v1-0-98656ad20ff3@oss.qualcomm.com?part=2
next prev parent reply other threads:[~2026-07-01 8:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 8:46 [PATCH 0/2] Enable ipq5210 in cpufreq/qcom-nvmem driver Varadarajan Narayanan
2026-07-01 8:46 ` [PATCH 1/2] dt-bindings: cpufreq: qcom-cpufreq-nvmem: document IPQ5210 Varadarajan Narayanan
2026-07-01 8:46 ` [PATCH 2/2] cpufreq: qcom-nvmem: Add IPQ5210 support Varadarajan Narayanan
2026-07-01 8:56 ` sashiko-bot [this message]
2026-07-01 9:36 ` Konrad Dybcio
2026-07-02 5:04 ` Viresh Kumar
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=20260701085606.33E6E1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=varadarajan.narayanan@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