[PATCH 1/1] drivers/scsi/bnx2i/bnx2i_iscsi.c: replace shift loop by ilog2

From: Fabian Frederick
Date: Tue May 20 2014 - 12:39:11 EST



Cc: Eddie Wai <eddie.wai@xxxxxxxxxxxx>
Cc: "James E.J. Bottomley" <JBottomley@xxxxxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
---
drivers/scsi/bnx2i/bnx2i_iscsi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index 166543f..8ea1360 100644
--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
@@ -397,9 +397,7 @@ static struct iscsi_endpoint *bnx2i_alloc_ep(struct bnx2i_hba *hba)
bnx2i_ep->hba_age = hba->age;

ec_div = event_coal_div;
- while (ec_div >>= 1)
- bnx2i_ep->ec_shift += 1;
-
+ bnx2i_ep->ec_shift += ilog2(ec_div);
hba->ofld_conns_active++;
init_waitqueue_head(&bnx2i_ep->ofld_wait);
return ep;
--
1.8.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/