diff options
| author | Bin Meng <bmeng@tinylab.org> | 2022-12-21 19:38:06 +0800 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2023-01-06 17:26:35 +0530 |
| commit | 440fa818fbffd0771d75890c4fcda062ceab7ebd (patch) | |
| tree | ddc51462269d7532149eab1bd60000158c37a535 /lib/utils | |
| parent | 6b5188ca14e59ce7bf71afe4e7d3d557c3d31bf8 (diff) | |
| download | opensbi-440fa818fbffd0771d75890c4fcda062ceab7ebd.zip opensbi-440fa818fbffd0771d75890c4fcda062ceab7ebd.tar.gz opensbi-440fa818fbffd0771d75890c4fcda062ceab7ebd.tar.bz2 | |
treewide: Replace TRUE/FALSE with true/false
C language standard uses true/false for the boolean type.
Let's switch to that for better language compatibility.
Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Tested-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'lib/utils')
| -rw-r--r-- | lib/utils/fdt/fdt_domain.c | 4 | ||||
| -rw-r--r-- | lib/utils/reset/fdt_reset_gpio.c | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/utils/fdt/fdt_domain.c b/lib/utils/fdt/fdt_domain.c index 0568603..35462a2 100644 --- a/lib/utils/fdt/fdt_domain.c +++ b/lib/utils/fdt/fdt_domain.c @@ -401,9 +401,9 @@ static int __fdt_parse_domain(void *fdt, int domain_offset, void *opaque) /* Read "system-reset-allowed" DT property */ if (fdt_get_property(fdt, domain_offset, "system-reset-allowed", NULL)) - dom->system_reset_allowed = TRUE; + dom->system_reset_allowed = true; else - dom->system_reset_allowed = FALSE; + dom->system_reset_allowed = false; /* Find /cpus DT node */ cpus_offset = fdt_path_offset(fdt, "/cpus"); diff --git a/lib/utils/reset/fdt_reset_gpio.c b/lib/utils/reset/fdt_reset_gpio.c index bd2c622..6a908dd 100644 --- a/lib/utils/reset/fdt_reset_gpio.c +++ b/lib/utils/reset/fdt_reset_gpio.c @@ -77,7 +77,7 @@ static void gpio_reset_exec(struct gpio_reset *reset) static int gpio_system_poweroff_check(u32 type, u32 reason) { - if (gpio_reset_get(FALSE, type)) + if (gpio_reset_get(false, type)) return 128; return 0; @@ -85,7 +85,7 @@ static int gpio_system_poweroff_check(u32 type, u32 reason) static void gpio_system_poweroff(u32 type, u32 reason) { - gpio_reset_exec(gpio_reset_get(FALSE, type)); + gpio_reset_exec(gpio_reset_get(false, type)); } static struct sbi_system_reset_device gpio_poweroff = { @@ -96,7 +96,7 @@ static struct sbi_system_reset_device gpio_poweroff = { static int gpio_system_restart_check(u32 type, u32 reason) { - if (gpio_reset_get(TRUE, type)) + if (gpio_reset_get(true, type)) return 128; return 0; @@ -104,7 +104,7 @@ static int gpio_system_restart_check(u32 type, u32 reason) static void gpio_system_restart(u32 type, u32 reason) { - gpio_reset_exec(gpio_reset_get(TRUE, type)); + gpio_reset_exec(gpio_reset_get(true, type)); } static struct sbi_system_reset_device gpio_restart = { @@ -149,7 +149,7 @@ static int gpio_reset_init(void *fdt, int nodeoff, } static const struct fdt_match gpio_poweroff_match[] = { - { .compatible = "gpio-poweroff", .data = (const void *)FALSE }, + { .compatible = "gpio-poweroff", .data = (const void *)false }, { }, }; @@ -159,7 +159,7 @@ struct fdt_reset fdt_poweroff_gpio = { }; static const struct fdt_match gpio_reset_match[] = { - { .compatible = "gpio-restart", .data = (const void *)TRUE }, + { .compatible = "gpio-restart", .data = (const void *)true }, { }, }; |
