From: Darren Hart <dvhart@infradead.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Andy Lutomirski" <luto@kernel.org>,
"Pali Rohár" <pali.rohar@gmail.com>,
"Platform Driver" <platform-driver-x86@vger.kernel.org>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Andy Lutomirski" <luto@amacapital.net>,
"Mario Limonciello" <mario_limonciello@dell.com>,
"Rafael Wysocki" <rjw@rjwysocki.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH v2] platform/x86: wmi-bmof: New driver to expose embedded Binary WMI MOF metadata
Date: Tue, 6 Jun 2017 09:54:43 -0700 [thread overview]
Message-ID: <20170606165443.GB32509@fury> (raw)
In-Reply-To: <CAHp75VcEpnMzjomrnEQQEFp6zCJjcBugaRRHZO0GUc3FOyjF_Q@mail.gmail.com>
On Tue, Jun 06, 2017 at 12:30:38PM +0300, Andy Shevchenko wrote:
> On Tue, Jun 6, 2017 at 6:16 AM, Andy Lutomirski <luto@kernel.org> wrote:
> > Many laptops (and maybe servers?) have embedded WMI Binary MOF metadata.
> > We do not yet have open-source tools for processing the data, although
> > one is in the works thanks to Pali:
> >
> > https://github.com/pali/bmfdec
> >
> > There is currently no interface to get the data in the first place. By
> > exposing it, we facilitate the development of new tools.
>
> My comments below.
> Overall, FWIW,
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
>
>
> > +#include <linux/kernel.h>
> > +#include <linux/module.h>
> > +#include <linux/init.h>
> > +#include <linux/slab.h>
> > +#include <linux/types.h>
> > +#include <linux/input.h>
> > +#include <linux/input/sparse-keymap.h>
> > +#include <linux/acpi.h>
> > +#include <linux/string.h>
> > +#include <linux/dmi.h>
> > +#include <linux/wmi.h>
> > +#include <acpi/video.h>
>
> Alphabetical order? Up to you.
OK, I failed to audit this... lots we don't need in here.
The minimum to build is:
#include <linux/wmi.h>
So assuming this was copy/pasted from another file.
Again, no guidance in coding-style.rst on includes. Seems to me we should
include what we specifically require, regardless of whether or not another
header also happens to include it. We need acpi for example, even though wmi
also includes it.
We should include modules, even though acpi includes it.
We use several other things we aren't including for, like
memcpy
dev_kzalloc
sysfs_create_bin_file
So I suggest:
#include <linux/acpi.h>
#include <linux/device.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/string.h>
#include <linux/sysfs.h>
#include <linux/types.h>
#include <linux/wmi.h>
Which removes:
#include <acpi/video.h>
#include <linux/dmi.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/input/sparse-keymap.h>
#include <linux/slab.h>
And adds:
#include <linux/device.h>
#include <linux/fs.h>
#include <linux/sysfs.h>
--
Darren Hart
VMware Open Source Technology Center
next prev parent reply other threads:[~2017-06-06 16:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 3:16 [PATCH v2] platform/x86: wmi-bmof: New driver to expose embedded Binary WMI MOF metadata Andy Lutomirski
2017-06-06 9:30 ` Andy Shevchenko
2017-06-06 16:34 ` Darren Hart
2017-06-06 16:54 ` Darren Hart [this message]
2017-06-06 18:45 ` Andy Shevchenko
2017-06-06 10:04 ` Pali Rohár
2017-06-06 17:02 ` Darren Hart
2017-06-06 20:50 ` Pali Rohár
2017-07-04 13:28 ` Pali Rohár
2017-11-23 14:39 ` Pali Rohár
2017-11-23 14:48 ` Andy Lutomirski
2017-06-06 22:31 ` Andy Lutomirski
2017-06-06 23:35 ` kbuild test robot
2017-06-19 16:07 ` Pali Rohár
2017-06-19 16:13 ` Mario.Limonciello
2017-06-19 16:19 ` Pali Rohár
2017-06-19 16:23 ` Andy Lutomirski
2017-06-20 12:12 ` Pali Rohár
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=20170606165443.GB32509@fury \
--to=dvhart@infradead.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=luto@kernel.org \
--cc=mario_limonciello@dell.com \
--cc=pali.rohar@gmail.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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;
as well as URLs for NNTP newsgroup(s).