[PATCH] firmware: arm: psci: Fix unused variable warning
Sudeep Holla
sudeep.holla at kernel.org
Thu Nov 12 10:05:24 PST 2026
Clang 23 and above complains with the below warning while building psci.c:
| drivers/firmware/arm/psci/psci.c:81:13: warning: variable
| 'psci_system_off2_hibernate_supported' set but not used [-Wunused-but-set-global]
| 81 | static bool psci_system_off2_hibernate_supported;
| | ^
| 1 warning generated.
Fix it by applying the __maybe_unused annotation to the variable declaration.
Reported-by: kernel test robot <lkp at intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202611091729.V7epDaiS-lkp@intel.com/
Signed-off-by: Sudeep Holla <sudeep.holla at kernel.org>
---
drivers/firmware/arm/psci/psci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/arm/psci/psci.c b/drivers/firmware/arm/psci/psci.c
index e73bae6cb23a..01b1ea6a1c65 100644
--- a/drivers/firmware/arm/psci/psci.c
+++ b/drivers/firmware/arm/psci/psci.c
@@ -78,7 +78,7 @@ struct psci_0_1_function_ids get_psci_0_1_function_ids(void)
static u32 psci_cpu_suspend_feature;
static bool psci_system_reset2_supported;
-static bool psci_system_off2_hibernate_supported;
+static bool __maybe_unused psci_system_off2_hibernate_supported;
static inline bool psci_has_ext_power_state(void)
{
base-commit: 49c49ca0c4d02848a9576f72c4741c38c5ba09de
--
2.43.0
More information about the linux-arm-kernel
mailing list