mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mattias Jacobsson <2pi@mok.nu>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Darren Hart <dvhart@infradead.org>,
	Andy Shevchenko <andy@infradead.org>,
	Platform Driver <platform-driver-x86@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	<2pi@mok.nu>
Subject: Re: [PATCH v2 1/3] platform/x86: wmi: move struct wmi_device_id to mod_devicetable.h
Date: Mon, 28 Jan 2019 14:54:37 +0100	[thread overview]
Message-ID: <20190128135437.qetbebros3xkayyn@mok.nu> (raw)
In-Reply-To: <CAHp75Vdsr8aY1ODpZUqR--jAfgRowJz8tbSGwS1SFTH-W4u0XA@mail.gmail.com>

Hi Andy,

Thanks for reviewing!

On 2019-01-27, Andy Shevchenko wrote:
> On Sun, Jan 27, 2019 at 9:04 PM Mattias Jacobsson <2pi@mok.nu> 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 conditions
> > when looping over an array of struct wmi_device_id. Therefore update
> > wmi_dev_match()'s loop to check for an empty guid_string instead of a
> > NULL pointer.
> 
> Below some minor comments.
> 
> > -       while (id->guid_string) {
> > +       while (id->guid_string[0] != '\0') {
> 
> Hmm.. I would rather put it as
> 
> while (*id->guid_string) {

Sure.

> 
> > +#define WMI_MODULE_PREFIX      "wmi:"
> 
> > +#define WMI_GUID_STRING_LEN    36
> 
> Isn't this already defined in UUID namespace?
> (include/linux/uuid.h IIRC)  

Kind of, UUID_STRING_LEN is defined in uuid.h. It is included behind a
#ifdef __KERNEL__, but others seam to use things included through it so
I guess it is alright...

Let me know how you want it.

> 
> >  #include <linux/device.h>
> >  #include <linux/acpi.h>
> 
> > +#include <linux/mod_devicetable.h>
> 
> Not sure it's needed since acpi.h includes that.

It is included in acpi.h(behind CONFIG_ACPI), I thought it was cleaner
with it included explicitly. Plus that we aren't relying on others to
include it.

Let me know how you want it.

> 
> -- 
> With Best Regards,
> Andy Shevchenko

Thanks,
Mattias

  reply	other threads:[~2019-01-28 13:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-27 19:03 [PATCH v2 0/3] platform/x86: wmi: add WMI support to MODULE_DEVICE_TABLE() Mattias Jacobsson
2019-01-27 19:03 ` [PATCH v2 1/3] platform/x86: wmi: move struct wmi_device_id to mod_devicetable.h Mattias Jacobsson
2019-01-27 20:20   ` Andy Shevchenko
2019-01-28 13:54     ` Mattias Jacobsson [this message]
2019-01-28 16:01       ` Andy Shevchenko
2019-01-27 19:03 ` [PATCH v2 2/3] platform/x86: wmi: add WMI support to MODULE_DEVICE_TABLE() Mattias Jacobsson
2019-01-27 20:22   ` Andy Shevchenko
2019-01-28 14:09     ` Mattias Jacobsson
2019-01-28 14:27       ` Pali Rohár
2019-01-28 15:09         ` Mattias Jacobsson
2019-01-27 19:03 ` [PATCH v2 3/3] platform/x86: wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS() Mattias Jacobsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190128135437.qetbebros3xkayyn@mok.nu \
    --to=2pi@mok.nu \
    --cc=andy.shevchenko@gmail.com \
    --cc=andy@infradead.org \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®