lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20221008091543.309401-1-ye.xingchen@zte.com.cn>
Date:   Sat,  8 Oct 2022 09:15:43 +0000
From:   yexingchen116@...il.com
To:     martin.petersen@...cle.com
Cc:     brking@...ibm.com, jejb@...ux.ibm.com, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org, ye xingchen <ye.xingchen@....com.cn>
Subject: [PATCH linux-next] scsi: ipr: replace !strcmp with sysfs_streq

From: ye xingchen <ye.xingchen@....com.cn>

Replace the open-code with sysfs_streq().

Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ