[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250721200138431dOU9KyajGyGi5339ma26p@zte.com.cn>
Date: Mon, 21 Jul 2025 20:01:38 +0800 (CST)
From: <liu.xuemei1@....com.cn>
To: <james.bottomley@...senpartnership.com>, <martin.petersen@...cle.com>
Cc: <alim.akhtar@...sung.com>, <avri.altman@....com>, <bvanassche@....org>,
<huobean@...il.com>, <peter.wang@...iatek.com>, <tanghuan@...o.com>,
<liu.song13@....com.cn>, <viro@...iv.linux.org.uk>,
<quic_nguyenb@...cinc.com>, <linux-scsi@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH] scsi: ufs: core: Use str_true_false() helper in UFS_FLAG()
From: Liu Song <liu.song13@....com.cn>
Remove hard-coded strings by using the str_true_false() helper function.
Signed-off-by: Liu Song <liu.song13@....com.cn>
---
drivers/ufs/core/ufs-sysfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/ufs/core/ufs-sysfs.c b/drivers/ufs/core/ufs-sysfs.c
index 00948378a719..4bd7d491e3c5 100644
--- a/drivers/ufs/core/ufs-sysfs.c
+++ b/drivers/ufs/core/ufs-sysfs.c
@@ -5,6 +5,7 @@
#include <linux/string.h>
#include <linux/bitfield.h>
#include <linux/unaligned.h>
+#include <linux/string_choices.h>
#include <ufs/ufs.h>
#include <ufs/unipro.h>
@@ -1516,7 +1517,7 @@ static ssize_t _name##_show(struct device *dev, \
ret = -EINVAL; \
goto out; \
} \
- ret = sysfs_emit(buf, "%s\n", flag ? "true" : "false"); \
+ ret = sysfs_emit(buf, "%s\n", str_true_false(flag)); \
out: \
up(&hba->host_sem); \
return ret; \
--
2.27.0
Powered by blists - more mailing lists