Re: [PATCH net-next 03/10] dpll: add domain object

From: netdev-bot+sashiko

Date: Tue Nov 10 2026 - 14:57:19 EST


Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The comment on `lock` in the new struct dpll_domain
(drivers/dpll/dpll_core.h) says it "Serializes the driver callbacks of…

--

dpll: add domain object

This commit adds struct dpll_domain, which groups all dpll devices and
pins created with the same (module, clock_id) pair. Domains are
refcounted, stored in an xarray and freed along with their last object.
It prepares for serializing driver callbacks per driver instance instead
of under the global dpll_lock, and states no functional change.

> diff --git a/drivers/dpll/dpll_core.h b/drivers/dpll/dpll_core.h
> index da8a369556ed1..6705e81bc11de 100644
> --- a/drivers/dpll/dpll_core.h
> +++ b/drivers/dpll/dpll_core.h

[ ... ]

> +struct dpll_domain {
> + u32 id;
> + u64 clock_id;
> + struct module *module;
> + refcount_t refcount;
> + /* Serializes the driver callbacks of all DPLL devices and pins
> + * that share one (module, clock_id) pair.
> + */
> + struct mutex lock;

[Severity: Low]
This isn't a bug, but is this comment accurate at this point in the
series?

In this commit, domain->lock is only set up and torn down:
dpll_domain_get() calls mutex_init(), and its error path and
dpll_domain_put() call mutex_destroy(). Nothing acquires it, so driver
callbacks are still serialized only by the global dpll_lock.

The later patch "dpll: take domain locks around driver callbacks" adds
the mutex_lock() calls on dpll->domain->lock and pin->domain->lock that
make the comment true. So the mismatch exists only in this intermediate
commit.

Could the comment say the lock will serialize the callbacks, or could it
be added in the patch that starts taking the lock?

> +};

[ ... ]

--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261106121005.1327603-1-ivecera%40redhat.com