]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: mdio: drop memset
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Wed, 6 May 2026 19:52:52 +0000 (21:52 +0200)
committerRobert Marko <robimarko@gmail.com>
Mon, 11 May 2026 08:32:30 +0000 (10:32 +0200)
Use modern compound literal assignment instead.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23230
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c

index 377e9e71b8357cd6b6fcd9bf7ed0383f50a0c4d1..da476ade57803fa7d5e71ec355f3a6a7c9d13edc 100644 (file)
@@ -693,9 +693,9 @@ static int rtmd_get_phy_info(struct rtmd_ctrl *ctrl, int pn, struct rtmd_phy_inf
        bus = ctrl->bus[ctrl->port[pn].smi_bus].mii_bus;
        smi_addr = ctrl->port[pn].smi_addr;
        phyid = rtmd_get_phy_id(mdiobus_get_phy(bus, smi_addr));
+       *phyinfo = (struct rtmd_phy_info){};
 
        /* Determine PHY specific characteristics for polling fine tuning */
-       memset(phyinfo, 0, sizeof(*phyinfo));
        switch (phyid) {
        case RTMD_PHY_AQR113C_A:
        case RTMD_PHY_AQR113C_B: