Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp386720rwb; Mon, 28 Nov 2022 23:07:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf7r4KroRdyoj9TaMzvbgdkijc924tHcNQqFFRMOrH96GX5y/gBdm3juexFtfC1k+YyVciTa X-Received: by 2002:a63:5b52:0:b0:430:3d93:8c57 with SMTP id l18-20020a635b52000000b004303d938c57mr34712469pgm.397.1669705663545; Mon, 28 Nov 2022 23:07:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669705663; cv=none; d=google.com; s=arc-20160816; b=Jgf+BiV90EFWxZxmyW3LrDoHyjQ99cLOx/gg9yGleruoqmnGH5OOMhN8Skywp8nvDC STqqZ9BXZLYhjy5hPDzFrvFUQ+qdrS1x7/oTdUJfbQuOtgvlk4Iw+K1QRdEfNfFhwiZQ X8wKgDd3IeYnGKOEOvbP5kl8dt4iwqUvyNLRQ2D4QsNX/3ZkSDyt1KMJhUPQLDxbXY8g PuvZ/ktkdLv7gUm0e4SnfBUhU1dpovBPu56GlwGF5U9FwzS+Ogx/iYZt1Xtuim4ABTWb 8AOYLWw6QrsWnhcct3qsOipzcemQHhYhPs+wGUMmc+he8BNqaBMV2jfbL7FWNyjTJBo+ N6pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=hGb1tHMW12G4Mau5p1/X+Tq80lOOaRVvQPDnHwyyrM0=; b=pOfd2PQF95h3YSjaI0UAyi5dP56V1FNour9t286fw+NhiZWeSoAKzsBaAMJgHjheHC pRxfEZLsMhOmPnLSP3M3tcqrVDMim7efm27UfbSkWYHWHJ3zwW3MaGN+fgapQrMTSzG+ 7G8Fnh8/Gkr5N6L/TMEdvA9ZV9VkhjnxwREbP7o5vhKUDhWnCCg3OZ7TDOaM1LkfsGyl jJVaa++T6PzMbirUfC9leddM+WMW+fSlTkNYAtClV+lYMYd584ZhM+wA0y8Ykpcy1YNh HtJb18KXffx2j/KKEgJXyKuTMK25oeVDjf1BS4WdUto534DB6MLXOpd9OejfE+Ywsnat YEyw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y6-20020a17090322c600b0017f8d9b7e5fsi16105420plg.133.2022.11.28.23.07.33; Mon, 28 Nov 2022 23:07:43 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229925AbiK2HEp (ORCPT + 82 others); Tue, 29 Nov 2022 02:04:45 -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==?= Content-Type: text/plain; charset="UTF-8" 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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY 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 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, const 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; -- 2.15.2