Thread (21 messages) 21 messages, 4 authors, 2025-07-14

Re: [PATCH net-next v7 04/15] net: phy: Introduce PHY ports representation

From: Maxime Chevallier <maxime.chevallier@bootlin.com>
Date: 2025-07-01 13:06:36
Also in: linux-arm-kernel, linux-arm-msm, linux-devicetree, lkml

On Tue, 1 Jul 2025 14:02:43 +0100
Simon Horman [off-list ref] wrote:
On Mon, Jun 30, 2025 at 04:33:03PM +0200, Maxime Chevallier wrote:

...
quoted
+/**
+ * phy_port_get_type() - get the PORT_* attribut for that port.
+ * @port: The port we want the information from
+ *
+ * Returns: A PORT_XXX value.
+ */
+int phy_port_get_type(struct phy_port *port)
+{
+	if (port->mediums & ETHTOOL_LINK_MEDIUM_BASET)  
Hi Maxime,

Should this be:

	if (port->mediums & BIT(ETHTOOL_LINK_MEDIUM_BASET))

Flagged by Smatch (because ETHTOOL_LINK_MEDIUM_BASET is 0,
so as-is the condition is always false).
You're absolutely correct ! Thanks...

Maxime
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help