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