[PATCH linux-next] mtd: replace strcmp with sysfs_streq
yexingchen116 at gmail.com
yexingchen116 at gmail.com
Sat Oct 8 00:46:43 PDT 2022
From: ye xingchen <ye.xingchen at zte.com.cn>
Replace the open-code with sysfs_streq().
Signed-off-by: ye xingchen <ye.xingchen at zte.com.cn>
---
drivers/mtd/parsers/cmdlinepart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/parsers/cmdlinepart.c
b/drivers/mtd/parsers/cmdlinepart.c
index b34856def816..6a401e0b1b95 100644
--- a/drivers/mtd/parsers/cmdlinepart.c
+++ b/drivers/mtd/parsers/cmdlinepart.c
@@ -154,7 +154,7 @@ static struct mtd_partition * newpart(char *s,
}
/* if slc is found use emulated SLC mode on this partition*/
- if (!strncmp(s, "slc", 3)) {
+ if (sysfs_streq(s, "slc")) {
add_flags |= MTD_SLC_ON_MLC_EMULATION;
s += 3;
}
--
2.25.1
More information about the linux-mtd
mailing list