From nobody Fri Sep 19 03:52:05 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 058DEC4332F for ; Tue, 29 Nov 2022 07:04:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229565AbiK2HEr (ORCPT ); Tue, 29 Nov 2022 02:04:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229862AbiK2HE2 (ORCPT ); Tue, 29 Nov 2022 02:04:28 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8419554CB; Mon, 28 Nov 2022 23:04:18 -0800 (PST) Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4NLtcK1VgJz8R039; Tue, 29 Nov 2022 15:04:17 +0800 (CST) Received: from szxlzmapp07.zte.com.cn ([10.5.230.251]) by mse-fl1.zte.com.cn with SMTP id 2AT7492l035439; Tue, 29 Nov 2022 15:04:09 +0800 (+08) (envelope-from yang.yang29@zte.com.cn) Received: from mapi (szxlzmapp02[null]) by mapi (Zmail) with MAPI id mid14; Tue, 29 Nov 2022 15:04:12 +0800 (CST) Date: Tue, 29 Nov 2022 15:04:12 +0800 (CST) X-Zmail-TransId: 2b046385aeecffffffff9fa25732 X-Mailer: Zmail v1.0 Message-ID: <202211291504123795374@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , Subject: =?UTF-8?B?W1BBVENIIGxpbnV4LW5leHRdIGVsZXZhdG9yOiB1c2Ugc3lzZnNfc3RyZXEoKSBpbnN0ZWFkIG9mIHN0cm5jbXAoKQ==?= X-MAIL: mse-fl1.zte.com.cn 2AT7492l035439 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.137.novalocal with ID 6385AEF1.000 by FangMail milter! X-FangMail-Envelope: 1669705457/4NLtcK1VgJz8R039/6385AEF1.000/10.5.228.132/[10.5.228.132]/mse-fl1.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 6385AEF1.000/4NLtcK1VgJz8R039 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Xu Panda Replace the open-code with sysfs_streq(). Signed-off-by: Xu Panda Signed-off-by: Yang Yang --- block/elevator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/elevator.c b/block/elevator.c index 599413620558..6ed6049a01fd 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -721,7 +721,7 @@ static int elevator_change(struct request_queue *q, con= st char *elevator_name) if (!blk_queue_registered(q)) return -ENOENT; - if (!strncmp(elevator_name, "none", 4)) { + if (sysfs_streq(elevator_name, "none")) { if (q->elevator) elevator_disable(q); return 0; --=20 2.15.2