Skip to content

Commit 5bebe2e

Browse files
ubizjakIngo Molnar
authored andcommitted
x86/boot: Change some static bootflag functions to bool
The return values of some functions are of boolean type. Change the type of these function to bool and adjust their return values. No functional change intended. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20250129154920.6773-1-ubizjak@gmail.com
1 parent efe659a commit 5bebe2e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

arch/x86/kernel/bootflag.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
int sbf_port __initdata = -1; /* set via acpi_boot_init() */
2222

23-
static int __init parity(u8 v)
23+
static bool __init parity(u8 v)
2424
{
2525
int x = 0;
2626
int i;
@@ -30,7 +30,7 @@ static int __init parity(u8 v)
3030
v >>= 1;
3131
}
3232

33-
return x;
33+
return !!x;
3434
}
3535

3636
static void __init sbf_write(u8 v)
@@ -66,14 +66,14 @@ static u8 __init sbf_read(void)
6666
return v;
6767
}
6868

69-
static int __init sbf_value_valid(u8 v)
69+
static bool __init sbf_value_valid(u8 v)
7070
{
7171
if (v & SBF_RESERVED) /* Reserved bits */
72-
return 0;
72+
return false;
7373
if (!parity(v))
74-
return 0;
74+
return false;
7575

76-
return 1;
76+
return true;
7777
}
7878

7979
static int __init sbf_init(void)

0 commit comments

Comments
 (0)