diff mbox series

[24/30] arm64: cpufeature: Use kstrtobool() instead of strtobool()

Message ID 5a1b329cda34aec67615c0d2fd326eb0d6634bf7.1667336095.git.christophe.jaillet@wanadoo.fr (mailing list archive)
State New, archived
Headers show
Series None | expand

Commit Message

Christophe JAILLET Nov. 1, 2022, 9:14 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/
---
 arch/arm64/kernel/cpufeature.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Catalin Marinas Nov. 2, 2022, 1:46 p.m. UTC | #1
On Tue, Nov 01, 2022 at 10:14:12PM +0100, Christophe JAILLET 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>

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Christophe JAILLET Jan. 14, 2023, 1:29 p.m. UTC | #2
Le 02/11/2022 à 14:46, Catalin Marinas a écrit :
> On Tue, Nov 01, 2022 at 10:14:12PM +0100, Christophe JAILLET 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>
> 
> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
> 

Hi,

This has been A-b 2 months ago, and I've just resent patches in this 
serie that have neither been merged in -next, nor A-b or R-b.

So for this one, it is just a polite reminder. :)

Do you have visibility on when it should be merged?

CJ
Catalin Marinas Jan. 16, 2023, 6:40 p.m. UTC | #3
On Sat, Jan 14, 2023 at 02:29:46PM +0100, Christophe JAILLET wrote:
> Le 02/11/2022 à 14:46, Catalin Marinas a écrit :
> > On Tue, Nov 01, 2022 at 10:14:12PM +0100, Christophe JAILLET 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>
> > 
> > Acked-by: Catalin Marinas <catalin.marinas@arm.com>
> 
> This has been A-b 2 months ago, and I've just resent patches in this serie
> that have neither been merged in -next, nor A-b or R-b.
> 
> So for this one, it is just a polite reminder. :)
> 
> Do you have visibility on when it should be merged?

When large tree-wide series turn up on the list, there's always a
confusion on how they'd get merged. I guess you are expecting such
patches to go in via individual maintainer trees. It wasn't obvious from
to me (I can now see there was some text in the patch description).

I'll add it to my list for 6.3.
diff mbox series

Patch

diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index 6062454a9067..271a142b96fa 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -65,6 +65,7 @@ 
 #include <linux/bsearch.h>
 #include <linux/cpumask.h>
 #include <linux/crash_dump.h>
+#include <linux/kstrtox.h>
 #include <linux/sort.h>
 #include <linux/stop_machine.h>
 #include <linux/sysfs.h>
@@ -1769,7 +1770,7 @@  kpti_install_ng_mappings(const struct arm64_cpu_capabilities *__unused)
 static int __init parse_kpti(char *str)
 {
 	bool enabled;
-	int ret = strtobool(str, &enabled);
+	int ret = kstrtobool(str, &enabled);
 
 	if (ret)
 		return ret;
@@ -2013,7 +2014,7 @@  static bool enable_pseudo_nmi;
 
 static int __init early_enable_pseudo_nmi(char *p)
 {
-	return strtobool(p, &enable_pseudo_nmi);
+	return kstrtobool(p, &enable_pseudo_nmi);
 }
 early_param("irqchip.gicv3_pseudo_nmi", early_enable_pseudo_nmi);