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

Nathan Chancellor posted 1 patch 3 weeks, 3 days ago
drivers/platform/x86/lenovo/wmi-gamezone.c | 2 --
1 file changed, 2 deletions(-)
[PATCH] platform/x86: lenovo: wmi-gamezone: Drop gz_chain_head
Posted by Nathan Chancellor 3 weeks, 3 days ago
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@kernel.org>
---
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@kernel.org>
Re: [PATCH] platform/x86: lenovo: wmi-gamezone: Drop gz_chain_head
Posted by Ilpo Järvinen 2 weeks, 6 days ago
On Fri, 13 Mar 2026 14:06:34 -0700, Nathan Chancellor wrote:

> 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 =                    \
>         |                                       ^~~~
> 
> [...]


Thank you for your contribution, it has been applied to my local
review-ilpo-fixes branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86: lenovo: wmi-gamezone: Drop gz_chain_head
      commit: 6b99cc51e13e816962318e2f97e6ac58dc431c33

--
 i.