[PATCH] platform/x86: lenovo: wmi-gamezone: Drop gz_chain_head

From: Nathan Chancellor

Date: Fri Mar 13 2026 - 17:06:52 EST


After commit 1ea4b473504b ("locking/rwsem: Remove the list_head from
struct rw_semaphore"), which removed a reference to the variable passed
to __RWSEM_INITIALIZER(), certain configurations show an unused variable
warning from the Lenovo wmi-gamezone driver:

drivers/platform/x86/lenovo/wmi-gamezone.c:34:31: warning: 'gz_chain_head' defined but not used [-Wunused-variable]
34 | static BLOCKING_NOTIFIER_HEAD(gz_chain_head);
| ^~~~~~~~~~~~~
include/linux/notifier.h:119:39: note: in definition of macro 'BLOCKING_NOTIFIER_HEAD'
119 | struct blocking_notifier_head name = \
| ^~~~

This variable has been unused since the driver's initial addition to the
tree. Its use was eliminated between v3 and v4 during development but
due to the reference of gz_chain_head's wait_list member, the compiler
could not warn that it was unused.

Remove the variable to clear up the warning.

Fixes: 22024ac5366f ("platform/x86: Add Lenovo Gamezone WMI Driver")
Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx>
---
Peter, as 1ea4b473504b is in -tip, this should go there as well. Even
though this only shows up after 1ea4b473504b, I think it is more fair to
say this fixes 22024ac5366f.
---
drivers/platform/x86/lenovo/wmi-gamezone.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/platform/x86/lenovo/wmi-gamezone.c b/drivers/platform/x86/lenovo/wmi-gamezone.c
index 381836d29a96..c7fe7e3c9f17 100644
--- a/drivers/platform/x86/lenovo/wmi-gamezone.c
+++ b/drivers/platform/x86/lenovo/wmi-gamezone.c
@@ -31,8 +31,6 @@
#define LWMI_GZ_METHOD_ID_SMARTFAN_SET 44
#define LWMI_GZ_METHOD_ID_SMARTFAN_GET 45

-static BLOCKING_NOTIFIER_HEAD(gz_chain_head);
-
struct lwmi_gz_priv {
enum thermal_mode current_mode;
struct notifier_block event_nb;

---
base-commit: 739690915ce1f017223ef4e6f3cc966ccfa3c861
change-id: 20260313-lenovo-wmi-gamezone-remove-gz_chain_head-71d48410ad10

Best regards,
--
Nathan Chancellor <nathan@xxxxxxxxxx>