[COMMON] scsi: ufs: fix clang warning
authorJaeHun Jung <jh0801.jung@samsung.com>
Thu, 24 May 2018 06:00:59 +0000 (15:00 +0900)
committerYoungmin Nam <youngmin.nam@samsung.com>
Thu, 24 May 2018 08:26:22 +0000 (17:26 +0900)
This patch resolve below waring.

warning: implicit conversion from 'unsigned long' to 'int' changes
         value from 18446744073709551615 to -1 [-Wconstant-conversion]

Change-Id: I88e9f844dfdbb310eb4bb1a5ac85d14a2eafe53c
Signed-off-by: JaeHun Jung <jh0801.jung@samsung.com>
drivers/scsi/ufs/ufshcd.c

index 7460a5ad645ac224c257f9c0bf1cee0b7b41bfb3..521474a6df3f3ad2379c62864952bc3f58a509af 100644 (file)
@@ -2718,7 +2718,7 @@ static bool ufshcd_get_dev_cmd_tag(struct ufs_hba *hba, int *tag_out)
        do {
                tmp = ~hba->lrb_in_use;
                tmp &= BITMAP_LAST_WORD_MASK(hba->nutrs);
-               tag = (tmp) ? __fls(tmp) : ~0ul;
+               tag = (int)(tmp) ? __fls(tmp) : ~0;
                if (tag >= hba->nutrs)
                        goto out;
        } while (test_and_set_bit_lock(tag, &hba->lrb_in_use));