[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VdFh06kL=4fpoKogyX6K08SyX1zkJOjzmVcGqUWFA+2Ew@mail.gmail.com>
Date: Wed, 31 Jan 2018 20:59:20 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Darren Hart <dvhart@...radead.org>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Platform Driver <platform-driver-x86@...r.kernel.org>,
AceLan Kao <acelan.kao@...onical.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 1/2] platform/x86: intel-vbtn: Remove redundant inclusions
On Wed, Jan 31, 2018 at 8:50 PM, Darren Hart <dvhart@...radead.org> wrote:
> On Wed, Jan 31, 2018 at 07:54:06PM +0200, Andy Shevchenko wrote:
>> Some headers are not needed since the driver can be built as module.
>> Remove them.
>
> Removing init because it's included by module.h, and removing acpi_bus.h
> because it's included by acpi.h - but not because it can be built as a
> module - right? Just checking, the wording in the commit msg seemed odd
> to me.
Correct. I'll rephrase this in place.
> These removals seem appropriate to me, but so we have it recorded here -
> in general, including headers that you explicitly make use of is good
> practice, and not depending on others to include them. But in this case,
> the implicit includes are reasonable expectations as they are tightly
> coupled with the parent include.
There are two classes of headers (at least?):
- let say "user-visible" ones, which drivers usually include like you
pointed above
- low level ones, which in most cases are not supposed to be included directly
So, for first class I agree with you, and acpi_bus.h in this case can
be considered as an example of second class.
> Reviewed-by: Darren Hart (VMware) <dvhart@...radead.org>
Thanks!
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists