Message ID | 755c4083122071bb27aa8ed5d98156a07bb63a39.1667336095.git.christophe.jaillet@wanadoo.fr |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3213287wru; Tue, 1 Nov 2022 14:17:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5WVB8sg5tfGtAoCydEFxhzP36aeADWifwddGnKegDu+xqqBTN9Mgy7BMue8xRHVzG0NonE X-Received: by 2002:a63:1404:0:b0:46f:eb26:35e0 with SMTP id u4-20020a631404000000b0046feb2635e0mr5208012pgl.158.1667337465508; Tue, 01 Nov 2022 14:17:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667337465; cv=none; d=google.com; s=arc-20160816; b=fxUpsksef+TJq2sV+o3KrdMZ0rDCo2yD1jOmGfeKIbLN4k8b4MKKf8QW/bx4RzzVRY 7UJdm0qP4mObqPK4cHeRfPYpxAeWYRrZQiBXV7CMzj6nVPosPeDB/9s8b5dfcOiMmwgg G54zunl9rled51wqQ51JaNiOflLXLqq1qbU+AxCj+SUpQx/78Dk3we8K9xmt+ahFFHzz z1YQKtyj+u5bfoQa/fjQfaBz8vjoTIPtVbNsubbAb2CpZrvg9PvQTel9yH/Qd5+SbNat o5zwa3/vAXqBH895x+2PGvnJzwfz+EizeNy4PQbpJu98hxQUTd91yhT7pRuyG7RvMGjg Ckcg== 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=X0zCG4ChcnE+xjQXbuGCj6hSAGf7KPoitvusgKcaNVQ=; b=L/ZK2PVtSf2cCtXfiEiaX2cVgZ3OuPnGSVWrJfFu8hDJSzQ63S4Jj8wVTE2P6n1pvT 0twjZCzrWhZgGcbXI4jfj6F1UAscjwM4wv8Ce/9+wS5B7U2lJnzM9TY9dKq6wPtzPNkU DjPwkBiJMn24S8xs6p676+PgkTKXUvmLnC5GKJ0ovHMG7BccmhU3hkBoTfYwC0ddhchj qnQp7mkqegtDbQsldky+2E8PzjXGK37DNdYqBIooBVLDlYbtd7HzRItDQefev8mrLWPn TgsA08pQj+kWipTZchR3C2W1HoemEbt2RdzqD8kmxBcDRhlYdD/iUpI0k/6VxH13MSeT fo+w== 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 187-20020a6301c4000000b0046f9f4985cfsi11999444pgb.513.2022.11.01.14.17.32; Tue, 01 Nov 2022 14:17:45 -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 S230115AbiKAVPH (ORCPT <rfc822;kartikey406@gmail.com> + 99 others); Tue, 1 Nov 2022 17:15:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230078AbiKAVO5 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 1 Nov 2022 17:14:57 -0400 Received: from smtp.smtpout.orange.fr (smtp-16.smtpout.orange.fr [80.12.242.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7823A1DF24 for <linux-kernel@vger.kernel.org>; Tue, 1 Nov 2022 14:14:55 -0700 (PDT) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id pyanoKD2rsfCIpyazoWfH6; Tue, 01 Nov 2022 22:14:54 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 01 Nov 2022 22:14:54 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET <christophe.jaillet@wanadoo.fr> To: Thomas Gleixner <tglx@linutronix.de>, Marc Zyngier <maz@kernel.org> Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET <christophe.jaillet@wanadoo.fr> Subject: [PATCH 03/30] irqchip: Use kstrtobool() instead of strtobool() Date: Tue, 1 Nov 2022 22:13:51 +0100 Message-Id: <755c4083122071bb27aa8ed5d98156a07bb63a39.1667336095.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 In-Reply-To: <cover.1667336095.git.christophe.jaillet@wanadoo.fr> References: <cover.1667336095.git.christophe.jaillet@wanadoo.fr> 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 Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748330050502786208?= X-GMAIL-MSGID: =?utf-8?q?1748330050502786208?= |
Series |
Remove strtobool()
|
|
Commit Message
Christophe JAILLET
Nov. 1, 2022, 9:13 p.m. UTC
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 (<linux/kstrtox.h>)
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
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/
---
drivers/irqchip/irq-gic-v3.c | 3 ++-
drivers/irqchip/irq-gic.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
Comments
On Tue, 01 Nov 2022 21:13:51 +0000, Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote: > > 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 (<linux/kstrtox.h>) > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> > --- > 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. Thanks for having the honesty to state that this hasn't been even compile tested. However, and for fairly obvious reason, I will not take such patches. Thanks, M.
Le 26/11/2022 à 13:46, Marc Zyngier a écrit : > On Tue, 01 Nov 2022 21:13:51 +0000, > Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote: >> >> 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 (<linux/kstrtox.h>) >> >> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> >> --- >> 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. > > Thanks for having the honesty to state that this hasn't been even > compile tested. However, and for fairly obvious reason, I will not > take such patches. Ok, so, with a sucessful: sudo apt install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev build-essential bison flex libssl-dev bc sudo apt install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -j7 allmodconfig patch -p1 < strtobool.diff make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -j7 ./drivers/irqchip/irq-gic.o make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -j7 ./drivers/irqchip/irq-gic-v3.o can I make you change your mind? CJ > > Thanks, > > M. >
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 34d58567b78d..997104d4338e 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -12,6 +12,7 @@ #include <linux/delay.h> #include <linux/interrupt.h> #include <linux/irqdomain.h> +#include <linux/kstrtox.h> #include <linux/of.h> #include <linux/of_address.h> #include <linux/of_irq.h> @@ -1171,7 +1172,7 @@ static bool gicv3_nolpi; static int __init gicv3_nolpi_cfg(char *buf) { - return strtobool(buf, &gicv3_nolpi); + return kstrtobool(buf, &gicv3_nolpi); } early_param("irqchip.gicv3_nolpi", gicv3_nolpi_cfg); diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 4c7bae0ec8f9..799f86d84b43 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -19,6 +19,7 @@ */ #include <linux/init.h> #include <linux/kernel.h> +#include <linux/kstrtox.h> #include <linux/err.h> #include <linux/module.h> #include <linux/list.h> @@ -1332,7 +1333,7 @@ static bool gicv2_force_probe; static int __init gicv2_force_probe_cfg(char *buf) { - return strtobool(buf, &gicv2_force_probe); + return kstrtobool(buf, &gicv2_force_probe); } early_param("irqchip.gicv2_force_probe", gicv2_force_probe_cfg);