Skip to content

Commit 51b6f73

Browse files
Liu Songmartinkpetersen
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Peter Wang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 37c4e72 commit 51b6f73

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/ufs/core/ufs-sysfs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <linux/string.h>
66
#include <linux/bitfield.h>
77
#include <linux/unaligned.h>
8+
#include <linux/string_choices.h>
89

910
#include <ufs/ufs.h>
1011
#include <ufs/unipro.h>
@@ -1516,7 +1517,7 @@ static ssize_t _name##_show(struct device *dev, \
15161517
ret = -EINVAL; \
15171518
goto out; \
15181519
} \
1519-
ret = sysfs_emit(buf, "%s\n", flag ? "true" : "false"); \
1520+
ret = sysfs_emit(buf, "%s\n", str_true_false(flag)); \
15201521
out: \
15211522
up(&hba->host_sem); \
15221523
return ret; \

0 commit comments

Comments
 (0)