diff mbox

[v2,29/45] IB/nes: Remove set-but-not-used variables

Message ID 20171011174927.25113-30-bart.vanassche@wdc.com (mailing list archive)
State Accepted
Headers show

Commit Message

Bart Van Assche Oct. 11, 2017, 5:49 p.m. UTC
This patch does not change any functionality.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Faisal Latif <faisal.latif@intel.com>
---
 drivers/infiniband/hw/nes/nes_cm.c    | 8 --------
 drivers/infiniband/hw/nes/nes_utils.c | 5 ++---
 2 files changed, 2 insertions(+), 11 deletions(-)

Comments

Faisal Latif Oct. 11, 2017, 6:12 p.m. UTC | #1
>-----Original Message-----
>From: Bart Van Assche [mailto:bart.vanassche@wdc.com]
>Sent: Wednesday, October 11, 2017 12:49 PM
>To: Doug Ledford <dledford@redhat.com>
>Cc: linux-rdma@vger.kernel.org; Bart Van Assche <bart.vanassche@wdc.com>;
>Latif, Faisal <faisal.latif@intel.com>
>Subject: [PATCH v2 29/45] IB/nes: Remove set-but-not-used variables
>
>This patch does not change any functionality.
>
>Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
>Cc: Faisal Latif <faisal.latif@intel.com>
>---
> drivers/infiniband/hw/nes/nes_cm.c    | 8 --------
> drivers/infiniband/hw/nes/nes_utils.c | 5 ++---
> 2 files changed, 2 insertions(+), 11 deletions(-)
>
>diff --git a/drivers/infiniband/hw/nes/nes_cm.c
>b/drivers/infiniband/hw/nes/nes_cm.c
>index a5f6dffef07a..bfe2156813b1 100644
>--- a/drivers/infiniband/hw/nes/nes_cm.c
>+++ b/drivers/infiniband/hw/nes/nes_cm.c
>@@ -1389,7 +1389,6 @@ static int nes_addr_resolve_neigh(struct nes_vnic
>*nesvnic, u32 dst_ip, int arpi
> 	struct rtable *rt;
> 	struct neighbour *neigh;
> 	int rc = arpindex;
>-	struct net_device *netdev;
> 	struct nes_adapter *nesadapter = nesvnic->nesdev->nesadapter;
> 	__be32 dst_ipaddr = htonl(dst_ip);
>
>@@ -1400,11 +1399,6 @@ static int nes_addr_resolve_neigh(struct nes_vnic
>*nesvnic, u32 dst_ip, int arpi
> 		return rc;
> 	}
>
>-	if (netif_is_bond_slave(nesvnic->netdev))
>-		netdev = netdev_master_upper_dev_get(nesvnic->netdev);
>-	else
>-		netdev = nesvnic->netdev;
>-
> 	neigh = dst_neigh_lookup(&rt->dst, &dst_ipaddr);
>
> 	rcu_read_lock();
>@@ -3075,7 +3069,6 @@ int nes_accept(struct iw_cm_id *cm_id, struct
>iw_cm_conn_param *conn_param)
> 	u32 crc_value;
> 	int ret;
> 	int passive_state;
>-	struct nes_ib_device *nesibdev;
> 	struct ib_mr *ibmr = NULL;
> 	struct nes_pd *nespd;
> 	u64 tagged_offset;
>@@ -3158,7 +3151,6 @@ int nes_accept(struct iw_cm_id *cm_id, struct
>iw_cm_conn_param *conn_param)
>
> 	if (raddr->sin_addr.s_addr != laddr->sin_addr.s_addr) {
> 		u64temp = (unsigned long)nesqp;
>-		nesibdev = nesvnic->nesibdev;
> 		nespd = nesqp->nespd;
> 		tagged_offset = (u64)(unsigned long)*start_buff;
> 		ibmr = nes_reg_phys_mr(&nespd->ibpd,
>diff --git a/drivers/infiniband/hw/nes/nes_utils.c
>b/drivers/infiniband/hw/nes/nes_utils.c
>index 7b67e9cb57ed..0613eb5006cc 100644
>--- a/drivers/infiniband/hw/nes/nes_utils.c
>+++ b/drivers/infiniband/hw/nes/nes_utils.c
>@@ -753,7 +753,6 @@ void nes_mh_fix(unsigned long parm)
> 	u32 mac_tx_frames_low;
> 	u32 mac_tx_frames_high;
> 	u32 mac_tx_pauses;
>-	u32 serdes_status;
> 	u32 reset_value;
> 	u32 tx_control;
> 	u32 tx_config;
>@@ -846,7 +845,7 @@ void nes_mh_fix(unsigned long parm)
> 		}
>
> 		nes_write_indexed(nesdev,
>NES_IDX_ETH_SERDES_COMMON_CONTROL0, 0x00000008);
>-		serdes_status = nes_read_indexed(nesdev,
>NES_IDX_ETH_SERDES_COMMON_STATUS0);
>+		nes_read_indexed(nesdev,
>NES_IDX_ETH_SERDES_COMMON_STATUS0);
>
> 		nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_EMP0,
>0x000bdef7);
> 		nes_write_indexed(nesdev,
>NES_IDX_ETH_SERDES_TX_DRIVE0, 0x9ce73000); @@ -859,7 +858,7 @@ void
>nes_mh_fix(unsigned long parm)
> 		} else {
> 			nes_write_indexed(nesdev,
>NES_IDX_ETH_SERDES_RX_EQ_CONTROL0, 0xf0042222);
> 		}
>-		serdes_status = nes_read_indexed(nesdev,
>NES_IDX_ETH_SERDES_RX_EQ_STATUS0);
>+		nes_read_indexed(nesdev,
>NES_IDX_ETH_SERDES_RX_EQ_STATUS0);
> 		nes_write_indexed(nesdev,
>NES_IDX_ETH_SERDES_CDR_CONTROL0, 0x000000ff);
>
> 		nes_write_indexed(nesdev, NES_IDX_MAC_TX_CONTROL,
>tx_control);
>--
>2.14.2
Acked-by: Faisal Latif <fasial.latif@intel.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index a5f6dffef07a..bfe2156813b1 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -1389,7 +1389,6 @@  static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi
 	struct rtable *rt;
 	struct neighbour *neigh;
 	int rc = arpindex;
-	struct net_device *netdev;
 	struct nes_adapter *nesadapter = nesvnic->nesdev->nesadapter;
 	__be32 dst_ipaddr = htonl(dst_ip);
 
@@ -1400,11 +1399,6 @@  static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi
 		return rc;
 	}
 
-	if (netif_is_bond_slave(nesvnic->netdev))
-		netdev = netdev_master_upper_dev_get(nesvnic->netdev);
-	else
-		netdev = nesvnic->netdev;
-
 	neigh = dst_neigh_lookup(&rt->dst, &dst_ipaddr);
 
 	rcu_read_lock();
@@ -3075,7 +3069,6 @@  int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
 	u32 crc_value;
 	int ret;
 	int passive_state;
-	struct nes_ib_device *nesibdev;
 	struct ib_mr *ibmr = NULL;
 	struct nes_pd *nespd;
 	u64 tagged_offset;
@@ -3158,7 +3151,6 @@  int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
 
 	if (raddr->sin_addr.s_addr != laddr->sin_addr.s_addr) {
 		u64temp = (unsigned long)nesqp;
-		nesibdev = nesvnic->nesibdev;
 		nespd = nesqp->nespd;
 		tagged_offset = (u64)(unsigned long)*start_buff;
 		ibmr = nes_reg_phys_mr(&nespd->ibpd,
diff --git a/drivers/infiniband/hw/nes/nes_utils.c b/drivers/infiniband/hw/nes/nes_utils.c
index 7b67e9cb57ed..0613eb5006cc 100644
--- a/drivers/infiniband/hw/nes/nes_utils.c
+++ b/drivers/infiniband/hw/nes/nes_utils.c
@@ -753,7 +753,6 @@  void nes_mh_fix(unsigned long parm)
 	u32 mac_tx_frames_low;
 	u32 mac_tx_frames_high;
 	u32 mac_tx_pauses;
-	u32 serdes_status;
 	u32 reset_value;
 	u32 tx_control;
 	u32 tx_config;
@@ -846,7 +845,7 @@  void nes_mh_fix(unsigned long parm)
 		}
 
 		nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL0, 0x00000008);
-		serdes_status = nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_STATUS0);
+		nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_STATUS0);
 
 		nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_EMP0, 0x000bdef7);
 		nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_DRIVE0, 0x9ce73000);
@@ -859,7 +858,7 @@  void nes_mh_fix(unsigned long parm)
 		} else {
 			nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_RX_EQ_CONTROL0, 0xf0042222);
 		}
-		serdes_status = nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_RX_EQ_STATUS0);
+		nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_RX_EQ_STATUS0);
 		nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_CDR_CONTROL0, 0x000000ff);
 
 		nes_write_indexed(nesdev, NES_IDX_MAC_TX_CONTROL, tx_control);