Message ID | 23d2ea6b90579207e87cc1bf64fc4eed1ed9f173.1689885328.git.christophe.jaillet@wanadoo.fr |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp3377314vqt; Thu, 20 Jul 2023 14:01:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlERhtU9sAXdS9j+MaosDpR1GvIJuO6xjhct6kzPI8I5f93DAQUoc7aoY/WOWQMZ5w2xSLNe X-Received: by 2002:a17:906:7151:b0:970:c9f:2db6 with SMTP id z17-20020a170906715100b009700c9f2db6mr3132828ejj.63.1689886915440; Thu, 20 Jul 2023 14:01:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689886915; cv=none; d=google.com; s=arc-20160816; b=ur5l3vBX303nL7Ktf7GDqb1KNRTLapN7n5prqExH/vLPrEUGrEz/7q9E+JJt7w7N0V 1cdEOm+Y/yP+z8kplxRhi7Rgc2fkki5QzNS40k3TFkxVv81/r9KaaQv2csppKi3OrGVL 7CvswymAWV7PUiDD/2kzmnDtEqJ/g5wRjc4kfxa1knd+pdXsAgtLasp60daDeXNCR/xm 4581+dK4Bk0xD5//loXns4mQ25+yo1qD2BFylTetPivbdBZI8oMxvB4GhaZNTvDdQOgS LfOwlVdnQir/aGKbJ/k78PweiHIyylOCH5FWE6miiGu7nhc+QgVjn2SsKdqdsiwuo3NH qcsA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=0vihLSEijVc+4khiUaSyZhVfqYpVvrUyJvrv1+YFnyY=; fh=SW7GeU/xZ1v2ySMBnPwHIWDk+1TtUpDEphocJymoyZE=; b=P6f8NgqyjuYh78qk2QbMMNHxJMAaIB0RCWszKRhB1WSbr67rYBVc7djjHT0JrxlpFV GS1ig4RwRGLcvMyncbIXLnPSGKHVAM2Q4pMjCbaUvwM2/wwyP+Fk9lviy16ANWNfd8Q0 VFm3NnevABMBCKZ99GI9OiXjGUA/04llV+bE3ym4+zzJMQ1aytS3kU8KuYP5cUfCNuWT 1eisgxcLHgSOhzePTd6eppNcexmcvdsaQdtHMLcnCE1yiElP51/ETWsqB+KxQcmjCG3N OLHnTMeGhVyX6eD36You1Md8kntG35x9tK8DXkoXycZsiozS95MCTfW1akZdeFf53h1X 533Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b="L1/KE4RS"; 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 gr4-20020a170906e2c400b0098dcadb4002si1129737ejb.492.2023.07.20.14.01.29; Thu, 20 Jul 2023 14:01:55 -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; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b="L1/KE4RS"; 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 S229785AbjGTUkr (ORCPT <rfc822;assdfgzxcv4@gmail.com> + 99 others); Thu, 20 Jul 2023 16:40:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229560AbjGTUkp (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 20 Jul 2023 16:40:45 -0400 Received: from smtp.smtpout.orange.fr (smtp-15.smtpout.orange.fr [80.12.242.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0256B12F for <linux-kernel@vger.kernel.org>; Thu, 20 Jul 2023 13:40:43 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id MaRzqTfmGqvVSMaRzqt4eq; Thu, 20 Jul 2023 22:40:42 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1689885642; bh=0vihLSEijVc+4khiUaSyZhVfqYpVvrUyJvrv1+YFnyY=; h=From:To:Cc:Subject:Date; b=L1/KE4RS5R8t3saKi+2XLx1KQl9yxkPb6en+J7cXCGOTkVOxjiCkiOlcFJM1DbMV2 Ud5Qyelj/+7XlrTzrUjyGE347aTDMyrCMN1jFi7yv3f46w0/MRM/OUe9zn9i9NwjGW E4PLCelbFpqwmtW38aT9znYVWK6WzvOJsyP9bhU5BBYQwPau6esWa3QQpTZPpLFTHF KKSKePVgxksUhw9XUltrInlib1WwyoAgYYMkTVZr9b2U6Hlo9sgR2GdXs7CHK7eHG/ gIYP3ooy9KSzWiONuSSHZW+jjRZEgAsUB6PuOGXVy0TFGwHGyMyAF+9rpFwDNCh6nE 3AnOicf7q2voQ== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 20 Jul 2023 22:40:42 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET <christophe.jaillet@wanadoo.fr> To: akpm@linux-foundation.org, andriy.shevchenko@linux.intel.com Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET <christophe.jaillet@wanadoo.fr> Subject: [PATCH] kstrtox: Remove strtobool() Date: Thu, 20 Jul 2023 22:40:35 +0200 Message-Id: <23d2ea6b90579207e87cc1bf64fc4eed1ed9f173.1689885328.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: INBOX X-GMAIL-THRID: 1771974862221589291 X-GMAIL-MSGID: 1771974862221589291 |
Series |
kstrtox: Remove strtobool()
|
|
Commit Message
Christophe JAILLET
July 20, 2023, 8:40 p.m. UTC
The conversion from strtobool() to kstrtobool() is completed.
So strtobool() can now be removed.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Unless I missed something, the last strtobool() calls have been removed
from -next just 1 or 2 days ago.
So it is maybe good to wait a few days or weeks to apply this patch in
order not to break something somewhere.
For now, see if build-bots agree with me :)
get_maintainer.pl is of now help here, so adding just Andrew Morton, and
Andy Shevchenko (who splitted out this file from kernel.h)
---
include/linux/kstrtox.h | 5 -----
1 file changed, 5 deletions(-)
Comments
On Thu, Jul 20, 2023 at 10:40:35PM +0200, Christophe JAILLET wrote: > The conversion from strtobool() to kstrtobool() is completed. > So strtobool() can now be removed. > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> > --- > Unless I missed something, the last strtobool() calls have been removed > from -next just 1 or 2 days ago. > > So it is maybe good to wait a few days or weeks to apply this patch in > order not to break something somewhere. > > For now, see if build-bots agree with me :) > get_maintainer.pl is of now help here, so adding just Andrew Morton, and > Andy Shevchenko (who splitted out this file from kernel.h) Kees Cook from recent times. As this is about Linux Next, you need to talk to Torvalds to apply this before v6.6-rc1. Code wise it's good, feel free to add: Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
On Thu, 20 Jul 2023 22:40:35 +0200 Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote: > The conversion from strtobool() to kstrtobool() is completed. > So strtobool() can now be removed. I still have some strtobool()s in mm.git, so I can't apply this. Probably nobody can apply this to their tree at this stage. A resend after 6.6-rc1 would be the simplest approach.
Le 24/07/2023 à 20:05, Andrew Morton a écrit : > On Thu, 20 Jul 2023 22:40:35 +0200 Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote: > >> The conversion from strtobool() to kstrtobool() is completed. >> So strtobool() can now be removed. > > I still have some strtobool()s in mm.git, so I can't apply this. > > Probably nobody can apply this to their tree at this stage. A resend > after 6.6-rc1 would be the simplest approach. > > Let's do it then. Note that in -next there is still some strtobool but only in tools/. I thinks it is ok to leave it as-is. git grep -w strtobool tools/include/linux/string.h:int strtobool(const char *s, bool *res); tools/lib/string.c: * More specifically, the first copied function was strtobool, which tools/lib/string.c: * d0f1fed29e6e ("Add a strtobool function matching semantics of existing in kernel equivalents") tools/lib/string.c: * strtobool - convert common user inputs into boolean values tools/lib/string.c:int strtobool(const char *s, bool *res) tools/perf/util/bpf-loader.c: err = strtobool(value, &bool_value); CJ
diff --git a/include/linux/kstrtox.h b/include/linux/kstrtox.h index 529974e22ea7..7fcf29a4e0de 100644 --- a/include/linux/kstrtox.h +++ b/include/linux/kstrtox.h @@ -147,9 +147,4 @@ extern long simple_strtol(const char *,char **,unsigned int); extern unsigned long long simple_strtoull(const char *,char **,unsigned int); extern long long simple_strtoll(const char *,char **,unsigned int); -static inline int strtobool(const char *s, bool *res) -{ - return kstrtobool(s, res); -} - #endif /* _LINUX_KSTRTOX_H */