Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: arm64: vgic-v3: 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>
Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Link: https://lore.kernel.org/r/f546e636c6d2bbcc0d8c4191ab98ce892fce4584.1673702763.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>

authored by

Christophe JAILLET and committed by
Oliver Upton
016cbbd2 fd2b165c

+5 -4
+5 -4
arch/arm64/kvm/vgic/vgic-v3.c
··· 3 3 #include <linux/irqchip/arm-gic-v3.h> 4 4 #include <linux/irq.h> 5 5 #include <linux/irqdomain.h> 6 + #include <linux/kstrtox.h> 6 7 #include <linux/kvm.h> 7 8 #include <linux/kvm_host.h> 8 9 #include <kvm/arm_vgic.h> ··· 588 587 589 588 static int __init early_group0_trap_cfg(char *buf) 590 589 { 591 - return strtobool(buf, &group0_trap); 590 + return kstrtobool(buf, &group0_trap); 592 591 } 593 592 early_param("kvm-arm.vgic_v3_group0_trap", early_group0_trap_cfg); 594 593 595 594 static int __init early_group1_trap_cfg(char *buf) 596 595 { 597 - return strtobool(buf, &group1_trap); 596 + return kstrtobool(buf, &group1_trap); 598 597 } 599 598 early_param("kvm-arm.vgic_v3_group1_trap", early_group1_trap_cfg); 600 599 601 600 static int __init early_common_trap_cfg(char *buf) 602 601 { 603 - return strtobool(buf, &common_trap); 602 + return kstrtobool(buf, &common_trap); 604 603 } 605 604 early_param("kvm-arm.vgic_v3_common_trap", early_common_trap_cfg); 606 605 607 606 static int __init early_gicv4_enable(char *buf) 608 607 { 609 - return strtobool(buf, &gicv4_enable); 608 + return kstrtobool(buf, &gicv4_enable); 610 609 } 611 610 early_param("kvm-arm.vgic_v4_enable", early_gicv4_enable); 612 611