๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by netdev-bot+sashiko Tue, 10 Nov 2026 17:53
Re: [PATCH net-next 03/10] dpll: add domain object
#14086
Author: netdev-bot+sashiko
Date: Tue, 10 Nov 2026 17:53
60 lines
10168 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads