firmware: arm: psci: Fix unused variable warning
PATCH 1/1 firmware: arm: psci: Fix unused variable warning
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 <[email protected]>
Signed-off-by Sudeep Holla <[email protected]>
--- drivers/firmware/arm/psci/psci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/arm/psci/psci.c +1 -1
@@ -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
Signature · 1 line
2.43.0
Sudeep Holla
AppliedQuoted 9 lines · Sudeep Holla
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.[...]
Applied to sudeep.holla/linux (for-linux-next), thanks!
[1/1] firmware: arm: psci: Fix unused variable warning
https://git.kernel.org/sudeep.holla/c/9cc33d1ca1dc
Signature · 2 lines
Regards, Sudeep