Skip to contentSkip to conversation

scsi: ufs: exynos: Implement dbg_register_dump

bug report [email protected] 1 participant 1 message Jul 24, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello Kiwoong Kim,

The patch 957ee40d413b: "scsi: ufs: exynos: Implement dbg_register_dump" from Jul 15, 2020, leads to the following static checker warning:

drivers/scsi/ufs/ufs-exynos.c:1242 exynos_ufs_dbg_register_dump()
warn: test_bit() takes a bit number

drivers/scsi/ufs/ufs-exynos.c
1238 static void exynos_ufs_dbg_register_dump(struct ufs_hba *hba) 1239 {
1240 struct exynos_ufs *ufs = ufshcd_get_variant(hba);
1241

  1242          if (!test_and_set_bit(EXYNOS_UFS_DBG_DUMP_CXT, &ufs->dbg_flag)) {
                                      ^^^^^^^^^^^^^^^^^^^^^^^

This is BIT(0) but test_and_set_bit should just take 0, otherwise it's a double shift.

  1243                  exynos_ufs_dump_info(&ufs->handle, hba->dev);
  1244                  clear_bit(EXYNOS_UFS_DBG_DUMP_CXT, &ufs->dbg_flag);
  1245          }
  1246  }

regards,
dan carpenter