From 83b4768e1b6bd92a94b15ccb22762c686f5ede38 Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Thu, 20 Sep 2018 15:24:59 -0700 Subject: [PATCH] bna: Remove unnecessary self assignment Clang warns when a variable is assigned to itself. drivers/net/ethernet/brocade/bna/bna_enet.c:1800:9: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] for (i = i; i < (bna->ioceth.attr.num_ucmac * 2); i++) ~ ^ ~ drivers/net/ethernet/brocade/bna/bna_enet.c:1835:9: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] for (i = i; i < (bna->ioceth.attr.num_mcmac * 2); i++) ~ ^ ~ 2 warnings generated. Link: https://github.com/ClangBuiltLinux/linux/issues/110 Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller --- drivers/net/ethernet/brocade/bna/bna_enet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/brocade/bna/bna_enet.c b/drivers/net/ethernet/brocade/bna/bna_enet.c index bba81735ce87..6d2d4527357c 100644 --- a/drivers/net/ethernet/brocade/bna/bna_enet.c +++ b/drivers/net/ethernet/brocade/bna/bna_enet.c @@ -1797,7 +1797,7 @@ bna_ucam_mod_init(struct bna_ucam_mod *ucam_mod, struct bna *bna, /* A separate queue to allow synchronous setting of a list of MACs */ INIT_LIST_HEAD(&ucam_mod->del_q); - for (i = i; i < (bna->ioceth.attr.num_ucmac * 2); i++) + for (; i < (bna->ioceth.attr.num_ucmac * 2); i++) list_add_tail(&ucam_mod->ucmac[i].qe, &ucam_mod->del_q); ucam_mod->bna = bna; @@ -1832,7 +1832,7 @@ bna_mcam_mod_init(struct bna_mcam_mod *mcam_mod, struct bna *bna, /* A separate queue to allow synchronous setting of a list of MACs */ INIT_LIST_HEAD(&mcam_mod->del_q); - for (i = i; i < (bna->ioceth.attr.num_mcmac * 2); i++) + for (; i < (bna->ioceth.attr.num_mcmac * 2); i++) list_add_tail(&mcam_mod->mcmac[i].qe, &mcam_mod->del_q); mcam_mod->bna = bna; -- 2.30.2