All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	David Miller <davem@davemloft.net>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Simon Horman <horms@kernel.org>,
	Iyappan Subramanian <iyappan@os.amperecomputing.com>,
	Keyur Chudgar <keyur@os.amperecomputing.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] ixgene-v2: prepare for phylib stop exporting phy_10_100_features_array
Date: Tue, 11 Feb 2025 22:57:51 +0100	[thread overview]
Message-ID: <a8ad7d9b-4276-42e0-9dce-8a8b2115151c@gmail.com> (raw)
In-Reply-To: <92040ddc-bd6c-40f0-807f-b17b7d0e6b39@lunn.ch>

On 11.02.2025 22:24, Andrew Lunn wrote:
>> +	linkmode_clear_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT,
>> +			   phydev->supported);
>> +	linkmode_clear_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT,
>> +			   phydev->supported);
>> +	linkmode_clear_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT,
>> +			   phydev->supported);
>> +	linkmode_clear_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT,
>> +			   phydev->supported);
>> +	linkmode_clear_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT,
>> +			   phydev->supported);
>> +
>> +	phy_advertise_supported(phydev);
> 
> phy_remove_link_mode() would be better. The MAC driver then does not
> need to know about the insides of the phydev structure, and it
> implicitly handles this last part.
> 

Only small drawback is that it unnecessarily calls phy_advertise_supported()
after each statement. Therefore I decided against it.
But you're right, it's cleaner.

>     Andrew
> 

Heiner

> ---
> pw-bot: cr


      reply	other threads:[~2025-02-11 21:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-11 20:48 [PATCH net-next] ixgene-v2: prepare for phylib stop exporting phy_10_100_features_array Heiner Kallweit
2025-02-11 21:24 ` Andrew Lunn
2025-02-11 21:57   ` Heiner Kallweit [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a8ad7d9b-4276-42e0-9dce-8a8b2115151c@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=iyappan@os.amperecomputing.com \
    --cc=keyur@os.amperecomputing.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.