lkml.org 
[lkml]   [2022]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 10/30] clocksource/drivers/arm_arch_timer: Use kstrtobool() instead of strtobool()
    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@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@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
    >

    \
     
     \ /
      Last update: 2022-11-02 11:57    [W:2.680 / U:0.132 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site