From: Vladimir Oltean <olteanv@gmail.com>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: Andrew Lunn <andrew@lunn.ch>, Jakub Kicinski <kuba@kernel.org>,
davem@davemloft.net, Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Woojung Huh <woojung.huh@microchip.com>,
UNGLinuxDriver@microchip.com, thomas.petazzoni@bootlin.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 1/2] net: dsa: microchip: Drop unnecessary check in ksz9477 PCS setup
Date: Tue, 24 Mar 2026 22:37:22 +0200 [thread overview]
Message-ID: <20260324203722.4ahhkivou33kdn6o@skbuf> (raw)
In-Reply-To: <20260324180826.524327-2-maxime.chevallier@bootlin.com>
On Tue, Mar 24, 2026 at 07:08:24PM +0100, Maxime Chevallier wrote:
> The ksz_dev_ops .pcs_create() is called under the assumption that the
> switch has a PCS port :
>
> if (ksz_has_sgmii_port(dev) && dev->dev_ops->pcs_create) {
> ret = dev->dev_ops->pcs_create(dev);
> [...]
> }
>
> The KSZ9477 implementation of .pcs_create() does the same check on
> ksz_has_sgmii_port(), and protects the entire function with it.
>
> Drop it, saving a level of indentation and increasing readability.
>
> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> ---
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
next prev parent reply other threads:[~2026-03-24 20:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 18:08 [PATCH net-next 0/2] net: dsa: microchip: Small cleanups for ksz9477 SGMII Maxime Chevallier
2026-03-24 18:08 ` [PATCH net-next 1/2] net: dsa: microchip: Drop unnecessary check in ksz9477 PCS setup Maxime Chevallier
2026-03-24 20:37 ` Vladimir Oltean [this message]
2026-03-24 18:08 ` [PATCH net-next 2/2] net: dsa: microchip: drop an outdated comment about SGMII support Maxime Chevallier
2026-03-24 20:37 ` Vladimir Oltean
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=20260324203722.4ahhkivou33kdn6o@skbuf \
--to=olteanv@gmail.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=woojung.huh@microchip.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox