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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux