[PATCH linux-next] scsi: ipr: replace !strcmp with sysfs_streq

From: yexingchen116
Date: Sat Oct 08 2022 - 05:15:57 EST


From: ye xingchen <ye.xingchen@xxxxxxxxxx>

Replace the open-code with sysfs_streq().

Signed-off-by: ye xingchen <ye.xingchen@xxxxxxxxxx>
---
drivers/scsi/ipr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 9d01a3e3c26a..f892ff74d56a 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -3685,7 +3685,7 @@ static ssize_t ipr_store_adapter_state(struct device *dev,

spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
if (ioa_cfg->hrrq[IPR_INIT_HRRQ].ioa_is_dead &&
- !strncmp(buf, "online", 6)) {
+ sysfs_streq(buf, "online")) {
for (i = 0; i < ioa_cfg->hrrq_num; i++) {
spin_lock(&ioa_cfg->hrrq[i]._lock);
ioa_cfg->hrrq[i].ioa_is_dead = 0;
--
2.25.1