From: netdev-bot+sashiko@kernel.org
To: ivecera@redhat.com
Cc: netdev@vger.kernel.org, poros@redhat.com, min.li@microchip.com,
vadim.fedorenko@linux.dev, arkadiusz.kubalewski@intel.com,
jiri@resnulli.us, kuba@kernel.org, Prathosh.Satish@microchip.com,
pabeni@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v4 1/5] dpll: zl3073x: do not offer 0 Hz as a supported pin frequency
Date: Sat, 10 Oct 2026 19:27:00 +0000 [thread overview]
Message-ID: <179166042014.434549.4178521508120779611@kernel.org> (raw)
In-Reply-To: <20261009192556.272263-2-ivecera@redhat.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] At this commit, the subject says 0 Hz is no longer offered,
but zl3073x_pin_props_get() (drivers/dpll/zl3073x/prop.c) only filters…
--
dpll: zl3073x: do not offer 0 Hz as a supported pin frequency
This patch stops zl3073x_pin_props_get() from putting the current pin
frequency into the supported list when it reads back as 0 Hz. If the
list ends up empty, it is freed and not published, because the DPLL
core rejects an empty non-NULL list.
> diff --git a/drivers/dpll/zl3073x/prop.c b/drivers/dpll/zl3073x/prop.c
> index ac9d41d0f978e..18a1bf3103326 100644
> --- a/drivers/dpll/zl3073x/prop.c
> +++ b/drivers/dpll/zl3073x/prop.c
> @@ -295,13 +295,20 @@ struct zl3073x_pin_props *zl3073x_pin_props_get(struct zl3073x_dev *zldev,
> goto err_alloc_ranges;
> }
>
> - /* Start with current frequency at index 0 */
> - ranges[0] = (struct dpll_pin_frequency)DPLL_PIN_FREQUENCY(curr_freq);
> + /* Start with current frequency at index 0. A sub-Hz frequency is
> + * read back as 0 Hz and cannot be set, so it is not offered.
> + */
> + j = 0;
> + if (curr_freq) {
> + struct dpll_pin_frequency freq = DPLL_PIN_FREQUENCY(curr_freq);
> +
> + ranges[j++] = freq;
> + }
>
> /* Add frequencies from firmware node, skipping current frequency
> * and filtering out frequencies not representable by device
> */
> - for (i = 0, j = 1; i < num_freqs; i++) {
> + for (i = 0; i < num_freqs; i++) {
> struct dpll_pin_frequency freq = DPLL_PIN_FREQUENCY(freqs[i]);
>
> if (freqs[i] == curr_freq)
[Severity: Medium]
Can 0 Hz still end up offered through the firmware list?
The subject says 0 Hz is no longer offered. However, only a 0 Hz current
frequency is filtered.
Suppose the "supported-frequencies-hz" property has a 0 entry and
curr_freq is nonzero. That entry is not skipped by the
freqs[i] == curr_freq check. It goes on to zl3073x_pin_check_freq(),
which has no zero check at this commit:
drivers/dpll/zl3073x/prop.c:zl3073x_pin_check_freq() {
if (freq > U32_MAX)
goto err_inv_freq;
...
/* Check the frequency divides synth frequency */
if (synth_freq % (u32)freq)
goto err_inv_freq;
...
}
On an output pin, does this divide by zero during probe?
On an input pin, zl3073x_ref_freq_factorize(0, ...) succeeds on the first
base frequency of 1. Here 0 / 1 = 0 <= U16_MAX and 0 % 1 == 0, so 0 Hz is
published as supported. It could then be programmed with base 1 and
multiplier 0.
The dpll-pin.yaml binding sets no minimum for supported-frequencies-hz,
so the schema does not reject 0.
A later patch in this series, "dpll: zl3073x: reject output frequencies
with too small divisor", changes the first check in
zl3073x_pin_check_freq() to:
if (!freq || freq > U32_MAX)
goto err_inv_freq;
That fixes this by the end of the series. At this intermediate commit,
though, the 0 Hz case is still reachable from firmware.
Would it make sense to move the !freq check into this patch? Bisection
would then not land on a kernel that can still divide by zero here.
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261009192556.272263-1-ivecera%40redhat.com
next prev parent reply other threads:[~2026-10-10 19:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 19:25 [PATCH net v4 0/5] dpll: zl3073x: fix output pin frequency, esync and sibling notifications Ivan Vecera
2026-10-09 19:25 ` [PATCH net v4 1/5] dpll: zl3073x: do not offer 0 Hz as a supported pin frequency Ivan Vecera
2026-10-10 19:27 ` netdev-bot+sashiko [this message]
2026-10-11 6:01 ` Ivan Vecera
2026-10-09 19:25 ` [PATCH net v4 2/5] dpll: zl3073x: reject output frequencies with too small divisor Ivan Vecera
2026-10-10 19:27 ` netdev-bot+sashiko
2026-10-11 6:03 ` Ivan Vecera
2026-10-09 19:25 ` [PATCH net v4 3/5] dpll: zl3073x: make embedded sync follow the output carrier frequency Ivan Vecera
2026-10-09 19:25 ` [PATCH net v4 4/5] dpll: zl3073x: reject inexact frequencies for N-divided outputs Ivan Vecera
2026-10-10 19:27 ` netdev-bot+sashiko
2026-10-11 6:05 ` Ivan Vecera
2026-10-09 19:25 ` [PATCH net v4 5/5] dpll: zl3073x: notify sibling pin when shared output config changes Ivan Vecera
2026-10-10 19:27 ` netdev-bot+sashiko
2026-10-11 6:08 ` Ivan Vecera
2026-10-09 19:29 ` [PATCH net v4 0/5] dpll: zl3073x: fix output pin frequency, esync and sibling notifications netdev-bot+sinfo
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=179166042014.434549.4178521508120779611@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=Prathosh.Satish@microchip.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=ivecera@redhat.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=min.li@microchip.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=poros@redhat.com \
--cc=vadim.fedorenko@linux.dev \
/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®