From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796312167; b=Y2MpVNE56O1sNjQ8Ojmq62NetxIuLsfICFPzcgJVAzCba1FKuV6tZEME1UwTsDMIQc0K vTEo7R2uz5AW+YfqfeIvwVLhDLDifcUF4RRu7wmFTUfAQDDAWLCWZkcilw1qkjVoc3M7M SMInnG5oFeelyP7q+YUoBPLEriVB43A1pSxIVapv/dJYdOs4TXGoIoHBkfjGFGUIvPzOD mU0GLoOet8mE8xK3C6ymrhb+LCWpz8FNNOA93IhM+vsUSnepMXJGx3lVOEg4sUB/xLhcs DY4Ktg0N3ywpn+xOZfzia4ba8QcyT1A54V+0ahjGxlbUnOIocWjvFTH/4LdFUtpKbuw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796312167; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=ndZpBdwkAPoIu6IosZCvwQTeOzWdmWEMrZ23MAxYWaQ=; b=geHfMsJFqB/XYSgpFiynl23CaaJTPjQ3PLRV/9YOMzx3SZpDNnj55PFWVEwshxuI2Xd9 x+2+6FCVCZlnbxk1qa4hDtViwafg8XpXoo8ZuojvJK0AacZ34/XOvZDNm3uzPeGwUnr0Q Alch3fiu5I7LI5Vnoib5OKOG8+4LuJ5v+gojrOmzlJ+t/bBCAvPbzFAh8jQ9EKVCpkK5O xcYHPirvLAZQ7B7dNbJVCmf+pwN3E0LRuOvzVHZMOZPoUEW+rbIYJvbpEEM112WNeno3I I911eP99siEOyrxHIUdtQTlXykepXuF0EvapmfuchBGupB04XpwNSUsJYv2Ovp9cveA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bc5bH2Pk; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 94839606A32F; Thu, 3 Dec 2026 15:36:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bc5bH2Pk Received: by smtp.kernel.org (Postfix) with ESMTPSA id 512DE1F000C1; Thu, 3 Dec 2026 15:36:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796312167; bh=ndZpBdwkAPoIu6IosZCvwQTeOzWdmWEMrZ23MAxYWaQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=bc5bH2PkGmt6jaGTONXLKvVZHVv2ow68BsEiGN5L37EbeRUgClafAdkIRiCB6uyec Hnlsrs//dQOYQJj9SGsDH8aTGm2CknLJf1X2ZpRzjDnmca3d9UJuqvZ+Q2jkRO7NXM xVCkXVBWM48de5Xiu7f5tsD+v+eGqgIUaLJgX3hOg/pLNqja7qMTZXgt7tSy5V7DSJ qErinvAUossllfoxtQOcPowWas7qDkjzDVbPZpItRCMdgYAd8gql1JK5oQlTlstusN zJ9vwanDjkWvqRG8WoZoMZvBpRf2bcZlWhnpXKCn/TVJRnZBKzGj1p6YG0wBz0KM6w 9uq0Z4WlY2Pmw== Subject: Re: [PATCH net-next v6 03/14] dpll: dpllsim: Add configurable pins From: netdev-bot+sashiko@kernel.org To: poros@redhat.com Cc: netdev@vger.kernel.org, corbet@lwn.net, skhan@linuxfoundation.org, shuah@kernel.org, rdunlap@infradead.org, jani.nikula@intel.com, vadim.fedorenko@linux.dev, arkadiusz.kubalewski@intel.com, jiri@resnulli.us, ivecera@redhat.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org Date: Thu, 03 Dec 2026 15:36:05 +0000 Message-ID: <179631216590.3146.3449157327076348594@kernel.org> In-Reply-To: <20261202153223.2725780-4-poros@redhat.com> References: <20261202153223.2725780-4-poros@redhat.com> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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/20261202153223.2725780-1-poros%40redhat.com