diff mbox series

[linux-next] net: dsa: microchip: remove the unneeded result variable -------------------------------------------------------------------------

Message ID 20220912075045.17060-1-xu.panda@zte.com.cn (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series [linux-next] net: dsa: microchip: remove the unneeded result variable ------------------------------------------------------------------------- | expand

Checks

Context Check Description
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

CGEL Sept. 12, 2022, 7:50 a.m. UTC
From: Xu Panda <xu.panda@zte.com.cn>

Return the value ksz_get_xmii() directly instead of storing it in
another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Xu Panda <xu.panda@zte.com.cn>
---
 drivers/net/dsa/microchip/ksz9477.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Jakub Kicinski Sept. 19, 2022, 9:52 p.m. UTC | #1
On Mon, 12 Sep 2022 07:50:46 +0000 cgel.zte@gmail.com wrote:
> Subject: [PATCH linux-next] net: dsa: microchip: remove the unneeded result variable -------------------------------------------------------------------------
> Date: Mon, 12 Sep 2022 07:50:46 +0000

> Return the value ksz_get_xmii() directly instead of storing it in
> another redundant variable.

Does not apply either, also the subject is off.
diff mbox series

Patch

diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c
index 42d7e4c12459..ab7245b24493 100644
--- a/drivers/net/dsa/microchip/ksz9477.c
+++ b/drivers/net/dsa/microchip/ksz9477.c
@@ -884,7 +884,6 @@  void ksz9477_port_mirror_del(struct ksz_device *dev, int port,

 static phy_interface_t ksz9477_get_interface(struct ksz_device *dev, int port)
 {
-       phy_interface_t interface;
        bool gbit;

        if (dev->info->internal_phy[port])
@@ -892,9 +891,7 @@  static phy_interface_t ksz9477_get_interface(struct ksz_device *dev, int port)

        gbit = ksz_get_gbit(dev, port);

-       interface = ksz_get_xmii(dev, port, gbit);
-
-       return interface;
+       return ksz_get_xmii(dev, port, gbit);
 }

 static void ksz9477_port_mmd_write(struct ksz_device *dev, int port,