diff mbox series

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

Message ID 20221008091543.309401-1-ye.xingchen@zte.com.cn
State New
Headers show
Series [linux-next] scsi: ipr: replace !strcmp with sysfs_streq | expand

Commit Message

yexingchen116@gmail.com Oct. 8, 2022, 9:15 a.m. UTC
From: ye xingchen <ye.xingchen@zte.com.cn>

Replace the open-code with sysfs_streq().

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 drivers/scsi/ipr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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;