* [PATCH v1] mfd: intel-lpss: Move linux/pm.h to the local header
@ 2019-01-24 18:03 Andy Shevchenko
2019-01-29 14:48 ` Mika Westerberg
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Andy Shevchenko @ 2019-01-24 18:03 UTC (permalink / raw)
To: Mika Westerberg, linux-kernel, Lee Jones; +Cc: Andy Shevchenko
We now using a common macro for PM operations in Intel LPSS driver,
and, since that macro relies on the definition and macro from linux/pm.h
header file, it's logical to include it directly in intel-lpss.h.
Otherwise it's a bit fragile and requires a proper ordering
of header inclusion in C files.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/mfd/intel-lpss-acpi.c | 1 -
drivers/mfd/intel-lpss-pci.c | 1 -
drivers/mfd/intel-lpss.h | 2 ++
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/intel-lpss-acpi.c b/drivers/mfd/intel-lpss-acpi.c
index 7911b0a14a6d..6d9f03363ee7 100644
--- a/drivers/mfd/intel-lpss-acpi.c
+++ b/drivers/mfd/intel-lpss-acpi.c
@@ -15,7 +15,6 @@
#include <linux/ioport.h>
#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/pm.h>
#include <linux/pm_runtime.h>
#include <linux/platform_device.h>
#include <linux/property.h>
diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c
index 0e5282fc1467..cba2eb166650 100644
--- a/drivers/mfd/intel-lpss-pci.c
+++ b/drivers/mfd/intel-lpss-pci.c
@@ -15,7 +15,6 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
-#include <linux/pm.h>
#include <linux/pm_runtime.h>
#include <linux/property.h>
diff --git a/drivers/mfd/intel-lpss.h b/drivers/mfd/intel-lpss.h
index 865bbeaaf00c..3a120fecd2dc 100644
--- a/drivers/mfd/intel-lpss.h
+++ b/drivers/mfd/intel-lpss.h
@@ -14,6 +14,8 @@
#ifndef __MFD_INTEL_LPSS_H
#define __MFD_INTEL_LPSS_H
+#include <linux/pm.h>
+
struct device;
struct resource;
struct property_entry;
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v1] mfd: intel-lpss: Move linux/pm.h to the local header
2019-01-24 18:03 [PATCH v1] mfd: intel-lpss: Move linux/pm.h to the local header Andy Shevchenko
@ 2019-01-29 14:48 ` Mika Westerberg
2019-02-01 9:25 ` Lee Jones
2019-02-12 8:49 ` Lee Jones
2 siblings, 0 replies; 8+ messages in thread
From: Mika Westerberg @ 2019-01-29 14:48 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-kernel, Lee Jones
On Thu, Jan 24, 2019 at 08:03:28PM +0200, Andy Shevchenko wrote:
> We now using a common macro for PM operations in Intel LPSS driver,
> and, since that macro relies on the definition and macro from linux/pm.h
> header file, it's logical to include it directly in intel-lpss.h.
> Otherwise it's a bit fragile and requires a proper ordering
> of header inclusion in C files.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1] mfd: intel-lpss: Move linux/pm.h to the local header
2019-01-24 18:03 [PATCH v1] mfd: intel-lpss: Move linux/pm.h to the local header Andy Shevchenko
2019-01-29 14:48 ` Mika Westerberg
@ 2019-02-01 9:25 ` Lee Jones
2019-02-01 10:05 ` Andy Shevchenko
2019-02-12 8:49 ` Lee Jones
2 siblings, 1 reply; 8+ messages in thread
From: Lee Jones @ 2019-02-01 9:25 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Mika Westerberg, linux-kernel
On Thu, 24 Jan 2019, Andy Shevchenko wrote:
> We now using a common macro for PM operations in Intel LPSS driver,
> and, since that macro relies on the definition and macro from linux/pm.h
> header file, it's logical to include it directly in intel-lpss.h.
> Otherwise it's a bit fragile and requires a proper ordering
> of header inclusion in C files.
I don't agree with this. File which use various headers should
explicitly include them. Inheriting header files is non-optimal.
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/mfd/intel-lpss-acpi.c | 1 -
> drivers/mfd/intel-lpss-pci.c | 1 -
> drivers/mfd/intel-lpss.h | 2 ++
> 3 files changed, 2 insertions(+), 2 deletions(-)
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1] mfd: intel-lpss: Move linux/pm.h to the local header
2019-02-01 9:25 ` Lee Jones
@ 2019-02-01 10:05 ` Andy Shevchenko
2019-02-01 15:08 ` Lee Jones
0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2019-02-01 10:05 UTC (permalink / raw)
To: Lee Jones; +Cc: Andy Shevchenko, Mika Westerberg, Linux Kernel Mailing List
On Fri, Feb 1, 2019 at 11:50 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> On Thu, 24 Jan 2019, Andy Shevchenko wrote:
>
> > We now using a common macro for PM operations in Intel LPSS driver,
> > and, since that macro relies on the definition and macro from linux/pm.h
> > header file, it's logical to include it directly in intel-lpss.h.
> > Otherwise it's a bit fragile and requires a proper ordering
> > of header inclusion in C files.
>
> I don't agree with this. File which use various headers should
> explicitly include them. Inheriting header files is non-optimal.
>
intel-lpss.h _is_ using pm.h.
I don't see a contradiction here.
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> > drivers/mfd/intel-lpss-acpi.c | 1 -
> > drivers/mfd/intel-lpss-pci.c | 1 -
> > drivers/mfd/intel-lpss.h | 2 ++
> > 3 files changed, 2 insertions(+), 2 deletions(-)
>
> --
> Lee Jones [李琼斯]
> Linaro Services Technical Lead
> Linaro.org │ Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1] mfd: intel-lpss: Move linux/pm.h to the local header
2019-02-01 10:05 ` Andy Shevchenko
@ 2019-02-01 15:08 ` Lee Jones
2019-02-08 12:59 ` Andy Shevchenko
0 siblings, 1 reply; 8+ messages in thread
From: Lee Jones @ 2019-02-01 15:08 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Andy Shevchenko, Mika Westerberg, Linux Kernel Mailing List
On Fri, 01 Feb 2019, Andy Shevchenko wrote:
> On Fri, Feb 1, 2019 at 11:50 AM Lee Jones <lee.jones@linaro.org> wrote:
> >
> > On Thu, 24 Jan 2019, Andy Shevchenko wrote:
> >
> > > We now using a common macro for PM operations in Intel LPSS driver,
> > > and, since that macro relies on the definition and macro from linux/pm.h
> > > header file, it's logical to include it directly in intel-lpss.h.
> > > Otherwise it's a bit fragile and requires a proper ordering
> > > of header inclusion in C files.
> >
> > I don't agree with this. File which use various headers should
> > explicitly include them. Inheriting header files is non-optimal.
> >
>
> intel-lpss.h _is_ using pm.h.
> I don't see a contradiction here.
Then it should be including in there *also*.
My point is that if drivers/mfd/intel-lpss-{acpi,pci}.c use the header
file, it should include it explicitly.
> > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > ---
> > > drivers/mfd/intel-lpss-acpi.c | 1 -
> > > drivers/mfd/intel-lpss-pci.c | 1 -
> > > drivers/mfd/intel-lpss.h | 2 ++
> > > 3 files changed, 2 insertions(+), 2 deletions(-)
> >
>
>
>
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1] mfd: intel-lpss: Move linux/pm.h to the local header
2019-02-01 15:08 ` Lee Jones
@ 2019-02-08 12:59 ` Andy Shevchenko
2019-02-12 8:49 ` Lee Jones
0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2019-02-08 12:59 UTC (permalink / raw)
To: Lee Jones; +Cc: Mika Westerberg, Linux Kernel Mailing List
On Fri, Feb 01, 2019 at 03:08:17PM +0000, Lee Jones wrote:
> On Fri, 01 Feb 2019, Andy Shevchenko wrote:
> > On Fri, Feb 1, 2019 at 11:50 AM Lee Jones <lee.jones@linaro.org> wrote:
> > > On Thu, 24 Jan 2019, Andy Shevchenko wrote:
> > >
> > > > We now using a common macro for PM operations in Intel LPSS driver,
> > > > and, since that macro relies on the definition and macro from linux/pm.h
> > > > header file, it's logical to include it directly in intel-lpss.h.
> > > > Otherwise it's a bit fragile and requires a proper ordering
> > > > of header inclusion in C files.
> > >
> > > I don't agree with this. File which use various headers should
> > > explicitly include them. Inheriting header files is non-optimal.
> > >
> >
> > intel-lpss.h _is_ using pm.h.
> > I don't see a contradiction here.
>
> Then it should be including in there *also*.
Why?
intel-lpss-*.c are not direct users of this header.
> My point is that if drivers/mfd/intel-lpss-{acpi,pci}.c use the header
> file, it should include it explicitly.
They are using it indirectly.
As far as I know we don't, for example, include "asm/*.h" to each of our C-file
because they are in _indirect_ use of.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1] mfd: intel-lpss: Move linux/pm.h to the local header
2019-02-08 12:59 ` Andy Shevchenko
@ 2019-02-12 8:49 ` Lee Jones
0 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2019-02-12 8:49 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Mika Westerberg, Linux Kernel Mailing List
On Fri, 08 Feb 2019, Andy Shevchenko wrote:
> On Fri, Feb 01, 2019 at 03:08:17PM +0000, Lee Jones wrote:
> > On Fri, 01 Feb 2019, Andy Shevchenko wrote:
> > > On Fri, Feb 1, 2019 at 11:50 AM Lee Jones <lee.jones@linaro.org> wrote:
> > > > On Thu, 24 Jan 2019, Andy Shevchenko wrote:
> > > >
> > > > > We now using a common macro for PM operations in Intel LPSS driver,
> > > > > and, since that macro relies on the definition and macro from linux/pm.h
> > > > > header file, it's logical to include it directly in intel-lpss.h.
> > > > > Otherwise it's a bit fragile and requires a proper ordering
> > > > > of header inclusion in C files.
> > > >
> > > > I don't agree with this. File which use various headers should
> > > > explicitly include them. Inheriting header files is non-optimal.
> > > >
> > >
> > > intel-lpss.h _is_ using pm.h.
> > > I don't see a contradiction here.
> >
> > Then it should be including in there *also*.
>
> Why?
>
> intel-lpss-*.c are not direct users of this header.
They're not? That's is where the miscommunication lies then.
If a C-file isn't using the offerings of a headerfile, obviously there
is no need for the C-file to include it.
> > My point is that if drivers/mfd/intel-lpss-{acpi,pci}.c use the header
> > file, it should include it explicitly.
>
> They are using it indirectly.
Indirectly is fine.
> As far as I know we don't, for example, include "asm/*.h" to each of our C-file
> because they are in _indirect_ use of.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1] mfd: intel-lpss: Move linux/pm.h to the local header
2019-01-24 18:03 [PATCH v1] mfd: intel-lpss: Move linux/pm.h to the local header Andy Shevchenko
2019-01-29 14:48 ` Mika Westerberg
2019-02-01 9:25 ` Lee Jones
@ 2019-02-12 8:49 ` Lee Jones
2 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2019-02-12 8:49 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Mika Westerberg, linux-kernel
On Thu, 24 Jan 2019, Andy Shevchenko wrote:
> We now using a common macro for PM operations in Intel LPSS driver,
> and, since that macro relies on the definition and macro from linux/pm.h
> header file, it's logical to include it directly in intel-lpss.h.
> Otherwise it's a bit fragile and requires a proper ordering
> of header inclusion in C files.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/mfd/intel-lpss-acpi.c | 1 -
> drivers/mfd/intel-lpss-pci.c | 1 -
> drivers/mfd/intel-lpss.h | 2 ++
> 3 files changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-02-12 8:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-24 18:03 [PATCH v1] mfd: intel-lpss: Move linux/pm.h to the local header Andy Shevchenko
2019-01-29 14:48 ` Mika Westerberg
2019-02-01 9:25 ` Lee Jones
2019-02-01 10:05 ` Andy Shevchenko
2019-02-01 15:08 ` Lee Jones
2019-02-08 12:59 ` Andy Shevchenko
2019-02-12 8:49 ` Lee Jones
2019-02-12 8:49 ` Lee Jones
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).