Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1770839rwi; Sat, 15 Oct 2022 02:48:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4LZrslZYYBmVbG02BjqqBZ1RoQlUTKUeoF1iHoZ5bVN1rHn+1x6aFXa91J2QW0c2kclhpu X-Received: by 2002:a17:907:971e:b0:78d:e7ed:7585 with SMTP id jg30-20020a170907971e00b0078de7ed7585mr1434966ejc.258.1665827307118; Sat, 15 Oct 2022 02:48:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665827307; cv=none; d=google.com; s=arc-20160816; b=Od+LtQicSzVVfhK9kn0MrrSRzx8mpDQcs4DHBgsbko8r0L1bKCA6DMSw5X9XGLFk7X nKm+0sxkHcNJ1ZtkFSd4c4YkI9TDdhtmtMZya2JfcHpVvHK4k7COpWPpkMEwmjceV6Gx orKBQTZLgvufBr78vkthYYgREBjPKvo3xTWXSy+5XTOuwb/UCdqkcX5b0XDEeN/Tw70H +s6g83jYbrKZjo7yNzGUiVd5kIOpzhQ6PBOvMb7tMLx0TSZeJsn1o3sbc1pOTh66aSfF C8PnJI19128qEcX5eRnn9HmcgLaLfltyULWSZmfbFRkiZmwGnyyVJLtvgLxhQsZeylB1 tQ6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=uilEODdv3PazkYXihcKS3EbN59FUcP/gU7kmYw1f/YQ=; b=umZz4qm/KpGCANIC8a6N+77yvUnU7snb7u1fGRMSz1ugIEw512YSuW/Hpe0uNx2LD6 oCXumUawjYBYWM+RYhYx7Xa8AbNqOSTZCkxOFTkcVogphnypmfemSg0LcsJD7D9wvwdy /7umQKfxOD6bzdyMX7oxA/Pmgw6+ULiEAHJZ00SZTQBkXsLzaiPkid3pH4/0Ig9O3bsN CkygE9+kPhC3ejo7O0Q29d0TiLP7FIjgtTPOSF6bDBfQT2CI6yR1z86y50USjiw6KRx5 7JquF6dKQYcCKYqCuQvIL2A6yL2hOfidT6uxco2kFXXUURl14o8lP+ly0mvzk4wrK+97 ddkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=TZWfRro9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 21-20020a170906309500b0078d4b9e68cbsi4098109ejv.1002.2022.10.15.02.47.44; Sat, 15 Oct 2022 02:48:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=TZWfRro9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229696AbiJOJHd (ORCPT + 99 others); Sat, 15 Oct 2022 05:07:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229686AbiJOJHc (ORCPT ); Sat, 15 Oct 2022 05:07:32 -0400 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [IPv6:2001:4b98:dc4:8::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84C671571B for ; Sat, 15 Oct 2022 02:07:29 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 96B19240005; Sat, 15 Oct 2022 09:07:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1665824847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uilEODdv3PazkYXihcKS3EbN59FUcP/gU7kmYw1f/YQ=; b=TZWfRro9s4S64w92ossm9qh6lF0kyqWmPdLZiTpbuGX4gnF5utaNQpMpVU4TE94ocyFNjs BzLoKD9ya22hnZeidvXsmzwGLckFIyZEMOmIZ4unMWgZnufvSEEHiPhH/0AFNi7mjsbDnK 4auovfBelhhIYl6dpMZ0C3BqHFYJF7oJGDdwla2mJixSUt0NqWNixs9LvWYmF3SSotWRb0 n2LEJSNhadx0j+glpbsO/ewLTWN3w42/HAwwl5rsSgL+F+cAxZ8d3jYc9NKXje7eAJjcIA yhUPqaCznM3+udkxF5ssSrEez7yhUtLljCGyhTWgrrtKwu5GREijHZhC+roS2w== Date: Sat, 15 Oct 2022 11:07:24 +0200 From: Miquel Raynal To: yexingchen116@gmail.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 Subject: Re: [PATCH linux-next] mtd: replace strcmp with sysfs_streq Message-ID: <20221015110724.5c535807@xps-13> In-Reply-To: <20221008074643.308969-1-ye.xingchen@zte.com.cn> References: <20221008074643.308969-1-ye.xingchen@zte.com.cn> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi yexingchen116@gmail.com, yexingchen116@gmail.com wrote on Sat, 8 Oct 2022 07:46:43 +0000: > From: ye xingchen >=20 > Replace the open-code with sysfs_streq(). >=20 > Signed-off-by: ye xingchen > --- > drivers/mtd/parsers/cmdlinepart.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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, > } > =20 > /* if slc is found use emulated SLC mode on this partition*/ > - if (!strncmp(s, "slc", 3)) { > + if (sysfs_streq(s, "slc")) { I'm sorry but, why this would be a use for sysfs_streq? The point of this helper is to consider "\n" null, which is not relevant here. Or do I miss something? > add_flags |=3D MTD_SLC_ON_MLC_EMULATION; > s +=3D 3; > } Thanks, Miqu=C3=A8l