]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: pcs: xpcs: replace open-coded mii_bmcr_encode_fixed()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 17 Oct 2024 11:52:54 +0000 (12:52 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Wed, 23 Oct 2024 14:10:16 +0000 (16:10 +0200)
commit1c17f9d3fe17d296ff2d93740ee96a52a2343628
tree9e70af2780fe4f24c8a86ddc798db3719cffb68b
parentb61a465a761921d11f99492ce41b85cfba7d6161
net: pcs: xpcs: replace open-coded mii_bmcr_encode_fixed()

We can now see that we have an open-coded version of
mii_bmcr_encode_fixed() when this is called with SPEED_1000:

        val = BMCR_SPEED1000;
        if (duplex == DUPLEX_FULL)
                val |= BMCR_FULLDPLX;

Replace this with a call to mii_bmcr_encode_fixed().

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tested-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/pcs/pcs-xpcs.c