Article View: linux.kernel.netdev
Article #26466Re: [PATCH net-next v6 03/14] dpll: dpllsim: Add configurable pins
From: netdev-bot+sashiko
Date: Thu, 03 Dec 2026 15:36
Date: Thu, 03 Dec 2026 15:36
80 lines
10768 bytes
10768 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 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
Technical Details
Message-ID:
<179631216590.3146.3449157327076348594@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376716-linux-kernel-netdev=dewy.ruReferences:
<20261202153223.2725780-4-poros@redhat.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376716-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v6 03/14] dpll: dpllsim: Add configurable pins Date: Thu, 03 Dec 2026 15:36:05 +0000 Organization: Usenet Network Message-ID: <179631216590.3146.3449157327076348594@kernel.org> References: <20261202153223.2725780-4-poros@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2529522"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:nb8CxUskANA8GLcsc9LU7fYwYNA= sha256:TDBHFJuInJQxZVMvpUdpVh9qmh60QYRaXT9D3s5l+nw= sha1:WQYpKO0KZFrgT5WkkWCxthA1G2s= sha256:ufHcOmDUzdAeCONSzStBMxLhVFr2WVarniGFHWR8VOo= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 7A5D21179AC; Thu, 3 Dec 2026 18:36:28 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.64 X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6_W_bmK2rAr3; Thu, 3 Dec 2026 18:36:25 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-376716-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 51AD01179AB; Thu, 3 Dec 2026 18:36:12 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 9BA5F28AA1; Thu, 3 Dec 2026 15:36:08 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796312168; b=Nda2AfI1Yo5RLzbtNm5utzSEUC1TSf34oR5Hr0QmRC9cyFOushhKx4A5o1QKsVgHBfbD BRGsbq72JpJIrZGMd89aoQQlcyK8Qy6bAcfcziqGxybcqY/3GXoLW8u6UFtH8OVpcFtwj es6jR6nniglpM0LgawMnWoEdxOZxNhpd7bCQK2GR3xATnl+EIZ/1wyRSKmTfnfXJvebOv 7jkyEuTkLytrZAOye0EpVq3T5Q9HWUYfuQJ1fG0ulpuoVYqQB6Y3vvObU/nWbFQ+4B0kq QZghpI1uFONwdQTbYIJfdo3xEdyWazKa1MV6aF5WcUCGc2wtdRjtYAs8yNYBZuGueEQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796312168; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=ndZpBdwkAPoIu6IosZCvwQTeOzWdmWEMrZ23MAxYWaQ=; b=4kwJFIY/OVSkU9k0dS5ES00/BfR4oS0BRZepzHwZsLA/zkC0ucTbnfaNVgPAy+vsyOiV ODs/Z248+3/egJfK8aXa0LCu8SlrRmFQCe72+cNjYM12ANKnJrRrchz4n4/WfqW2BYBmJ vHkAC6o6oU7Vzrsfzn/E4hdvLP0y+I8IqYJd/e+9O1hv4kKnDdDHwk4d/W7HFSxKIX+cr A1Tbp7aQndcpCx6kYueLK1ddKL9Gtmu4JQGx7CITRcVZql1kCgXbCAV2wtzIFJwZ3tV0e W+vBeiI0d3FnU6a8YW11MWsgu60nFiST3q5vHdCBlU4Y4oiQFB8Kx4EUmuknFyKvGQA== X-ARC-Authentication-Results: i=2; 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=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 74B8C606A338; Thu, 3 Dec 2026 15:36:08 +0000 (UTC) X-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 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-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== X-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== X-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 X-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) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 512DE1F000C1; Thu, 3 Dec 2026 15:36:06 +0000 (UTC) X-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== X-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 X-In-Reply-To: <20261202153223.2725780-4-poros@redhat.com> X-sashiko-severity: Low X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list