find_last_bit function is supposed to receive an array pointer
as the first argument. Of course I don't think
most UFS host controllers have more than 64 slots.
If some controllers have more than 64 slosts,
another expression around here using lrb_in_use should be modified.
Change-Id: Ie8960dae813ce7843ea868433d17fbe821bbe5cd
Signed-off-by: Kiwoong Kim <kwmad.kim@samsung.com>
do {
tmp = ~hba->lrb_in_use;
- tag = find_last_bit(&tmp, hba->nutrs);
+ tmp &= BITMAP_LAST_WORD_MASK(hba->nutrs);
+ tag = (tmp) ? __fls(tmp) : ~0ul;
if (tag >= hba->nutrs)
goto out;
} while (test_and_set_bit_lock(tag, &hba->lrb_in_use));