Skip to content

Commit 5e27973

Browse files
tititiou36Marc Zyngier
authored andcommitted
irqchip/gic: Use kstrtobool() instead of strtobool()
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> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/755c4083122071bb27aa8ed5d98156a07bb63a39.1667336095.git.christophe.jaillet@wanadoo.fr
1 parent f5259b0 commit 5e27973

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/irqchip/irq-gic-v3.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <linux/delay.h>
1313
#include <linux/interrupt.h>
1414
#include <linux/irqdomain.h>
15+
#include <linux/kstrtox.h>
1516
#include <linux/of.h>
1617
#include <linux/of_address.h>
1718
#include <linux/of_irq.h>
@@ -1171,7 +1172,7 @@ static bool gicv3_nolpi;
11711172

11721173
static int __init gicv3_nolpi_cfg(char *buf)
11731174
{
1174-
return strtobool(buf, &gicv3_nolpi);
1175+
return kstrtobool(buf, &gicv3_nolpi);
11751176
}
11761177
early_param("irqchip.gicv3_nolpi", gicv3_nolpi_cfg);
11771178

drivers/irqchip/irq-gic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*/
2020
#include <linux/init.h>
2121
#include <linux/kernel.h>
22+
#include <linux/kstrtox.h>
2223
#include <linux/err.h>
2324
#include <linux/module.h>
2425
#include <linux/list.h>
@@ -1332,7 +1333,7 @@ static bool gicv2_force_probe;
13321333

13331334
static int __init gicv2_force_probe_cfg(char *buf)
13341335
{
1335-
return strtobool(buf, &gicv2_force_probe);
1336+
return kstrtobool(buf, &gicv2_force_probe);
13361337
}
13371338
early_param("irqchip.gicv2_force_probe", gicv2_force_probe_cfg);
13381339

0 commit comments

Comments
 (0)