mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/wmi: delete unused wmi_data_lock mutex causing gcc warning
@ 2015-03-23 18:01 Paul Gortmaker
  2015-03-25 17:26 ` Darren Hart
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Gortmaker @ 2015-03-23 18:01 UTC (permalink / raw)
  To: Darren Hart; +Cc: platform-driver-x86, linux-kernel, Paul Gortmaker

In commit bff431e49ff531a343fbb2b4426e313000844f32 ("ACPI: WMI: Add
ACPI-WMI mapping driver") this mutex was added, but the rest of the
final commit never actually made use of it, resulting in:

 In file included from include/linux/mutex.h:29:0,
                  from include/linux/kernfs.h:13,
                  from include/linux/sysfs.h:15,
                  from include/linux/kobject.h:21,
                  from include/linux/device.h:17,
                  from drivers/platform/x86/wmi.c:35:
 drivers/platform/x86/wmi.c:48:21: warning: ‘wmi_data_lock’ defined but not used [-Wunused-variable]
  static DEFINE_MUTEX(wmi_data_lock);
                      ^

A git grep shows no other instances/references to the wmi_data_lock.
Delete it, assuming that the mutex addition was just a leftover from
an earlier work in progress version of the change, since the original
dates from 2008.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/platform/x86/wmi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 737e56d46f61..26a0bd893b86 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -45,7 +45,6 @@ MODULE_LICENSE("GPL");
 
 #define ACPI_WMI_CLASS "wmi"
 
-static DEFINE_MUTEX(wmi_data_lock);
 static LIST_HEAD(wmi_block_list);
 
 struct guid_block {
-- 
2.2.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86/wmi: delete unused wmi_data_lock mutex causing gcc warning
  2015-03-23 18:01 [PATCH] x86/wmi: delete unused wmi_data_lock mutex causing gcc warning Paul Gortmaker
@ 2015-03-25 17:26 ` Darren Hart
  0 siblings, 0 replies; 2+ messages in thread
From: Darren Hart @ 2015-03-25 17:26 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: platform-driver-x86, linux-kernel

On Mon, Mar 23, 2015 at 02:01:37PM -0400, Paul Gortmaker wrote:
> In commit bff431e49ff531a343fbb2b4426e313000844f32 ("ACPI: WMI: Add
> ACPI-WMI mapping driver") this mutex was added, but the rest of the
> final commit never actually made use of it, resulting in:
> 
>  In file included from include/linux/mutex.h:29:0,
>                   from include/linux/kernfs.h:13,
>                   from include/linux/sysfs.h:15,
>                   from include/linux/kobject.h:21,
>                   from include/linux/device.h:17,
>                   from drivers/platform/x86/wmi.c:35:
>  drivers/platform/x86/wmi.c:48:21: warning: ‘wmi_data_lock’ defined but not used [-Wunused-variable]
>   static DEFINE_MUTEX(wmi_data_lock);
>                       ^
> 
> A git grep shows no other instances/references to the wmi_data_lock.
> Delete it, assuming that the mutex addition was just a leftover from
> an earlier work in progress version of the change, since the original
> dates from 2008.
> 
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Queued, thank you Paul.

-- 
Darren Hart
Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-25 17:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-23 18:01 [PATCH] x86/wmi: delete unused wmi_data_lock mutex causing gcc warning Paul Gortmaker
2015-03-25 17:26 ` Darren Hart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®