[PATCH net-next v7 04/15] net: phy: Introduce PHY ports representation
Maxime Chevallier
maxime.chevallier at bootlin.com
Tue Jul 1 06:06:31 PDT 2025
On Tue, 1 Jul 2025 14:02:43 +0100
Simon Horman <horms at kernel.org> wrote:
> On Mon, Jun 30, 2025 at 04:33:03PM +0200, Maxime Chevallier wrote:
>
> ...
>
> > +/**
> > + * 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
More information about the linux-arm-kernel
mailing list