Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3005861rwi; Tue, 1 Nov 2022 14:43:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4XSZWdPFC91b9ri3QiWb7N2ykossPogSPmnJINyx00tNW5nM6nOCAoiLdbj+QQm51eB7cB X-Received: by 2002:aa7:d694:0:b0:461:7638:bde5 with SMTP id d20-20020aa7d694000000b004617638bde5mr21546465edr.105.1667338994783; Tue, 01 Nov 2022 14:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667338994; cv=none; d=google.com; s=arc-20160816; b=fQnvVMeHZx0D2EqssMAWtk2YH9DSefbjM9P/yzanwGfUTWDLp3hgnR8WFiA261tIEq lir/4s4q7cXg+X2x4hqNIfi8FrM5b79k7ABS+TKJJGh0HDb8JqfPDJaUjwcJxm8b4IxM ShobqLk4rlkOVlgJqkFxhguYJxpoFKO9bbcRdWRuXr4HZ6kyGPSFQJF5a2VlQPmcSODG KfvtIK8hwo4tzjRN/Xol3hTEi66swOnFkpzeZbZ47rvHbHoIfr4viJuRQQZTel1ealPp Zbg/xTHTmtZ5rVf+uKoIfJP4PpW6faDog8XTRvPiEvJx8wbtYdEENh8a8t8mwtNOUOaA qqOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from; bh=YXBWujBHKDN2a3cmzFha6YXgWo91H1fCBGNvRq+HBek=; b=irDTeqMTj6HRn0pzYV9DCjcn36ZydXdf6h00NtnDbP9y96ULyptTE7O6clj3KfOieR 3ZY29bAa0lNBjSxqAWgRYCBTTEldt9LZgNX/NjJVVZQ4JPzJJT2YzpEeEOII617MLSzl wk358BZVo+Tw1EyIQoAtVmEYLRZFmtIOjZuckN/CqLYKOHzL9tzPN44rGaEhAKNzlB0q DlCnmd5OIBVCZpIKh01VybsrVpNRgp2Vr1U/M7IsVCncVwEAMk8Kddc7Rp4OrE6W0Tbv BCkkJmhIQ33nL9VkeJ1j+DBPs1a7ke6g7fCuHo89X40H/UyKS9qKsGSkMU35XdZPioEh Lqjw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gn3-20020a1709070d0300b0078debc9d30esi14808894ejc.29.2022.11.01.14.42.51; Tue, 01 Nov 2022 14:43:14 -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 S230488AbiKAVQO (ORCPT + 96 others); Tue, 1 Nov 2022 17:16:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230258AbiKAVPf (ORCPT ); Tue, 1 Nov 2022 17:15:35 -0400 Received: from smtp.smtpout.orange.fr (smtp-15.smtpout.orange.fr [80.12.242.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F27EF1F2EF for ; Tue, 1 Nov 2022 14:15:22 -0700 (PDT) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id pyanoKD2rsfCIpybRoWfKB; Tue, 01 Nov 2022 22:15:21 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 01 Nov 2022 22:15:21 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 17/30] initramfs: Use kstrtobool() instead of strtobool() Date: Tue, 1 Nov 2022 22:14:05 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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]. [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/ --- init/initramfs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/init/initramfs.c b/init/initramfs.c index 62321883fe61..174e15236c8e 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -571,7 +572,12 @@ __setup("keepinitrd", keepinitrd_setup); static bool __initdata initramfs_async = true; static int __init initramfs_async_setup(char *str) { - strtobool(str, &initramfs_async); + int ret; + + ret = kstrtobool(str, &initramfs_async); + if (ret) + return 0; + return 1; } __setup("initramfs_async=", initramfs_async_setup); -- 2.34.1