[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251216213619.115259-1-arnd@kernel.org>
Date: Tue, 16 Dec 2025 22:36:12 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: "K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Wei Liu <wei.liu@...nel.org>,
Dexuan Cui <decui@...rosoft.com>,
Long Li <longli@...rosoft.com>,
Stansialv Kinsburskii <skinsburskii@...ux.miscrosoft.com>,
Nuno Das Neves <nunodasneves@...ux.microsoft.com>,
Praveen K Paladugu <prapal@...ux.microsoft.com>,
Easwar Hariharan <easwar.hariharan@...ux.microsoft.com>,
Anatol Belski <anbelski@...ux.microsoft.com>,
Stanislav Kinsburskii <skinsburskii@...ux.microsoft.com>
Cc: Arnd Bergmann <arnd@...db.de>,
Sean Christopherson <seanjc@...gle.com>,
Naman Jain <namjain@...ux.microsoft.com>,
linux-hyperv@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] mshv: hide x86-specific functions on arm64
From: Arnd Bergmann <arnd@...db.de>
The hv_sleep_notifiers_register() and hv_machine_power_off() functions are
only called and declared on x86, but cause a warning on arm64:
drivers/hv/mshv_common.c:210:6: error: no previous prototype for 'hv_sleep_notifiers_register' [-Werror=missing-prototypes]
210 | void hv_sleep_notifiers_register(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hv/mshv_common.c:224:6: error: no previous prototype for 'hv_machine_power_off' [-Werror=missing-prototypes]
224 | void hv_machine_power_off(void)
| ^~~~~~~~~~~~~~~~~~~~
Hide both inside of an #ifdef block.
Fixes: f0be2600ac55 ("mshv: Use reboot notifier to configure sleep state")
Fixes: 615a6e7d83f9 ("mshv: Cleanly shutdown root partition with MSHV")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
drivers/hv/mshv_common.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/hv/mshv_common.c b/drivers/hv/mshv_common.c
index 58027b23c206..63f09bb5136e 100644
--- a/drivers/hv/mshv_common.c
+++ b/drivers/hv/mshv_common.c
@@ -142,6 +142,7 @@ int hv_call_get_partition_property(u64 partition_id,
}
EXPORT_SYMBOL_GPL(hv_call_get_partition_property);
+#ifdef CONFIG_X86
/*
* Corresponding sleep states have to be initialized in order for a subsequent
* HVCALL_ENTER_SLEEP_STATE call to succeed. Currently only S5 state as per
@@ -237,3 +238,4 @@ void hv_machine_power_off(void)
BUG();
}
+#endif
--
2.39.5
Powered by blists - more mailing lists