[PATCH 3/3] staging: et131x: fix build warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



fix make -W1 warning:
drivers/staging/et131x//et131x.c: In function ‘et1310_setup_device_for_multicast’:
drivers/staging/et131x//et131x.c:1055:6: warning: variable ‘pm_csr’ set but not used [-Wunused-but-set-variable]
  u32 pm_csr;
      ^
drivers/staging/et131x//et131x.c: In function ‘et1310_setup_device_for_unicast’:
drivers/staging/et131x//et131x.c:1104:6: warning: variable ‘pm_csr’ set but not used [-Wunused-but-set-variable]
  u32 pm_csr;
      ^
drivers/staging/et131x//et131x.c: In function ‘et131x_isr_handler’:
drivers/staging/et131x//et131x.c:4009:8: warning: variable ‘pm_csr’ set but not used [-Wunused-but-set-variable]
    u32 pm_csr;
        ^
drivers/staging/et131x//et131x.c: In function ‘et131x_multicast’:
drivers/staging/et131x//et131x.c:4315:16: warning: unused variable ‘flags’ [-Wunused-variable]
  unsigned long flags;
                ^

Signed-off-by: ZHAO Gang <gamerh2o@xxxxxxxxx>
---
 drivers/staging/et131x/et131x.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index 45bb681..44aef29 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -1052,7 +1052,6 @@ static void et1310_setup_device_for_multicast(struct et131x_adapter *adapter)
 	u32 hash2 = 0;
 	u32 hash3 = 0;
 	u32 hash4 = 0;
-	u32 pm_csr;
 
 	/* If ET131X_PACKET_TYPE_MULTICAST is specified, then we provision
 	 * the multi-cast LIST.  If it is NOT specified, (and "ALL" is not
@@ -1086,7 +1085,6 @@ static void et1310_setup_device_for_multicast(struct et131x_adapter *adapter)
 	}
 
 	/* Write out the new hash to the device */
-	pm_csr = readl(&adapter->regs->global.pm_csr);
 	if (!et1310_in_phy_coma(adapter)) {
 		writel(hash1, &rxmac->multi_hash1);
 		writel(hash2, &rxmac->multi_hash2);
@@ -1101,7 +1099,6 @@ static void et1310_setup_device_for_unicast(struct et131x_adapter *adapter)
 	u32 uni_pf1;
 	u32 uni_pf2;
 	u32 uni_pf3;
-	u32 pm_csr;
 
 	/* Set up unicast packet filter reg 3 to be the first two octets of
 	 * the MAC address for both address
@@ -1127,7 +1124,6 @@ static void et1310_setup_device_for_unicast(struct et131x_adapter *adapter)
 		  (adapter->addr[4] << ET_RX_UNI_PF_ADDR1_5_SHIFT) |
 		   adapter->addr[5];
 
-	pm_csr = readl(&adapter->regs->global.pm_csr);
 	if (!et1310_in_phy_coma(adapter)) {
 		writel(uni_pf1, &rxmac->uni_pf_addr1);
 		writel(uni_pf2, &rxmac->uni_pf_addr2);
@@ -4006,12 +4002,10 @@ static void et131x_isr_handler(struct work_struct *work)
 		 */
 		if (adapter->flowcontrol == FLOW_TXONLY ||
 		    adapter->flowcontrol == FLOW_BOTH) {
-			u32 pm_csr;
 
 			/* Tell the device to send a pause packet via the back
 			 * pressure register (bp req and bp xon/xoff)
 			 */
-			pm_csr = readl(&iomem->global.pm_csr);
 			if (!et1310_in_phy_coma(adapter))
 				writel(3, &iomem->txmac.bp_ctrl);
 		}
@@ -4312,7 +4306,6 @@ static void et131x_multicast(struct net_device *netdev)
 {
 	struct et131x_adapter *adapter = netdev_priv(netdev);
 	int packet_filter;
-	unsigned long flags;
 	struct netdev_hw_addr *ha;
 	int i;
 
-- 
1.8.3.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel





[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux