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 header comment and the code disagree about how pin->state is protected. -- dpll: dpllsim: Add configurable pins This adds configfs pin directories under each dpllsim device instance, each with type, frequency and direction attributes. At live=1 the pins are validated, ordered by creation and registered with the DPLL subsystem after the device. Configfs depends are held on the pin items while the instance is live.
> diff --git a/drivers/dpll/dpllsim/dpll.c b/drivers/dpll/dpllsim/dpll.c > index c127269fe9a23..8786293dd6d88 100644 > --- a/drivers/dpll/dpllsim/dpll.c > +++ b/drivers/dpll/dpllsim/dpll.c
[ ... ]
> @@ -39,10 +66,235 @@ static const struct dpll_device_ops dpllsim_dpll_ops = {
[ ... ]
> +static int dpllsim_pin_state_get(const struct dpll_pin *pin, void *pin_priv, > + const struct dpll_device *dpll, > + void *dpll_priv, enum dpll_pin_state *state, > + struct netlink_ext_ack *extack) > +{ > + struct dpllsim_pin *sim_pin = pin_priv; > + > + guard(mutex)(&sim_pin->dev->lock); > + *state = sim_pin->state; > + return 0; > +}
[ ... ]
> +static void dpllsim_pin_reset(struct dpllsim_pin *pin) > +{ > + pin->ops = dpllsim_pin_select_ops(pin); > + pin->state = DPLL_PIN_STATE_DISCONNECTED; > +}
[Severity: Low] This isn't a bug, but the locking comment on pin->state in dpllsim.h doesn't match how the field is accessed here: /* Simulated state, guarded by dev->lock */ enum dpll_pin_state state; dpllsim_pin_reset() writes pin->state without dev->lock. It is reached through dpllsim_dev_deploy()->dpllsim_order_pins() after sim->lock has been dropped. The reader, dpllsim_pin_state_get(), does take dev->lock. As far as I can tell there is no race. Every other access is a dpll pin op callback, and the dpll core runs those only for a registered pin and under dpll_lock. On the first deploy, the reset runs before dpll_pin_register(). On a redeploy, it runs after the previous undeploy called dpll_pin_unregister(), which takes dpll_lock and so waits for any callback still running. Could the comment say that the field is written without the lock while the pin is unregistered, and under dev->lock once it is registered? frequency, prio and phase_adjust follow the same pattern later in the series, so their comments may need the same change. [ ... ]
-- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/2026…%40redhat.com