<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/platform/x86/wmi.c, branch v4.4.30</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v4.4.30</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v4.4.30'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2015-09-10T16:07:04+00:00</updated>
<entry>
<title>wmi: Remove private %pUL implementation</title>
<updated>2015-09-10T16:07:04+00:00</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2015-09-09T22:08:45+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=85b4e4eb2f9ac29ee8ec47f1f055f251cb251a3c'/>
<id>urn:sha1:85b4e4eb2f9ac29ee8ec47f1f055f251cb251a3c</id>
<content type='text'>
The work performed by wmi_gtoa is equivalent to simply sprintf(out,
"%pUL", in), so one could replace its body by this. However, most
users feed the result directly as a %s argument to some other function
which also understands the %p extensions (they all ultimately use
vsnprintf), so we can eliminate some stack buffers and quite a bit of
code by just using %pUL directly.

In wmi_dev_uevent I'm not sure whether there's room for a
nul-terminator in env-&gt;buf, so I've just replaced wmi_gtoa with the
equivalent sprintf call.

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Signed-off-by: Darren Hart &lt;dvhart@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>wmi: Use bool function return values of true/false not 1/0</title>
<updated>2015-04-08T03:43:12+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2015-03-30T17:43:20+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=097c27fcb256415e7c1612e7ab916aa906874f9b'/>
<id>urn:sha1:097c27fcb256415e7c1612e7ab916aa906874f9b</id>
<content type='text'>
Use the normal return values for bool functions

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Darren Hart &lt;dvhart@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>x86/wmi: delete unused wmi_data_lock mutex causing gcc warning</title>
<updated>2015-03-25T17:25:09+00:00</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2015-03-23T18:01:37+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f62a4ffd43c8739aa4b0358710ace0a4e91d2071'/>
<id>urn:sha1:f62a4ffd43c8739aa4b0358710ace0a4e91d2071</id>
<content type='text'>
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 &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Darren Hart &lt;dvhart@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>WMI: Remove unnecessary null test</title>
<updated>2014-08-16T08:23:51+00:00</updated>
<author>
<name>Himangi Saraogi</name>
<email>himangi774@gmail.com</email>
</author>
<published>2014-07-15T17:19:11+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=959ef6d5def6ff3256f04fbf559eeb7c74d5605a'/>
<id>urn:sha1:959ef6d5def6ff3256f04fbf559eeb7c74d5605a</id>
<content type='text'>
This patch removes the null test on block. block is initialized at the
beginning of the function to &amp;wblock-&gt;gblock. Since wblock is
dereferenced prior to the null test, wblock must be a valid pointer,
and &amp;wblock-&gt;gblock cannot be null.

The following Coccinelle script is used for detecting the change:

@r@
expression e,f;
identifier g,y;
statement S1,S2;
@@

*e = &amp;f-&gt;g
&lt;+...
 f-&gt;y
 ...+&gt;
*if (e != NULL || ...)
 S1 else S2

Signed-off-by: Himangi Saraogi &lt;himangi774@gmail.com&gt;
Signed-off-by: Matthew Garrett &lt;matthew.garrett@nebula.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'acpi-cleanup'</title>
<updated>2014-01-12T22:44:09+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2014-01-12T22:44:09+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=98feb7cc61c50fe0fa36eeb994d5db527ca9e103'/>
<id>urn:sha1:98feb7cc61c50fe0fa36eeb994d5db527ca9e103</id>
<content type='text'>
* acpi-cleanup: (22 commits)
  ACPI / tables: Return proper error codes from acpi_table_parse() and fix comment.
  ACPI / tables: Check if id is NULL in acpi_table_parse()
  ACPI / proc: Include appropriate header file in proc.c
  ACPI / EC: Remove unused functions and add prototype declaration in internal.h
  ACPI / dock: Include appropriate header file in dock.c
  ACPI / PCI: Include appropriate header file in pci_link.c
  ACPI / PCI: Include appropriate header file in pci_slot.c
  ACPI / EC: Mark the function acpi_ec_add_debugfs() as static in ec_sys.c
  ACPI / NVS: Include appropriate header file in nvs.c
  ACPI / OSL: Mark the function acpi_table_checksum() as static
  ACPI / processor: initialize a variable to silence compiler warning
  ACPI / processor: use ACPI_COMPANION() to get ACPI device
  ACPI: correct minor typos
  ACPI / sleep: Drop redundant acpi_disabled check
  ACPI / dock: Drop redundant acpi_disabled check
  ACPI / table: Replace '1' with specific error return values
  ACPI: remove trailing whitespace
  ACPI / IBFT: Fix incorrect &lt;acpi/acpi.h&gt; inclusion in iSCSI boot firmware module
  ACPI / i915: Fix incorrect &lt;acpi/acpi.h&gt; inclusions via &lt;linux/acpi_io.h&gt;
  SFI / ACPI: Fix warnings reported during builds with W=1
  ...

Conflicts:
	drivers/acpi/nvs.c
	drivers/hwmon/asus_atk0110.c
</content>
</entry>
<entry>
<title>ACPI: Clean up inclusions of ACPI header files</title>
<updated>2013-12-07T00:03:14+00:00</updated>
<author>
<name>Lv Zheng</name>
<email>lv.zheng@intel.com</email>
</author>
<published>2013-12-03T00:49:16+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8b48463f89429af408ff695244dc627e1acff4f7'/>
<id>urn:sha1:8b48463f89429af408ff695244dc627e1acff4f7</id>
<content type='text'>
Replace direct inclusions of &lt;acpi/acpi.h&gt;, &lt;acpi/acpi_bus.h&gt; and
&lt;acpi/acpi_drivers.h&gt;, which are incorrect, with &lt;linux/acpi.h&gt;
inclusions and remove some inclusions of those files that aren't
necessary.

First of all, &lt;acpi/acpi.h&gt;, &lt;acpi/acpi_bus.h&gt; and &lt;acpi/acpi_drivers.h&gt;
should not be included directly from any files that are built for
CONFIG_ACPI unset, because that generally leads to build warnings about
undefined symbols in !CONFIG_ACPI builds.  For CONFIG_ACPI set,
&lt;linux/acpi.h&gt; includes those files and for CONFIG_ACPI unset it
provides stub ACPI symbols to be used in that case.

Second, there are ordering dependencies between those files that always
have to be met.  Namely, it is required that &lt;acpi/acpi_bus.h&gt; be included
prior to &lt;acpi/acpi_drivers.h&gt; so that the acpi_pci_root declarations the
latter depends on are always there.  And &lt;acpi/acpi.h&gt; which provides
basic ACPICA type declarations should always be included prior to any other
ACPI headers in CONFIG_ACPI builds.  That also is taken care of including
&lt;linux/acpi.h&gt; as appropriate.

Signed-off-by: Lv Zheng &lt;lv.zheng@intel.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Matthew Garrett &lt;mjg59@srcf.ucam.org&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Acked-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt; (drivers/pci stuff)
Acked-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt; (Xen stuff)
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>x86, wmi fix modalias_show return values</title>
<updated>2013-11-21T01:16:22+00:00</updated>
<author>
<name>Prarit Bhargava</name>
<email>prarit@redhat.com</email>
</author>
<published>2013-10-03T23:23:36+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a80e1053aaa395d94fff5ab7c73c89bb0c28c3c5'/>
<id>urn:sha1:a80e1053aaa395d94fff5ab7c73c89bb0c28c3c5</id>
<content type='text'>
I just fixed this same bug in arch/powerpc/kernel/vio.c and took a quick
look for other similar errors in the kernel.

modalias_show() should return an empty string on error, not errno.

Signed-off-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
Cc: Matthew Garrett &lt;matthew.garrett@nebula.com&gt;
Signed-off-by: Matthew Garrett &lt;matthew.garrett@nebula.com&gt;
</content>
</entry>
<entry>
<title>wmi: convert acpi_get_handle() to acpi_has_method()</title>
<updated>2013-09-23T23:37:56+00:00</updated>
<author>
<name>Zhang Rui</name>
<email>rui.zhang@intel.com</email>
</author>
<published>2013-09-03T00:32:07+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=54f14c277d78cd4fee860f5daf391a5759f8596f'/>
<id>urn:sha1:54f14c277d78cd4fee860f5daf391a5759f8596f</id>
<content type='text'>
acpi_has_method() is a new ACPI API introduced to check
the existence of an ACPI control method.

It can be used to replace acpi_get_handle() in the case that
1. the calling function doesn't need the ACPI handle of the control method.
and
2. the calling function doesn't care the reason why the method is unavailable.

Convert acpi_get_handle() to acpi_has_method()
in drivers/platform/x86/wmi.c in this patch.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
CC: Matthew Garrett &lt;matthew.garrett@nebula.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>wmi: convert acpi_evaluate_object() to acpi_execute_simple_method()</title>
<updated>2013-09-23T23:37:54+00:00</updated>
<author>
<name>Zhang Rui</name>
<email>rui.zhang@intel.com</email>
</author>
<published>2013-09-03T00:31:57+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8122ab66b129678bf871aef7559640323eb465bb'/>
<id>urn:sha1:8122ab66b129678bf871aef7559640323eb465bb</id>
<content type='text'>
acpi_execute_simple_method() is a new ACPI API introduced to invoke
an ACPI control method that has single integer parameter and no return value.

Convert acpi_evaluate_object() to acpi_execute_simple_method()
in drivers/platform/x86/wmi.c

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
CC: Matthew Garrett &lt;matthew.garrett@nebula.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>wmi: parse_wdg() should return kernel error codes</title>
<updated>2013-09-05T12:52:06+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2013-08-14T09:02:30+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0a018a68d3bfbd6288f3b646edb0dd0720209790'/>
<id>urn:sha1:0a018a68d3bfbd6288f3b646edb0dd0720209790</id>
<content type='text'>
The current code returns a mix of acpi_status and kernel error codes.
It should just return kernel error codes.  There are already error paths
in this function which return -ENOMEM and that's what the caller
expects.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Matthew Garrett &lt;matthew.garrett@nebula.com&gt;
</content>
</entry>
</feed>
