[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140520184809.56d3707440f64e2d9656e3c7@skynet.be>
Date: Tue, 20 May 2014 18:48:09 +0200
From: Fabian Frederick <fabf@...net.be>
To: linux-kernel <linux-kernel@...r.kernel.org>
Cc: Kurt Garloff <garloff@...e.de>, akpm <akpm@...ux-foundation.org>
Subject: [PATCH 1/1] drivers/scsi/tmscsim.c: replace shift loop by ilog2
Cc: Kurt Garloff <garloff@...e.de>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@...net.be>
---
drivers/scsi/tmscsim.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c
index b006cf7..c353848 100644
--- a/drivers/scsi/tmscsim.c
+++ b/drivers/scsi/tmscsim.c
@@ -1611,7 +1611,7 @@ dc390_Reselect( struct dc390_acb* pACB )
printk (KERN_ERR "DC390: Reselection must select host adapter: %02x!\n", lun);
else
lun ^= 1 << pACB->pScsiHost->this_id; /* Mask AdapterID */
- id = 0; while (lun >>= 1) id++;
+ id = ilog2(lun);
/* Get LUN */
lun = DC390_read8 (ScsiFifo);
if (!(lun & IDENTIFY_BASE)) printk (KERN_ERR "DC390: Resel: Expect identify message!\n");
--
1.8.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists