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=1796082461; b=s1JoCP7T5oZHLYwhBnAgSgJBUZaq7SVJkY6HpvbmAo2LfDbzVZ8KnsGtyEs3q0SKR+Ae uT07ZjETj6Za0C8Sr9Lag8vTsY9qmR3BpAzuqtK296L7tUr0/HzPQj20Sc51nd28QR1qT ovExgfST9CzHDUMbjPTybYC2gIwDk8ITk0aBD3p+ajmHt6leB020QYKU2ipwU5BhxP/le 1/EL5n1PxFKU6ZUx0RpK8+efwdBN4QWO7EMUxtjn6MwovzYo1XE7+dWz1PXHcuoQkuIV4 1N4qYXJcR5lZ8TugtqmKexTSVf6oQ0uZmidvzVIJvnfgA7O+mlaUhqWcbhH1iPQdCJw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796082461; 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=9dbP14HBKDMReAZmTrF6eKOw0Xbv9NZ+wff2J9b/9pM=; b=WT/eSWTxu7xe4jfq/PvadRT4eX20mert2K8Ez1dDnDi+B3bK5JmYD6y862zsOcJGjOXJ /OwnF7yd5ibf4l7mAVWqeTcqIXHFd1JsQ/5d3nApoLgmpMEG337Q1DIZhty5/3JKBRoIz nnWbpb48evkZ5wERkTlLa9iMxgEbIxsY4c2tLag6qqYTo4me+BTVNfdMx8QlNhVWnfomN Lnc4JRtwaQAPCWygeackLOfd+xLl3WfXvmfs0O6vwcvQvOQ/+WzCy0aO/U3watqHkbvUS ROSt705sLMjdZZm6DTISsJlrRuzd8mkQaz2E9jU0TSVdmWt70XLigYikGekvkywhW5w== 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=GDzuo9Ms; 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 8C3F3606A32A; Mon, 30 Nov 2026 23:47:41 +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=GDzuo9Ms Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74E421F00898; Mon, 30 Nov 2026 23:47:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796082461; bh=9dbP14HBKDMReAZmTrF6eKOw0Xbv9NZ+wff2J9b/9pM=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=GDzuo9MsMeiUwwxdBn/sInZ3CCJlXexdQy2zC+iQFc8Mgrdz5GByqgX9aahMdp3tl evvQWy9Pbq7MSpPxn83poWOkMZ2uFOboFdICujBFP97fy9dQjFk7Z2QW3vIhBZwat+ pxgAhU3yaURzhqW4Se/7V+WtkSTdINfeA144vK2JZFOSCpi7becuiflFtGJ2BcntoH lSPTnzl5ygXrfbqH02ss9nYNQnbpyyegWjk/L6KqB5s7bc4rDq6jcScjQkLcDrg+Ai IdRKMaA9GdG7ikze06lAM1vF6IkEHXndyFwGk/vVa2LBhfAbjjgqT+3erY9zNKrduZ C3wdHuY3Sr50A== Subject: Re: [PATCH net-next v23 05/15] net: phylink: make phylink_validate state locked From: netdev-bot+sashiko@kernel.org To: ansuelsmth@gmail.com Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, willemb@google.com, horms@kernel.org, corbet@lwn.net, skhan@linuxfoundation.org, rdunlap@infradead.org, lorenzo@kernel.org, hkallweit1@gmail.com, linux@armlinux.org.uk, maxime.chevallier@bootlin.com, p.zabel@pengutronix.de, nathan@kernel.org, ndesaulniers@google.com, morbo@google.com, justinstitt@google.com, rmk+kernel@armlinux.org.uk, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, llvm@lists.linux.dev, zhengping.zhang@airoha.com Date: Mon, 30 Nov 2026 23:47:39 +0000 Message-ID: <179608245900.3146.7642205996688289734@kernel.org> In-Reply-To: <20261129230558.612526-6-ansuelsmth@gmail.com> References: <20261129230558.612526-6-ansuelsmth@gmail.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] This patch removes the last in-tree caller of the exported phy_get_rate_matching(), but leaves the export in place. -- net: phylink: make phylink_validate state locked This commit makes the phylink validation helpers run under pl->state_mutex. It adds __phylink_validate(), __phylink_validate_mask() and __phylink_validate_phy() for callers that already hold the mutex. It also adds an internal __phy_get_rate_matching() helper in phy-internal.h for callers that already hold phydev->lock. > diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c > index 079c53516f424..a6d6a7c1a96dd 100644 > --- a/drivers/net/phy/phy.c > +++ b/drivers/net/phy/phy.c [ ... ] > @@ -146,13 +147,11 @@ EXPORT_SYMBOL(phy_print_status); > int phy_get_rate_matching(struct phy_device *phydev, > phy_interface_t iface) > { > - int ret = RATE_MATCH_NONE; > + int ret; > > - if (phydev->drv->get_rate_matching) { > - mutex_lock(&phydev->lock); > - ret = phydev->drv->get_rate_matching(phydev, iface); > - mutex_unlock(&phydev->lock); > - } > + mutex_lock(&phydev->lock); > + ret = __phy_get_rate_matching(phydev, iface); > + mutex_unlock(&phydev->lock); > > return ret; > } [Severity: Low] Does phy_get_rate_matching() still have any in-tree users after this change? phylink was its only caller. This patch moves both phylink call sites to the new internal helper: phylink_validate_one(): tmp_state.rate_matching = __phy_get_rate_matching(phy, interface); __phylink_validate_phy(): state->rate_matching = __phy_get_rate_matching(phy, state->interface); After this patch, grepping for phy_get_rate_matching finds only these: - the definition and kernel-doc in drivers/net/phy/phy.c - EXPORT_SYMBOL_GPL(phy_get_rate_matching) - the prototype in include/linux/phy.h - the two __phy_get_rate_matching() calls in phylink.c This stays the same at the end of the series. The same patch also changes the exported function's locking. It now always takes phydev->lock, where before it only took the lock when phydev->drv->get_rate_matching was set. The commit message does not mention that the export is left with no callers. Should phy_get_rate_matching(), its export and its prototype be removed in this patch? If it is being kept on purpose, could the commit message say why? -- Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261129230558.612526-1-ansuelsmth%40gmail.com