diff mbox series

[4/8] realtek: fix use of uninitialized sds_mode

Message ID 89b1c40dd3767491d403c0ff9ce0444b3e2c2142.1665089731.git.sander@svanheule.net
State Accepted
Delegated to: Sander Vanheule
Headers show
Series realtek: various target cleanups | expand

Commit Message

Sander Vanheule Oct. 6, 2022, 8:56 p.m. UTC
From: INAGAKI Hiroshi <musashino.open@gmail.com>

The initial state of sds_mode in rtl9300_force_sds_mode() is null and it
will be configured in switch-case. So print message after it.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[amend commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
 target/linux/realtek/files-5.10/drivers/net/phy/rtl83xx-phy.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series


diff --git a/target/linux/realtek/files-5.10/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-5.10/drivers/net/phy/rtl83xx-phy.c
index 4175b950435e..259458b1beef 100644
--- a/target/linux/realtek/files-5.10/drivers/net/phy/rtl83xx-phy.c
+++ b/target/linux/realtek/files-5.10/drivers/net/phy/rtl83xx-phy.c
@@ -1697,7 +1697,6 @@  void rtl9300_force_sds_mode(int sds, phy_interface_t phy_if)
 	u32 v, cr_0, cr_1, cr_2;
 	u32 m_bit, l_bit;
-	pr_info("%s --------------------- serdes %d forcing to %x ...\n", __func__, sds, sds_mode);
 	pr_info("%s: SDS: %d, mode %d\n", __func__, sds, phy_if);
 	switch (phy_if) {
@@ -1740,7 +1739,7 @@  void rtl9300_force_sds_mode(int sds, phy_interface_t phy_if)
-	pr_info("%s: SDS mode %x\n", __func__, sds_mode);
+	pr_info("%s --------------------- serdes %d forcing to %x ...\n", __func__, sds, sds_mode);
 	// Power down SerDes
 	rtl9300_sds_field_w(sds, 0x20, 0, 7, 6, 0x3);
 	if (sds == 5) pr_info("%s after %x\n", __func__, rtl930x_read_sds_phy(sds, 0x20, 0));