diff mbox series

[net-next,9/9] lan78xx: remove set but unused 'ret' variable

Message ID 20210204113121.29786-10-john.efstathiades@pebblebay.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series LAN7800 USB network interface driver NAPI support | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/cc_maintainers warning 3 maintainers not CCed: woojung.huh@microchip.com kuba@kernel.org linux-usb@vger.kernel.org
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit fail Errors and warnings before: 14 this patch: 12
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 201 lines checked
netdev/build_allmodconfig_warn fail Errors and warnings before: 14 this patch: 12
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

John Efstathiades Feb. 4, 2021, 11:31 a.m. UTC
Incorporate changes from commit 06cd7c46b3ab ("net: usb: lan78xx:
Remove lots of set but unused 'ret' variables") that fixes kernel
build warnings.

Signed-off-by: John Efstathiades <john.efstathiades@pebblebay.com>
---
 drivers/net/usb/lan78xx.c | 107 +++++++++++++++++++-------------------
 1 file changed, 53 insertions(+), 54 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 0a6f4765f595..fe1db4336e23 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -1034,9 +1034,9 @@  static int lan78xx_read_raw_otp(struct lan78xx_net *dev, u32 offset,
 
 	for (i = 0; i < length; i++) {
 		lan78xx_write_reg(dev, OTP_ADDR1,
-					((offset + i) >> 8) & OTP_ADDR1_15_11);
+				  ((offset + i) >> 8) & OTP_ADDR1_15_11);
 		lan78xx_write_reg(dev, OTP_ADDR2,
-					((offset + i) & OTP_ADDR2_10_3));
+				  ((offset + i) & OTP_ADDR2_10_3));
 
 		lan78xx_write_reg(dev, OTP_FUNC_CMD, OTP_FUNC_CMD_READ_);
 		lan78xx_write_reg(dev, OTP_CMD_GO, OTP_CMD_GO_GO_);
@@ -1090,9 +1090,9 @@  static int lan78xx_write_raw_otp(struct lan78xx_net *dev, u32 offset,
 
 	for (i = 0; i < length; i++) {
 		lan78xx_write_reg(dev, OTP_ADDR1,
-					((offset + i) >> 8) & OTP_ADDR1_15_11);
+				  ((offset + i) >> 8) & OTP_ADDR1_15_11);
 		lan78xx_write_reg(dev, OTP_ADDR2,
-					((offset + i) & OTP_ADDR2_10_3));
+				  ((offset + i) & OTP_ADDR2_10_3));
 		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_);
@@ -1235,9 +1235,9 @@  static void lan78xx_deferred_multicast_write(struct work_struct *param)
 	for (i = 1; i < NUM_OF_MAF; i++) {
 		lan78xx_write_reg(dev, MAF_HI(i), 0);
 		lan78xx_write_reg(dev, MAF_LO(i),
-					pdata->pfilter_table[i][1]);
+				  pdata->pfilter_table[i][1]);
 		lan78xx_write_reg(dev, MAF_HI(i),
-					pdata->pfilter_table[i][0]);
+				  pdata->pfilter_table[i][0]);
 	}
 
 	lan78xx_write_reg(dev, RFE_CTL, pdata->rfe_ctl);
@@ -2236,7 +2236,7 @@  static int lan8835_fixup(struct phy_device *phydev)
 
 	/* RGMII MAC TXC Delay Enable */
 	lan78xx_write_reg(dev, MAC_RGMII_ID,
-				MAC_RGMII_ID_TXC_DELAY_EN_);
+			  MAC_RGMII_ID_TXC_DELAY_EN_);
 
 	/* RGMII TX DLL Tune Adjust */
 	lan78xx_write_reg(dev, RGMII_TX_BYP_DLL, 0x3D00);
@@ -2549,9 +2549,9 @@  static int lan78xx_set_mac_addr(struct net_device *netdev, void *p)
 	/* The station MAC address in the perfect address filter table
 	 * must also be updated to ensure frames are received
 	 */
-	ret = lan78xx_write_reg(dev, MAF_HI(0), 0);
-	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_HI(0), 0);
+	lan78xx_write_reg(dev, MAF_LO(0), addr_lo);
+	lan78xx_write_reg(dev, MAF_HI(0), addr_hi | MAF_HI_VALID_);
 
 	return 0;
 }
@@ -4438,34 +4438,33 @@  static u16 lan78xx_wakeframe_crc16(const u8 *buf, int len)
 static int lan78xx_set_auto_suspend(struct lan78xx_net *dev)
 {
 	u32 buf;
-	int ret;
 
 	lan78xx_stop_tx_path(dev);
 	lan78xx_stop_rx_path(dev);
 
 	/* auto suspend (selective suspend) */
 
-	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);
 
 	/* set goodframe wakeup */
 
-	ret = lan78xx_read_reg(dev, WUCSR, &buf);
+	lan78xx_read_reg(dev, WUCSR, &buf);
 	buf |= WUCSR_RFE_WAKE_EN_;
 	buf |= WUCSR_STORE_WAKE_;
-	ret = lan78xx_write_reg(dev, WUCSR, buf);
-	ret = lan78xx_read_reg(dev, PMT_CTL, &buf);
+	lan78xx_write_reg(dev, WUCSR, buf);
+	lan78xx_read_reg(dev, PMT_CTL, &buf);
 	buf &= ~PMT_CTL_RES_CLR_WKP_EN_;
 	buf |= PMT_CTL_RES_CLR_WKP_STS_;
 	buf |= PMT_CTL_PHY_WAKE_EN_;
 	buf |= PMT_CTL_WOL_EN_;
 	buf &= ~PMT_CTL_SUS_MODE_MASK_;
 	buf |= PMT_CTL_SUS_MODE_3_;
-	ret = lan78xx_write_reg(dev, PMT_CTL, buf);
-	ret = lan78xx_read_reg(dev, PMT_CTL, &buf);
+	lan78xx_write_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);
 
 	lan78xx_start_rx_path(dev);
 
@@ -4528,10 +4527,10 @@  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);
 		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_));
+				  WUF_CFGX_EN_ |
+				  WUF_CFGX_TYPE_MCAST_ |
+				  (0 << WUF_CFGX_OFFSET_SHIFT_) |
+				  (crc & WUF_CFGX_CRC16_MASK_));
 
 		lan78xx_write_reg(dev, WUF_MASK0(mask_index), 7);
 		lan78xx_write_reg(dev, WUF_MASK1(mask_index), 0);
@@ -4542,10 +4541,10 @@  static int lan78xx_set_suspend(struct lan78xx_net *dev, u32 wol)
 		/* for IPv6 Multicast */
 		crc = lan78xx_wakeframe_crc16(ipv6_multicast, 2);
 		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_));
+				  WUF_CFGX_EN_ |
+				  WUF_CFGX_TYPE_MCAST_ |
+				  (0 << WUF_CFGX_OFFSET_SHIFT_) |
+				  (crc & WUF_CFGX_CRC16_MASK_));
 
 		lan78xx_write_reg(dev, WUF_MASK0(mask_index), 3);
 		lan78xx_write_reg(dev, WUF_MASK1(mask_index), 0);
@@ -4572,10 +4571,10 @@  static int lan78xx_set_suspend(struct lan78xx_net *dev, u32 wol)
 		 */
 		crc = lan78xx_wakeframe_crc16(arp_type, 2);
 		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_));
+				  WUF_CFGX_EN_ |
+				  WUF_CFGX_TYPE_ALL_ |
+				  (0 << WUF_CFGX_OFFSET_SHIFT_) |
+				  (crc & WUF_CFGX_CRC16_MASK_));
 
 		lan78xx_write_reg(dev, WUF_MASK0(mask_index), 0x3000);
 		lan78xx_write_reg(dev, WUF_MASK1(mask_index), 0);
@@ -4667,19 +4666,19 @@  static int lan78xx_suspend(struct usb_interface *intf, pm_message_t message)
 
 		set_bit(EVENT_DEV_ASLEEP, &dev->flags);
 
-		ret = lan78xx_write_reg(dev, WUCSR, 0);
-		ret = lan78xx_write_reg(dev, WUCSR2, 0);
+		lan78xx_write_reg(dev, WUCSR, 0);
+		lan78xx_write_reg(dev, WUCSR2, 0);
 
-		ret = lan78xx_read_reg(dev, PMT_CTL, &buf);
+		lan78xx_read_reg(dev, PMT_CTL, &buf);
 		buf &= ~PMT_CTL_RES_CLR_WKP_EN_;
 		buf |= PMT_CTL_RES_CLR_WKP_STS_;
 		buf &= ~PMT_CTL_SUS_MODE_MASK_;
 		buf |= PMT_CTL_SUS_MODE_3_;
-		ret = lan78xx_write_reg(dev, PMT_CTL, buf);
+		lan78xx_write_reg(dev, PMT_CTL, buf);
 
-		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 = 0;
@@ -4783,22 +4782,22 @@  static int lan78xx_resume(struct usb_interface *intf)
 		clear_bit(EVENT_DEV_ASLEEP, &dev->flags);
 	}
 
-	ret = lan78xx_write_reg(dev, WUCSR2, 0);
-	ret = lan78xx_write_reg(dev, WUCSR, 0);
-	ret = lan78xx_write_reg(dev, WK_SRC, 0xFFF1FF1FUL);
-
-	ret = lan78xx_write_reg(dev, WUCSR2, WUCSR2_NS_RCD_ |
-					     WUCSR2_ARP_RCD_ |
-					     WUCSR2_IPV6_TCPSYN_RCD_ |
-					     WUCSR2_IPV4_TCPSYN_RCD_);
-
-	ret = lan78xx_write_reg(dev, WUCSR, WUCSR_EEE_TX_WAKE_ |
-					    WUCSR_EEE_RX_WAKE_ |
-					    WUCSR_PFDA_FR_ |
-					    WUCSR_RFE_WAKE_FR_ |
-					    WUCSR_WUFR_ |
-					    WUCSR_MPR_ |
-					    WUCSR_BCST_FR_);
+	lan78xx_write_reg(dev, WUCSR2, 0);
+	lan78xx_write_reg(dev, WUCSR, 0);
+	lan78xx_write_reg(dev, WK_SRC, 0xFFF1FF1FUL);
+
+	lan78xx_write_reg(dev, WUCSR2, WUCSR2_NS_RCD_ |
+				       WUCSR2_ARP_RCD_ |
+				       WUCSR2_IPV6_TCPSYN_RCD_ |
+				       WUCSR2_IPV4_TCPSYN_RCD_);
+
+	lan78xx_write_reg(dev, WUCSR, WUCSR_EEE_TX_WAKE_ |
+				      WUCSR_EEE_RX_WAKE_ |
+				      WUCSR_PFDA_FR_ |
+				      WUCSR_RFE_WAKE_FR_ |
+				      WUCSR_WUFR_ |
+				      WUCSR_MPR_ |
+				      WUCSR_BCST_FR_);
 
 	mutex_unlock(&dev->dev_mutex);