public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: yexingchen116@gmail.com
To: miquel.raynal@bootlin.com
Cc: richard@nod.at, vigneshr@ti.com,
	wsa+renesas@sang-engineering.com, linux-mtd@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	ye xingchen <ye.xingchen@zte.com.cn>
Subject: [PATCH linux-next] mtd: replace strcmp with sysfs_streq
Date: Sat,  8 Oct 2022 07:46:43 +0000	[thread overview]
Message-ID: <20221008074643.308969-1-ye.xingchen@zte.com.cn> (raw)

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/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


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

             reply	other threads:[~2022-10-08  7:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-08  7:46 yexingchen116 [this message]
2022-10-15  9:07 ` [PATCH linux-next] mtd: replace strcmp with sysfs_streq Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221008074643.308969-1-ye.xingchen@zte.com.cn \
    --to=yexingchen116@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=ye.xingchen@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox