[PATCH 3/3]: Add new driver
Mattias Jacobsson (3):
platform/x86: wmi: add context pointer field to struct wmi_device_id
platform/x86: wmi: add context argument to the probe function
platform/x86: wmi: add Xiaomi WMI key driver
drivers/platform/x86/Kconfig | 10 +++
drivers
find_guid_context() to retrieve that context pointer.
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
drivers/platform/x86/wmi.c | 22 ++
include/linux/mod_devicetable.h | 1 +
2 files changed, 23 insertions(+)
diff --git a/drivers/platform/x86/wmi.c b/drivers/pl
r WMI events that are reported by the hardware but not utilized by
this driver are Caps Lock(which already work) and Fn lock/unlock.
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
drivers/platform/x86/Kconfig | 10
drivers/platform/x86/Makefile | 1 +
drivers/platform/x86/x
The struct wmi_device_id has a context pointer field, forward this
pointer as an argument to the probe function in struct wmi_driver.
Update existing users of the same probe function to accept this new
context argument.
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
drivers/platfo
On 2019-02-20, Masahiro Yamada wrote:
> On Wed, Feb 20, 2019 at 5:09 AM Mattias Jacobsson <2...@mok.nu> wrote:
> >
> > Hi Masahiro,
> >
> > On 2019-02-18, Masahiro Yamada wrote:
> > > Hi Mattias,
> > >
> > > On Thu, Feb 7, 2019 at 9:31 P
Hi Masahiro,
On 2019-02-18, Masahiro Yamada wrote:
> Hi Mattias,
>
> On Thu, Feb 7, 2019 at 9:31 PM Mattias Jacobsson <2...@mok.nu> wrote:
> >
> > The size of the variable alias provided to do_entry functions are
> > currently not readily available. Thu
use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS().
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
drivers/platform/x86/intel-wmi-thunderbolt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/intel-wmi-thunderbolt.c
b/drivers/platform/x86/int
use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS().
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
Reviewed-by: Mario Limonciello
---
drivers/platform/x86/dell-wmi-descriptor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/dell-wmi-descripto
use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS().
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
drivers/platform/x86/wmi-bmof.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/wmi-bmof.c b/drivers/platform/x86/wmi-bmof.c
index c4530b
TABLE() by adding info about struct
wmi_device_id in devicetable-offsets.c and add a WMI entry point in
file2alias.c.
The type argument for MODULE_DEVICE_TABLE(type, name) is wmi.
Suggested-by: Pali Rohár
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
What do you think about writing
use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS().
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
drivers/platform/x86/huawei-wmi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/platform/x86/huawei-wmi.c
b/drivers/platform/x86/huawei-wmi.c
index 59872f
use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS().
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
Reviewed-by: Mario Limonciello
---
drivers/platform/x86/dell-smbios-wmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/dell-smbios-wmi.c
b/d
use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS().
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
Reviewed-by: Mario Limonciello
---
drivers/platform/x86/dell-wmi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platfo
. Therefore update
wmi_dev_match()'s loop to check for an empty guid_string instead of a
NULL pointer.
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
drivers/platform/x86/wmi.c | 2 +-
include/linux/mod_devicetable.h | 12
include/linux/wmi.h | 5 +
3 fi
to document the
reasoning behind the changes
[1]: https://lkml.kernel.org/r/20190122200302.19861-1-...@mok.nu
[2]: https://lkml.kernel.org/r/20190126210634.GB13882@wrath
[3]: https://lore.kernel.org/lkml/20190207123022.7961-1-...@mok.nu/
Mattias Jacobsson (8):
platform/x86: wmi: move struct w
On 2019-02-05, Andy Shevchenko wrote:
> On Sun, Feb 3, 2019 at 9:04 PM Mattias Jacobsson <2...@mok.nu> wrote:
> > On 2019-01-30, Andy Shevchenko wrote:
> > > On Wed, Jan 30, 2019 at 5:15 PM Mattias Jacobsson <2...@mok.nu> wrote:
>
> > > > + if (
The size of the variable alias provided to do_entry functions are
currently not readily available. Thus hindering do_entry functions to
perform bounds checking.
Define the macro ALIAS_SIZE containing the size of the variable alias.
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
R
On 2019-01-30, Andy Shevchenko wrote:
> On Wed, Jan 30, 2019 at 5:15 PM Mattias Jacobsson <2...@mok.nu> wrote:
> >
> > The kernel provides the macro MODULE_DEVICE_TABLE() where driver authors
> > can specify their device type and their array of device_ids and thereby
&g
On 2019-01-30, Andy Shevchenko wrote:
> On Wed, Jan 30, 2019 at 5:15 PM Mattias Jacobsson <2...@mok.nu> wrote:
> >
> > WMI drivers can if they have specified an array of struct wmi_device_id
> > use the MODULE_DEVICE_TABLE() macro to automatically generate the
> >
drivers that have specified an array of struct wmi_device_id
to use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS().
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
Reviewed-by: Mario Limonciello
---
drivers/platform/x86/dell-smbios-wmi.c | 2 +-
drivers/platform/x86/dell-wmi-descriptor.c
TABLE() by adding info about struct
wmi_device_id in devicetable-offsets.c and add a WMI entry point in
file2alias.c.
The type argument for MODULE_DEVICE_TABLE(type, name) is wmi.
Suggested-by: Pali Rohár
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
What do you think about th
evice if
the variable is NULL.
Fixes: 844af950da94 ("platform/x86: wmi: Turn WMI into a bus driver")
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
drivers/platform/x86/wmi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/platform/x86/wmi.c b/drivers/pla
ed-by tag
* depend upon patch [1]
* reword commit message for [PATCH 2/3] and [PATCH 3/3] to document the
reasoning behind the changes
[1]: https://lkml.kernel.org/r/20190122200302.19861-1-...@mok.nu
[2]: https://lkml.kernel.org/r/20190126210634.GB13882@wrath
Mattias Jacobsson (3):
platform/x86
. Therefore update
wmi_dev_match()'s loop to check for an empty guid_string instead of a
NULL pointer.
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
drivers/platform/x86/wmi.c | 2 +-
include/linux/mod_devicetable.h | 12
include/linux/wmi.h | 5 +
3 fi
On 2019-01-28, Pali Rohár wrote:
> On Monday 28 January 2019 15:09:11 Mattias Jacobsson wrote:
> > Hi,
> >
> > On 2019-01-27, Andy Shevchenko wrote:
> > > On Sun, Jan 27, 2019 at 9:04 PM Mattias Jacobsson <2...@mok.nu> wrote:
> > > >
> >
Hi,
On 2019-01-27, Andy Shevchenko wrote:
> On Tue, Jan 22, 2019 at 10:04 PM Mattias Jacobsson <2...@mok.nu> wrote:
> >
> > In the function wmi_dev_match() there are three variables that
> > potentially can result in a null pointer dereference. Namely:
> > d
Hi,
On 2019-01-27, Andy Shevchenko wrote:
> On Sun, Jan 27, 2019 at 9:04 PM Mattias Jacobsson <2...@mok.nu> wrote:
> >
> > The kernel provides the macro MODULE_DEVICE_TABLE() where driver authors
> > can specify their device type and their array of device_ids
Hi Andy,
Thanks for reviewing!
On 2019-01-27, Andy Shevchenko wrote:
> On Sun, Jan 27, 2019 at 9:04 PM Mattias Jacobsson <2...@mok.nu> wrote:
> >
> > In preparation for adding WMI support to MODULE_DEVICE_TABLE() move the
> > definition of struct wmi_device_id to m
Hi Darren,
On 2019-01-26, Darren Hart wrote:
> On Sat, Jan 19, 2019 at 12:55:52PM +0100, Mattias Jacobsson wrote:
> > This patchset adds WMI support to MODULE_DEVICE_TABLE().
>
> Hi Mattias,
>
> Thanks for the patch series. I've reviewed and found no major issues -
drivers that have specified an array of struct wmi_device_id
to use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS().
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
Reviewed-by: Mario Limonciello
---
drivers/platform/x86/dell-smbios-wmi.c | 2 +-
drivers/platform/x86/dell-wmi-descriptor.c
. Therefore update
wmi_dev_match()'s loop to check for an empty guid_string instead of a
NULL pointer.
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
drivers/platform/x86/wmi.c | 2 +-
include/linux/mod_devicetable.h | 13 +
include/linux/wmi.h | 5 +
3 fi
TABLE() by adding info about struct
wmi_device_id in devicetable-offsets.c and add a WMI entry point in
file2alias.c.
The type argument for MODULE_DEVICE_TABLE(type, name) is wmi.
Suggested-by: Pali Rohár
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
scripts/mod/devicetable-off
861-1-...@mok.nu
[2]: https://lkml.kernel.org/r/20190126210634.GB13882@wrath
Mattias Jacobsson (3):
platform/x86: wmi: move struct wmi_device_id to mod_devicetable.h
platform/x86: wmi: add WMI support to MODULE_DEVICE_TABLE()
platform/x86: wmi: use MODULE_DEVICE_TABLE() instead of MODULE_
Hi Darren,
On 2019-01-26, Darren Hart wrote:
> On Tue, Jan 22, 2019 at 09:03:01PM +0100, Mattias Jacobsson wrote:
> > In the function wmi_dev_match() there are three variables that
> > potentially can result in a null pointer dereference. Namely:
>
> Is this something yo
On 2019-01-19, Mattias Jacobsson wrote:
> In preparation for adding WMI support to MODULE_DEVICE_TABLE() move the
> definition of struct wmi_device_id to mod_devicetable.h and inline
> guid_string in the struct.
>
> Changing guid_string to an inline char array changes the loop co
n a null pointer dereference.
The NULL checks are performed prior to running container_of() for the
variables dev/wblock and driver/wmi_driver.
Fixes: 844af950da94 ("platform/x86: wmi: Turn WMI into a bus driver")
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
drivers
().
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
drivers/platform/x86/dell-smbios-wmi.c | 2 +-
drivers/platform/x86/dell-wmi-descriptor.c | 2 +-
drivers/platform/x86/dell-wmi.c | 4 ++--
drivers/platform/x86/huawei-wmi.c| 3 +--
drivers/platform/x86
This patchset adds WMI support to MODULE_DEVICE_TABLE().
[PATCH 1/3]: prepare struct wmi_device_id
[PATCH 2/3]: add support
[PATCH 3/3]: update existing drivers to use MODULE_DEVICE_TABLE()
Mattias Jacobsson (3):
platform/x86: wmi: move struct wmi_device_id to mod_devicetable.h
platform/x86
. Therefore update
wmi_dev_match()'s loop to check for an empty guid_string instead of a
NULL pointer.
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
drivers/platform/x86/wmi.c | 2 +-
include/linux/mod_devicetable.h | 13 +
include/linux/wmi.h | 5 +
3 fi
Add WMI support to MODULE_DEVICE_TABLE() by adding info about struct
wmi_device_id in devicetable-offsets.c and add a WMI entry point in
file2alias.c.
The type argument for MODULE_DEVICE_TABLE(type, name) is wmi.
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
The idea of adding wmi s
Commit-ID: 099be748865eece21362aee416c350c0b1ae34df
Gitweb: https://git.kernel.org/tip/099be748865eece21362aee416c350c0b1ae34df
Author: Mattias Jacobsson <2...@mok.nu>
AuthorDate: Sat, 29 Dec 2018 15:17:50 +0100
Committer: Arnaldo Carvalho de Melo
CommitDate: Fri, 4 Jan 2019 12
Each call to va_copy() should have one, and only one, corresponding call
to va_end(). In strbuf_addv() some code paths result in va_end() getting
called multiple times. Remove the superfluous va_end().
Fixes: ce49d8436cff ("perf strbuf: Match va_{add,copy} with va_end")
Signed-off-b
Commit-ID: 69be4efeb959147ff86f22e35aea9526f9b86715
Gitweb: https://git.kernel.org/tip/69be4efeb959147ff86f22e35aea9526f9b86715
Author: Mattias Jacobsson <2...@mok.nu>
AuthorDate: Wed, 28 Nov 2018 17:16:07 +0100
Committer: Borislav Petkov
CommitDate: Wed, 28 Nov 2018 20:06:07 +010
Each call to va_start must have a corresponding call to va_end before
the end of the function. Add the missing va_end.
Found with Coccinelle.
Signed-off-by: Mattias Jacobsson <2...@mok.nu>
---
arch/x86/boot/tools/build.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/boot
44 matches
Mail list logo