aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/files-5.10
diff options
context:
space:
mode:
authorINAGAKI Hiroshi <musashino.open@gmail.com>2022-03-30 12:00:42 +0900
committerSander Vanheule <sander@svanheule.net>2022-10-08 11:05:02 +0200
commit04cca345dfc8d0debbdad0bb1907003d3433cd8c (patch)
tree13747459bfc257998946e27b9cb60a51861902c6 /target/linux/realtek/files-5.10
parent27a580df4a560ccecc0f8d6dd0b0229a4c9192ce (diff)
downloadupstream-04cca345dfc8d0debbdad0bb1907003d3433cd8c.tar.gz
upstream-04cca345dfc8d0debbdad0bb1907003d3433cd8c.tar.bz2
upstream-04cca345dfc8d0debbdad0bb1907003d3433cd8c.zip
realtek: fix use of uninitialized sds_mode
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>
Diffstat (limited to 'target/linux/realtek/files-5.10')
-rw-r--r--target/linux/realtek/files-5.10/drivers/net/phy/rtl83xx-phy.c3
1 files changed, 1 insertions, 2 deletions
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 4175b95043..259458b1be 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) {
case PHY_INTERFACE_MODE_SGMII:
@@ -1740,7 +1739,7 @@ void rtl9300_force_sds_mode(int sds, phy_interface_t phy_if)
return;
}
- 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));