[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <174022538091.10177.7409220416524684215.tip-bot2@tip-bot2>
Date: Sat, 22 Feb 2025 11:56:20 -0000
From: "tip-bot2 for Uros Bizjak" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Uros Bizjak <ubizjak@...il.com>, Ingo Molnar <mingo@...nel.org>,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject:
[tip: x86/boot] x86/boot: Change some static bootflag functions to bool
The following commit has been merged into the x86/boot branch of tip:
Commit-ID: 5bebe2e4fe27bf68b4993d62be2f8bae9e6229d6
Gitweb: https://git.kernel.org/tip/5bebe2e4fe27bf68b4993d62be2f8bae9e6229d6
Author: Uros Bizjak <ubizjak@...il.com>
AuthorDate: Wed, 29 Jan 2025 16:47:50 +01:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Sat, 22 Feb 2025 12:30:59 +01:00
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@...il.com>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Link: https://lore.kernel.org/r/20250129154920.6773-1-ubizjak@gmail.com
---
arch/x86/kernel/bootflag.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/bootflag.c b/arch/x86/kernel/bootflag.c
index 3fed7ae..4d89a2d 100644
--- a/arch/x86/kernel/bootflag.c
+++ b/arch/x86/kernel/bootflag.c
@@ -20,7 +20,7 @@
int sbf_port __initdata = -1; /* set via acpi_boot_init() */
-static int __init parity(u8 v)
+static bool __init parity(u8 v)
{
int x = 0;
int i;
@@ -30,7 +30,7 @@ static int __init parity(u8 v)
v >>= 1;
}
- return x;
+ return !!x;
}
static void __init sbf_write(u8 v)
@@ -66,14 +66,14 @@ static u8 __init sbf_read(void)
return v;
}
-static int __init sbf_value_valid(u8 v)
+static bool __init sbf_value_valid(u8 v)
{
if (v & SBF_RESERVED) /* Reserved bits */
- return 0;
+ return false;
if (!parity(v))
- return 0;
+ return false;
- return 1;
+ return true;
}
static int __init sbf_init(void)
Powered by blists - more mailing lists