[PATCH 10/30] clocksource/drivers/arm_arch_timer: Use kstrtobool() instead of strtobool()

Mark Rutland mark.rutland at arm.com
Wed Nov 2 03:56:46 PDT 2022


On Tue, Nov 01, 2022 at 10:13:58PM +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 at 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].
> 
> [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
> ---
>  drivers/clocksource/arm_arch_timer.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Acked-by: Mark Rutland <mark.rutland at arm.com>

Mark.

> 
> diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
> index a7ff77550e17..1af045b231fd 100644
> --- a/drivers/clocksource/arm_arch_timer.c
> +++ b/drivers/clocksource/arm_arch_timer.c
> @@ -18,6 +18,7 @@
>  #include <linux/clocksource.h>
>  #include <linux/clocksource_ids.h>
>  #include <linux/interrupt.h>
> +#include <linux/kstrtox.h>
>  #include <linux/of_irq.h>
>  #include <linux/of_address.h>
>  #include <linux/io.h>
> @@ -97,7 +98,7 @@ static bool evtstrm_enable __ro_after_init = IS_ENABLED(CONFIG_ARM_ARCH_TIMER_EV
>  
>  static int __init early_evtstrm_cfg(char *buf)
>  {
> -	return strtobool(buf, &evtstrm_enable);
> +	return kstrtobool(buf, &evtstrm_enable);
>  }
>  early_param("clocksource.arm_arch_timer.evtstrm", early_evtstrm_cfg);
>  
> -- 
> 2.34.1
> 



More information about the linux-arm-kernel mailing list