]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: usb: lan78xx: Remove lots of set but unused 'ret' variables
authorLee Jones <lee.jones@linaro.org>
Mon, 2 Nov 2020 11:45:06 +0000 (11:45 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2023 07:32:51 +0000 (08:32 +0100)
[ Upstream commit 707c60e7ed05453286ba9906d101672504460c70 ]

Fixes the following W=1 kernel build warning(s):

 drivers/net/usb/lan78xx.c: In function ‘lan78xx_read_raw_otp’:
 drivers/net/usb/lan78xx.c:825:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 drivers/net/usb/lan78xx.c: In function ‘lan78xx_write_raw_otp’:
 drivers/net/usb/lan78xx.c:879:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 drivers/net/usb/lan78xx.c: In function ‘lan78xx_deferred_multicast_write’:
 drivers/net/usb/lan78xx.c:1041:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 drivers/net/usb/lan78xx.c: In function ‘lan78xx_update_flowcontrol’:
 drivers/net/usb/lan78xx.c:1127:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 drivers/net/usb/lan78xx.c: In function ‘lan78xx_init_mac_address’:
 drivers/net/usb/lan78xx.c:1666:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 drivers/net/usb/lan78xx.c: In function ‘lan78xx_link_status_change’:
 drivers/net/usb/lan78xx.c:1841:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 drivers/net/usb/lan78xx.c: In function ‘lan78xx_irq_bus_sync_unlock’:
 drivers/net/usb/lan78xx.c:1920:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 drivers/net/usb/lan78xx.c: In function ‘lan8835_fixup’:
 drivers/net/usb/lan78xx.c:1994:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 drivers/net/usb/lan78xx.c: In function ‘lan78xx_set_rx_max_frame_length’:
 drivers/net/usb/lan78xx.c:2192:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 drivers/net/usb/lan78xx.c: In function ‘lan78xx_change_mtu’:
 drivers/net/usb/lan78xx.c:2270:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 drivers/net/usb/lan78xx.c: In function ‘lan78xx_set_mac_addr’:
 drivers/net/usb/lan78xx.c:2299:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 drivers/net/usb/lan78xx.c: In function ‘lan78xx_set_features’:
 drivers/net/usb/lan78xx.c:2333:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 drivers/net/usb/lan78xx.c: In function ‘lan78xx_set_suspend’:
 drivers/net/usb/lan78xx.c:3807:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20201102114512.1062724-25-lee.jones@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: e57cf3639c32 ("net: lan78xx: fix accessing the LAN7800's internal phy specific registers from the MAC driver")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/usb/lan78xx.c

index ce3c8f476d75c3acc9b4f9ef650bb287953171a9..5454a203842840528f5f450dce392457cc18a422 100644 (file)
@@ -824,20 +824,19 @@ static int lan78xx_read_raw_otp(struct lan78xx_net *dev, u32 offset,
                                u32 length, u8 *data)
 {
        int i;
-       int ret;
        u32 buf;
        unsigned long timeout;
 
-       ret = lan78xx_read_reg(dev, OTP_PWR_DN, &buf);
+       lan78xx_read_reg(dev, OTP_PWR_DN, &buf);
 
        if (buf & OTP_PWR_DN_PWRDN_N_) {
                /* clear it and wait to be cleared */
-               ret = lan78xx_write_reg(dev, OTP_PWR_DN, 0);
+               lan78xx_write_reg(dev, OTP_PWR_DN, 0);
 
                timeout = jiffies + HZ;
                do {
                        usleep_range(1, 10);
-                       ret = lan78xx_read_reg(dev, OTP_PWR_DN, &buf);
+                       lan78xx_read_reg(dev, OTP_PWR_DN, &buf);
                        if (time_after(jiffies, timeout)) {
                                netdev_warn(dev->net,
                                            "timeout on OTP_PWR_DN");
@@ -847,18 +846,18 @@ static int lan78xx_read_raw_otp(struct lan78xx_net *dev, u32 offset,
        }
 
        for (i = 0; i < length; i++) {
-               ret = lan78xx_write_reg(dev, OTP_ADDR1,
+               lan78xx_write_reg(dev, OTP_ADDR1,
                                        ((offset + i) >> 8) & OTP_ADDR1_15_11);
-               ret = lan78xx_write_reg(dev, OTP_ADDR2,
+               lan78xx_write_reg(dev, OTP_ADDR2,
                                        ((offset + i) & OTP_ADDR2_10_3));
 
-               ret = lan78xx_write_reg(dev, OTP_FUNC_CMD, OTP_FUNC_CMD_READ_);
-               ret = lan78xx_write_reg(dev, OTP_CMD_GO, OTP_CMD_GO_GO_);
+               lan78xx_write_reg(dev, OTP_FUNC_CMD, OTP_FUNC_CMD_READ_);
+               lan78xx_write_reg(dev, OTP_CMD_GO, OTP_CMD_GO_GO_);
 
                timeout = jiffies + HZ;
                do {
                        udelay(1);
-                       ret = lan78xx_read_reg(dev, OTP_STATUS, &buf);
+                       lan78xx_read_reg(dev, OTP_STATUS, &buf);
                        if (time_after(jiffies, timeout)) {
                                netdev_warn(dev->net,
                                            "timeout on OTP_STATUS");
@@ -866,7 +865,7 @@ static int lan78xx_read_raw_otp(struct lan78xx_net *dev, u32 offset,
                        }
                } while (buf & OTP_STATUS_BUSY_);
 
-               ret = lan78xx_read_reg(dev, OTP_RD_DATA, &buf);
+               lan78xx_read_reg(dev, OTP_RD_DATA, &buf);
 
                data[i] = (u8)(buf & 0xFF);
        }
@@ -878,20 +877,19 @@ static int lan78xx_write_raw_otp(struct lan78xx_net *dev, u32 offset,
                                 u32 length, u8 *data)
 {
        int i;
-       int ret;
        u32 buf;
        unsigned long timeout;
 
-       ret = lan78xx_read_reg(dev, OTP_PWR_DN, &buf);
+       lan78xx_read_reg(dev, OTP_PWR_DN, &buf);
 
        if (buf & OTP_PWR_DN_PWRDN_N_) {
                /* clear it and wait to be cleared */
-               ret = lan78xx_write_reg(dev, OTP_PWR_DN, 0);
+               lan78xx_write_reg(dev, OTP_PWR_DN, 0);
 
                timeout = jiffies + HZ;
                do {
                        udelay(1);
-                       ret = lan78xx_read_reg(dev, OTP_PWR_DN, &buf);
+                       lan78xx_read_reg(dev, OTP_PWR_DN, &buf);
                        if (time_after(jiffies, timeout)) {
                                netdev_warn(dev->net,
                                            "timeout on OTP_PWR_DN completion");
@@ -901,21 +899,21 @@ static int lan78xx_write_raw_otp(struct lan78xx_net *dev, u32 offset,
        }
 
        /* set to BYTE program mode */
-       ret = lan78xx_write_reg(dev, OTP_PRGM_MODE, OTP_PRGM_MODE_BYTE_);
+       lan78xx_write_reg(dev, OTP_PRGM_MODE, OTP_PRGM_MODE_BYTE_);
 
        for (i = 0; i < length; i++) {
-               ret = lan78xx_write_reg(dev, OTP_ADDR1,
+               lan78xx_write_reg(dev, OTP_ADDR1,
                                        ((offset + i) >> 8) & OTP_ADDR1_15_11);
-               ret = lan78xx_write_reg(dev, OTP_ADDR2,
+               lan78xx_write_reg(dev, OTP_ADDR2,
                                        ((offset + i) & OTP_ADDR2_10_3));
-               ret = lan78xx_write_reg(dev, OTP_PRGM_DATA, data[i]);
-               ret = lan78xx_write_reg(dev, OTP_TST_CMD, OTP_TST_CMD_PRGVRFY_);
-               ret = lan78xx_write_reg(dev, OTP_CMD_GO, OTP_CMD_GO_GO_);
+               lan78xx_write_reg(dev, OTP_PRGM_DATA, data[i]);
+               lan78xx_write_reg(dev, OTP_TST_CMD, OTP_TST_CMD_PRGVRFY_);
+               lan78xx_write_reg(dev, OTP_CMD_GO, OTP_CMD_GO_GO_);
 
                timeout = jiffies + HZ;
                do {
                        udelay(1);
-                       ret = lan78xx_read_reg(dev, OTP_STATUS, &buf);
+                       lan78xx_read_reg(dev, OTP_STATUS, &buf);
                        if (time_after(jiffies, timeout)) {
                                netdev_warn(dev->net,
                                            "Timeout on OTP_STATUS completion");
@@ -1040,7 +1038,6 @@ static void lan78xx_deferred_multicast_write(struct work_struct *param)
                        container_of(param, struct lan78xx_priv, set_multicast);
        struct lan78xx_net *dev = pdata->dev;
        int i;
-       int ret;
 
        netif_dbg(dev, drv, dev->net, "deferred multicast write 0x%08x\n",
                  pdata->rfe_ctl);
@@ -1049,14 +1046,14 @@ static void lan78xx_deferred_multicast_write(struct work_struct *param)
                               DP_SEL_VHF_HASH_LEN, pdata->mchash_table);
 
        for (i = 1; i < NUM_OF_MAF; i++) {
-               ret = lan78xx_write_reg(dev, MAF_HI(i), 0);
-               ret = lan78xx_write_reg(dev, MAF_LO(i),
+               lan78xx_write_reg(dev, MAF_HI(i), 0);
+               lan78xx_write_reg(dev, MAF_LO(i),
                                        pdata->pfilter_table[i][1]);
-               ret = lan78xx_write_reg(dev, MAF_HI(i),
+               lan78xx_write_reg(dev, MAF_HI(i),
                                        pdata->pfilter_table[i][0]);
        }
 
-       ret = lan78xx_write_reg(dev, RFE_CTL, pdata->rfe_ctl);
+       lan78xx_write_reg(dev, RFE_CTL, pdata->rfe_ctl);
 }
 
 static void lan78xx_set_multicast(struct net_device *netdev)
@@ -1126,7 +1123,6 @@ static int lan78xx_update_flowcontrol(struct lan78xx_net *dev, u8 duplex,
                                      u16 lcladv, u16 rmtadv)
 {
        u32 flow = 0, fct_flow = 0;
-       int ret;
        u8 cap;
 
        if (dev->fc_autoneg)
@@ -1149,10 +1145,10 @@ static int lan78xx_update_flowcontrol(struct lan78xx_net *dev, u8 duplex,
                  (cap & FLOW_CTRL_RX ? "enabled" : "disabled"),
                  (cap & FLOW_CTRL_TX ? "enabled" : "disabled"));
 
-       ret = lan78xx_write_reg(dev, FCT_FLOW, fct_flow);
+       lan78xx_write_reg(dev, FCT_FLOW, fct_flow);
 
        /* threshold value should be set before enabling flow */
-       ret = lan78xx_write_reg(dev, FLOW, flow);
+       lan78xx_write_reg(dev, FLOW, flow);
 
        return 0;
 }
@@ -1681,11 +1677,10 @@ static int lan78xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
 static void lan78xx_init_mac_address(struct lan78xx_net *dev)
 {
        u32 addr_lo, addr_hi;
-       int ret;
        u8 addr[6];
 
-       ret = lan78xx_read_reg(dev, RX_ADDRL, &addr_lo);
-       ret = lan78xx_read_reg(dev, RX_ADDRH, &addr_hi);
+       lan78xx_read_reg(dev, RX_ADDRL, &addr_lo);
+       lan78xx_read_reg(dev, RX_ADDRH, &addr_hi);
 
        addr[0] = addr_lo & 0xFF;
        addr[1] = (addr_lo >> 8) & 0xFF;
@@ -1718,12 +1713,12 @@ static void lan78xx_init_mac_address(struct lan78xx_net *dev)
                          (addr[2] << 16) | (addr[3] << 24);
                addr_hi = addr[4] | (addr[5] << 8);
 
-               ret = lan78xx_write_reg(dev, RX_ADDRL, addr_lo);
-               ret = lan78xx_write_reg(dev, RX_ADDRH, addr_hi);
+               lan78xx_write_reg(dev, RX_ADDRL, addr_lo);
+               lan78xx_write_reg(dev, RX_ADDRH, addr_hi);
        }
 
-       ret = lan78xx_write_reg(dev, MAF_LO(0), addr_lo);
-       ret = lan78xx_write_reg(dev, MAF_HI(0), addr_hi | MAF_HI_VALID_);
+       lan78xx_write_reg(dev, MAF_LO(0), addr_lo);
+       lan78xx_write_reg(dev, MAF_HI(0), addr_hi | MAF_HI_VALID_);
 
        ether_addr_copy(dev->net->dev_addr, addr);
 }
@@ -1856,7 +1851,7 @@ static void lan78xx_remove_mdio(struct lan78xx_net *dev)
 static void lan78xx_link_status_change(struct net_device *net)
 {
        struct phy_device *phydev = net->phydev;
-       int ret, temp;
+       int temp;
 
        /* At forced 100 F/H mode, chip may fail to set mode correctly
         * when cable is switched between long(~50+m) and short one.
@@ -1867,7 +1862,7 @@ static void lan78xx_link_status_change(struct net_device *net)
                /* disable phy interrupt */
                temp = phy_read(phydev, LAN88XX_INT_MASK);
                temp &= ~LAN88XX_INT_MASK_MDINTPIN_EN_;
-               ret = phy_write(phydev, LAN88XX_INT_MASK, temp);
+               phy_write(phydev, LAN88XX_INT_MASK, temp);
 
                temp = phy_read(phydev, MII_BMCR);
                temp &= ~(BMCR_SPEED100 | BMCR_SPEED1000);
@@ -1881,7 +1876,7 @@ static void lan78xx_link_status_change(struct net_device *net)
                /* enable phy interrupt back */
                temp = phy_read(phydev, LAN88XX_INT_MASK);
                temp |= LAN88XX_INT_MASK_MDINTPIN_EN_;
-               ret = phy_write(phydev, LAN88XX_INT_MASK, temp);
+               phy_write(phydev, LAN88XX_INT_MASK, temp);
        }
 }
 
@@ -1935,14 +1930,13 @@ static void lan78xx_irq_bus_sync_unlock(struct irq_data *irqd)
        struct lan78xx_net *dev =
                        container_of(data, struct lan78xx_net, domain_data);
        u32 buf;
-       int ret;
 
        /* call register access here because irq_bus_lock & irq_bus_sync_unlock
         * are only two callbacks executed in non-atomic contex.
         */
-       ret = lan78xx_read_reg(dev, INT_EP_CTL, &buf);
+       lan78xx_read_reg(dev, INT_EP_CTL, &buf);
        if (buf != data->irqenable)
-               ret = lan78xx_write_reg(dev, INT_EP_CTL, data->irqenable);
+               lan78xx_write_reg(dev, INT_EP_CTL, data->irqenable);
 
        mutex_unlock(&data->irq_lock);
 }
@@ -2009,7 +2003,6 @@ static void lan78xx_remove_irq_domain(struct lan78xx_net *dev)
 static int lan8835_fixup(struct phy_device *phydev)
 {
        int buf;
-       int ret;
        struct lan78xx_net *dev = netdev_priv(phydev->attached_dev);
 
        /* LED2/PME_N/IRQ_N/RGMII_ID pin to IRQ_N mode */
@@ -2019,11 +2012,11 @@ static int lan8835_fixup(struct phy_device *phydev)
        phy_write_mmd(phydev, MDIO_MMD_PCS, 0x8010, buf);
 
        /* RGMII MAC TXC Delay Enable */
-       ret = lan78xx_write_reg(dev, MAC_RGMII_ID,
+       lan78xx_write_reg(dev, MAC_RGMII_ID,
                                MAC_RGMII_ID_TXC_DELAY_EN_);
 
        /* RGMII TX DLL Tune Adjust */
-       ret = lan78xx_write_reg(dev, RGMII_TX_BYP_DLL, 0x3D00);
+       lan78xx_write_reg(dev, RGMII_TX_BYP_DLL, 0x3D00);
 
        dev->interface = PHY_INTERFACE_MODE_RGMII_TXID;
 
@@ -2207,28 +2200,27 @@ static int lan78xx_phy_init(struct lan78xx_net *dev)
 
 static int lan78xx_set_rx_max_frame_length(struct lan78xx_net *dev, int size)
 {
-       int ret = 0;
        u32 buf;
        bool rxenabled;
 
-       ret = lan78xx_read_reg(dev, MAC_RX, &buf);
+       lan78xx_read_reg(dev, MAC_RX, &buf);
 
        rxenabled = ((buf & MAC_RX_RXEN_) != 0);
 
        if (rxenabled) {
                buf &= ~MAC_RX_RXEN_;
-               ret = lan78xx_write_reg(dev, MAC_RX, buf);
+               lan78xx_write_reg(dev, MAC_RX, buf);
        }
 
        /* add 4 to size for FCS */
        buf &= ~MAC_RX_MAX_SIZE_MASK_;
        buf |= (((size + 4) << MAC_RX_MAX_SIZE_SHIFT_) & MAC_RX_MAX_SIZE_MASK_);
 
-       ret = lan78xx_write_reg(dev, MAC_RX, buf);
+       lan78xx_write_reg(dev, MAC_RX, buf);
 
        if (rxenabled) {
                buf |= MAC_RX_RXEN_;
-               ret = lan78xx_write_reg(dev, MAC_RX, buf);
+               lan78xx_write_reg(dev, MAC_RX, buf);
        }
 
        return 0;
@@ -2285,13 +2277,12 @@ static int lan78xx_change_mtu(struct net_device *netdev, int new_mtu)
        int ll_mtu = new_mtu + netdev->hard_header_len;
        int old_hard_mtu = dev->hard_mtu;
        int old_rx_urb_size = dev->rx_urb_size;
-       int ret;
 
        /* no second zero-length packet read wanted after mtu-sized packets */
        if ((ll_mtu % dev->maxpacket) == 0)
                return -EDOM;
 
-       ret = lan78xx_set_rx_max_frame_length(dev, new_mtu + VLAN_ETH_HLEN);
+       lan78xx_set_rx_max_frame_length(dev, new_mtu + VLAN_ETH_HLEN);
 
        netdev->mtu = new_mtu;
 
@@ -2314,7 +2305,6 @@ static int lan78xx_set_mac_addr(struct net_device *netdev, void *p)
        struct lan78xx_net *dev = netdev_priv(netdev);
        struct sockaddr *addr = p;
        u32 addr_lo, addr_hi;
-       int ret;
 
        if (netif_running(netdev))
                return -EBUSY;
@@ -2331,12 +2321,12 @@ static int lan78xx_set_mac_addr(struct net_device *netdev, void *p)
        addr_hi = netdev->dev_addr[4] |
                  netdev->dev_addr[5] << 8;
 
-       ret = lan78xx_write_reg(dev, RX_ADDRL, addr_lo);
-       ret = lan78xx_write_reg(dev, RX_ADDRH, addr_hi);
+       lan78xx_write_reg(dev, RX_ADDRL, addr_lo);
+       lan78xx_write_reg(dev, RX_ADDRH, addr_hi);
 
        /* Added to support MAC address changes */
-       ret = lan78xx_write_reg(dev, MAF_LO(0), addr_lo);
-       ret = lan78xx_write_reg(dev, MAF_HI(0), addr_hi | MAF_HI_VALID_);
+       lan78xx_write_reg(dev, MAF_LO(0), addr_lo);
+       lan78xx_write_reg(dev, MAF_HI(0), addr_hi | MAF_HI_VALID_);
 
        return 0;
 }
@@ -2348,7 +2338,6 @@ static int lan78xx_set_features(struct net_device *netdev,
        struct lan78xx_net *dev = netdev_priv(netdev);
        struct lan78xx_priv *pdata = (struct lan78xx_priv *)(dev->data[0]);
        unsigned long flags;
-       int ret;
 
        spin_lock_irqsave(&pdata->rfe_ctl_lock, flags);
 
@@ -2372,7 +2361,7 @@ static int lan78xx_set_features(struct net_device *netdev,
 
        spin_unlock_irqrestore(&pdata->rfe_ctl_lock, flags);
 
-       ret = lan78xx_write_reg(dev, RFE_CTL, pdata->rfe_ctl);
+       lan78xx_write_reg(dev, RFE_CTL, pdata->rfe_ctl);
 
        return 0;
 }
@@ -3828,7 +3817,6 @@ static u16 lan78xx_wakeframe_crc16(const u8 *buf, int len)
 static int lan78xx_set_suspend(struct lan78xx_net *dev, u32 wol)
 {
        u32 buf;
-       int ret;
        int mask_index;
        u16 crc;
        u32 temp_wucsr;
@@ -3837,26 +3825,26 @@ static int lan78xx_set_suspend(struct lan78xx_net *dev, u32 wol)
        const u8 ipv6_multicast[3] = { 0x33, 0x33 };
        const u8 arp_type[2] = { 0x08, 0x06 };
 
-       ret = lan78xx_read_reg(dev, MAC_TX, &buf);
+       lan78xx_read_reg(dev, MAC_TX, &buf);
        buf &= ~MAC_TX_TXEN_;
-       ret = lan78xx_write_reg(dev, MAC_TX, buf);
-       ret = lan78xx_read_reg(dev, MAC_RX, &buf);
+       lan78xx_write_reg(dev, MAC_TX, buf);
+       lan78xx_read_reg(dev, MAC_RX, &buf);
        buf &= ~MAC_RX_RXEN_;
-       ret = lan78xx_write_reg(dev, MAC_RX, buf);
+       lan78xx_write_reg(dev, MAC_RX, buf);
 
-       ret = lan78xx_write_reg(dev, WUCSR, 0);
-       ret = lan78xx_write_reg(dev, WUCSR2, 0);
-       ret = lan78xx_write_reg(dev, WK_SRC, 0xFFF1FF1FUL);
+       lan78xx_write_reg(dev, WUCSR, 0);
+       lan78xx_write_reg(dev, WUCSR2, 0);
+       lan78xx_write_reg(dev, WK_SRC, 0xFFF1FF1FUL);
 
        temp_wucsr = 0;
 
        temp_pmt_ctl = 0;
-       ret = lan78xx_read_reg(dev, PMT_CTL, &temp_pmt_ctl);
+       lan78xx_read_reg(dev, PMT_CTL, &temp_pmt_ctl);
        temp_pmt_ctl &= ~PMT_CTL_RES_CLR_WKP_EN_;
        temp_pmt_ctl |= PMT_CTL_RES_CLR_WKP_STS_;
 
        for (mask_index = 0; mask_index < NUM_OF_WUF_CFG; mask_index++)
-               ret = lan78xx_write_reg(dev, WUF_CFG(mask_index), 0);
+               lan78xx_write_reg(dev, WUF_CFG(mask_index), 0);
 
        mask_index = 0;
        if (wol & WAKE_PHY) {
@@ -3885,30 +3873,30 @@ static int lan78xx_set_suspend(struct lan78xx_net *dev, u32 wol)
 
                /* set WUF_CFG & WUF_MASK for IPv4 Multicast */
                crc = lan78xx_wakeframe_crc16(ipv4_multicast, 3);
-               ret = lan78xx_write_reg(dev, WUF_CFG(mask_index),
+               lan78xx_write_reg(dev, WUF_CFG(mask_index),
                                        WUF_CFGX_EN_ |
                                        WUF_CFGX_TYPE_MCAST_ |
                                        (0 << WUF_CFGX_OFFSET_SHIFT_) |
                                        (crc & WUF_CFGX_CRC16_MASK_));
 
-               ret = lan78xx_write_reg(dev, WUF_MASK0(mask_index), 7);
-               ret = lan78xx_write_reg(dev, WUF_MASK1(mask_index), 0);
-               ret = lan78xx_write_reg(dev, WUF_MASK2(mask_index), 0);
-               ret = lan78xx_write_reg(dev, WUF_MASK3(mask_index), 0);
+               lan78xx_write_reg(dev, WUF_MASK0(mask_index), 7);
+               lan78xx_write_reg(dev, WUF_MASK1(mask_index), 0);
+               lan78xx_write_reg(dev, WUF_MASK2(mask_index), 0);
+               lan78xx_write_reg(dev, WUF_MASK3(mask_index), 0);
                mask_index++;
 
                /* for IPv6 Multicast */
                crc = lan78xx_wakeframe_crc16(ipv6_multicast, 2);
-               ret = lan78xx_write_reg(dev, WUF_CFG(mask_index),
+               lan78xx_write_reg(dev, WUF_CFG(mask_index),
                                        WUF_CFGX_EN_ |
                                        WUF_CFGX_TYPE_MCAST_ |
                                        (0 << WUF_CFGX_OFFSET_SHIFT_) |
                                        (crc & WUF_CFGX_CRC16_MASK_));
 
-               ret = lan78xx_write_reg(dev, WUF_MASK0(mask_index), 3);
-               ret = lan78xx_write_reg(dev, WUF_MASK1(mask_index), 0);
-               ret = lan78xx_write_reg(dev, WUF_MASK2(mask_index), 0);
-               ret = lan78xx_write_reg(dev, WUF_MASK3(mask_index), 0);
+               lan78xx_write_reg(dev, WUF_MASK0(mask_index), 3);
+               lan78xx_write_reg(dev, WUF_MASK1(mask_index), 0);
+               lan78xx_write_reg(dev, WUF_MASK2(mask_index), 0);
+               lan78xx_write_reg(dev, WUF_MASK3(mask_index), 0);
                mask_index++;
 
                temp_pmt_ctl |= PMT_CTL_WOL_EN_;
@@ -3929,16 +3917,16 @@ static int lan78xx_set_suspend(struct lan78xx_net *dev, u32 wol)
                 * for packettype (offset 12,13) = ARP (0x0806)
                 */
                crc = lan78xx_wakeframe_crc16(arp_type, 2);
-               ret = lan78xx_write_reg(dev, WUF_CFG(mask_index),
+               lan78xx_write_reg(dev, WUF_CFG(mask_index),
                                        WUF_CFGX_EN_ |
                                        WUF_CFGX_TYPE_ALL_ |
                                        (0 << WUF_CFGX_OFFSET_SHIFT_) |
                                        (crc & WUF_CFGX_CRC16_MASK_));
 
-               ret = lan78xx_write_reg(dev, WUF_MASK0(mask_index), 0x3000);
-               ret = lan78xx_write_reg(dev, WUF_MASK1(mask_index), 0);
-               ret = lan78xx_write_reg(dev, WUF_MASK2(mask_index), 0);
-               ret = lan78xx_write_reg(dev, WUF_MASK3(mask_index), 0);
+               lan78xx_write_reg(dev, WUF_MASK0(mask_index), 0x3000);
+               lan78xx_write_reg(dev, WUF_MASK1(mask_index), 0);
+               lan78xx_write_reg(dev, WUF_MASK2(mask_index), 0);
+               lan78xx_write_reg(dev, WUF_MASK3(mask_index), 0);
                mask_index++;
 
                temp_pmt_ctl |= PMT_CTL_WOL_EN_;
@@ -3946,7 +3934,7 @@ static int lan78xx_set_suspend(struct lan78xx_net *dev, u32 wol)
                temp_pmt_ctl |= PMT_CTL_SUS_MODE_0_;
        }
 
-       ret = lan78xx_write_reg(dev, WUCSR, temp_wucsr);
+       lan78xx_write_reg(dev, WUCSR, temp_wucsr);
 
        /* when multiple WOL bits are set */
        if (hweight_long((unsigned long)wol) > 1) {
@@ -3954,16 +3942,16 @@ static int lan78xx_set_suspend(struct lan78xx_net *dev, u32 wol)
                temp_pmt_ctl &= ~PMT_CTL_SUS_MODE_MASK_;
                temp_pmt_ctl |= PMT_CTL_SUS_MODE_0_;
        }
-       ret = lan78xx_write_reg(dev, PMT_CTL, temp_pmt_ctl);
+       lan78xx_write_reg(dev, PMT_CTL, temp_pmt_ctl);
 
        /* clear WUPS */
-       ret = lan78xx_read_reg(dev, PMT_CTL, &buf);
+       lan78xx_read_reg(dev, PMT_CTL, &buf);
        buf |= PMT_CTL_WUPS_MASK_;
-       ret = lan78xx_write_reg(dev, PMT_CTL, buf);
+       lan78xx_write_reg(dev, PMT_CTL, buf);
 
-       ret = lan78xx_read_reg(dev, MAC_RX, &buf);
+       lan78xx_read_reg(dev, MAC_RX, &buf);
        buf |= MAC_RX_RXEN_;
-       ret = lan78xx_write_reg(dev, MAC_RX, buf);
+       lan78xx_write_reg(dev, MAC_RX, buf);
 
        return 0;
 }