Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: ufs: core: Use str_true_false() helper in UFS_FLAG()

Remove hard-coded strings by using the str_true_false() helper function.

Signed-off-by: Liu Song <liu.song13@zte.com.cn>
Link: https://lore.kernel.org/r/20250721200138431dOU9KyajGyGi5339ma26p@zte.com.cn
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Liu Song and committed by
Martin K. Petersen
51b6f738 37c4e72b

+2 -1
+2 -1
drivers/ufs/core/ufs-sysfs.c
··· 5 5 #include <linux/string.h> 6 6 #include <linux/bitfield.h> 7 7 #include <linux/unaligned.h> 8 + #include <linux/string_choices.h> 8 9 9 10 #include <ufs/ufs.h> 10 11 #include <ufs/unipro.h> ··· 1517 1516 ret = -EINVAL; \ 1518 1517 goto out; \ 1519 1518 } \ 1520 - ret = sysfs_emit(buf, "%s\n", flag ? "true" : "false"); \ 1519 + ret = sysfs_emit(buf, "%s\n", str_true_false(flag)); \ 1521 1520 out: \ 1522 1521 up(&hba->host_sem); \ 1523 1522 return ret; \