[PATCH] qlge: remove duplicated assignment to mbcp

Subsystems: networking drivers, the rest

STALE3224d

2 messages, 2 authors, 2017-11-11 · open the first message on its own page

[PATCH] qlge: remove duplicated assignment to mbcp

From: Colin King <hidden>
Date: 2017-11-09 07:52:28

From: Colin Ian King <redacted>

The assignment to mbcp is identical to the initiatialized value assigned
to mbcp at declaration time a few lines earlier, hence we can remove the
second redundant assignment.  Cleans up clang warning:

drivers/net/ethernet/qlogic/qlge/qlge_mpi.c:209:22: warning:
Value stored to 'mbcp' during its initialization is never read

Signed-off-by: Colin Ian King <redacted>
---
 drivers/net/ethernet/qlogic/qlge/qlge_mpi.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c b/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c
index 384c8bc874f3..4be65d6761b3 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c
@@ -213,7 +213,6 @@ static int ql_idc_req_aen(struct ql_adapter *qdev)
 	/* Get the status data and start up a thread to
 	 * handle the request.
 	 */
-	mbcp = &qdev->idc_mbc;
 	mbcp->out_count = 4;
 	status = ql_get_mb_sts(qdev, mbcp);
 	if (status) {
-- 
2.14.1

Re: [PATCH] qlge: remove duplicated assignment to mbcp

From: David Miller <davem@davemloft.net>
Date: 2017-11-11 10:14:00

From: Colin King <redacted>
Date: Thu,  9 Nov 2017 07:52:15 +0000
From: Colin Ian King <redacted>

The assignment to mbcp is identical to the initiatialized value assigned
to mbcp at declaration time a few lines earlier, hence we can remove the
second redundant assignment.  Cleans up clang warning:

drivers/net/ethernet/qlogic/qlge/qlge_mpi.c:209:22: warning:
Value stored to 'mbcp' during its initialization is never read

Signed-off-by: Colin Ian King <redacted>
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help