From patchwork Tue Nov 1 21:14:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 13892 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3215556wru; Tue, 1 Nov 2022 14:21:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7TgJSWR2h3fuNXORW8Uox+jCdW2neU3N8C7XlgdfC3r/anVb+iIsUJMsXdta1TMdC7XCfA X-Received: by 2002:a17:903:2410:b0:17a:b32:dbec with SMTP id e16-20020a170903241000b0017a0b32dbecmr21155572plo.163.1667337712267; Tue, 01 Nov 2022 14:21:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667337712; cv=none; d=google.com; s=arc-20160816; b=PQtGMBLeWsi/HihCFtOzf8HFgo9ohnopMny9ccb+9WH9DXuoT0NOBASQvXrBaspqe/ QuC4okFvbgXdBhLzvtCIZr/HAKtRFAbPoScjYGoWv0nvRVXX6d1DtVnMIOoMqXwz0upr t3J1pYx+ejfKinTyYOziedU7+m59wNSsbQY3c9Pc0W4ASb0dIq8Mc7L8FyFYBnC+/6s0 QquZSU/CppkqNylh8I8He8/ib5eidqSiWUHXsey3rZHN4FkzBP1RoYk760W7oQLRfN9H AAMm7Ecol0NDMzOefQt82bStlcHpmFxPd7gkyNzm/Ye43mGJnWKKD8fM1tkLPQlI8PNQ yfTA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ZQaj2RgRHC1lqxeauxzh/bcoZcMyY0SXUI1Tex6CjN0=; b=K4nsD8l2t/C2TFhJ3TrtEOOHFYByabAi5EfEQCbqdPjAe65XZSFfDECYd8MXZLCG5M zyTTffMt1X/CRewqYMvuhuIrnyIcr/ICl4gMpI4kPb+xHat4aqhTipKcl4foo5BvCZjq vdQMx7TjO2fZSNcAZ4fDwsyWl8zrMhYQh24sQ968vPZ+8ghc+Cp/FY/E53WNfWR+/Hkw ywyv8gZ+9aLqhAFOUSPv2q1bPTBRjpPkoaXCgr9HGU611qKjUssOlW6NmKWraJ/pzT96 EfU/hA8s4Ku66q2DB7IvhaKlKi+Q4opc+OMPHC/Ueirlu9mOkmZ8Z0KMPxGXh+/d6bCj 0l5g== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q2-20020a056a00084200b0056ddd2aca1asi2916562pfk.306.2022.11.01.14.21.38; Tue, 01 Nov 2022 14:21:52 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230375AbiKAVRC (ORCPT + 99 others); Tue, 1 Nov 2022 17:17:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230329AbiKAVQH (ORCPT ); Tue, 1 Nov 2022 17:16:07 -0400 Received: from smtp.smtpout.orange.fr (smtp-15.smtpout.orange.fr [80.12.242.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D298D1EC73 for ; Tue, 1 Nov 2022 14:15:31 -0700 (PDT) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id pyanoKD2rsfCIpybZoWfLb; Tue, 01 Nov 2022 22:15:30 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 01 Nov 2022 22:15:30 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-s390@vger.kernel.org Subject: [PATCH 26/30] s390/ipl: Use kstrtobool() instead of strtobool() Date: Tue, 1 Nov 2022 22:14:14 +0100 Message-Id: <7766dac5969021bf7432e8c4f038db8afc996b8a.1667336095.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748330309221890338?= X-GMAIL-MSGID: =?utf-8?q?1748330309221890338?= strtobool() is the same as kstrtobool(). However, the latter is more used within the kernel. In order to remove strtobool() and slightly simplify kstrtox.h, switch to the other function name. While at it, include the corresponding header file () Signed-off-by: Christophe JAILLET --- This patch is part of a serie that axes all usages of strtobool(). Each patch can be applied independently from the other ones. The last patch of the serie removes the definition of strtobool(). You may not be in copy of the cover letter. So, if needed, it is available at [1]. This patch has NOT been compile tested. [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/ --- arch/s390/kernel/ipl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index 325cbf69ebbd..cdd575d7a91a 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -779,7 +780,7 @@ static ssize_t reipl_fcp_clear_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t len) { - if (strtobool(buf, &reipl_fcp_clear) < 0) + if (kstrtobool(buf, &reipl_fcp_clear) < 0) return -EINVAL; return len; } @@ -899,7 +900,7 @@ static ssize_t reipl_nvme_clear_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t len) { - if (strtobool(buf, &reipl_nvme_clear) < 0) + if (kstrtobool(buf, &reipl_nvme_clear) < 0) return -EINVAL; return len; } @@ -952,7 +953,7 @@ static ssize_t reipl_ccw_clear_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t len) { - if (strtobool(buf, &reipl_ccw_clear) < 0) + if (kstrtobool(buf, &reipl_ccw_clear) < 0) return -EINVAL; return len; }