linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/10] Remove acpi.h implicit include of of.h
@ 2023-04-05 20:27 Rob Herring
  2023-04-05 20:27 ` [PATCH v2 01/10] iio: adc: ad7292: Add explicit include for of.h Rob Herring
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Rob Herring @ 2023-04-05 20:27 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Marcelo Schmitt,
	Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Greg Kroah-Hartman, Johannes Berg, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jiri Slaby, Thierry Reding,
	Jonathan Hunter, Marc Zyngier
  Cc: linux-iio, linux-kernel, linux-staging, linux-wireless, netdev,
	linux-serial, linux-tegra, linux-acpi, devicetree,
	Stephen Rothwell, Jacob Keller, Jonathan Cameron

In the process of cleaning up DT includes, I found that some drivers 
using DT functions could build without any explicit DT include. I traced 
the include to be coming from acpi.h via irqdomain.h.

I was pleasantly surprised that there were not 100s or even 10s of 
warnings when breaking the include chain. So here's the resulting 
series.

I'd suggest Rafael take the whole series. Alternatively,the fixes can be 
applied in 6.4 and then the last patch either after rc1 or the 
following cycle.

Compile tested on x86 and powerpc allmodconfig and arm64 allmodconfig 
minus CONFIG_ACPI.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Changes in v2:
- More explicit include fixes reported by Stephen
- Link to v1: https://lore.kernel.org/r/20230329-acpi-header-cleanup-v1-0-8dc5cd3c610e@kernel.org

---
Rob Herring (10):
      iio: adc: ad7292: Add explicit include for of.h
      staging: iio: resolver: ad2s1210: Add explicit include for of.h
      net: rfkill-gpio: Add explicit include for of.h
      serial: 8250_tegra: Add explicit include for of.h
      ata: pata_macio: Add explicit include of irqdomain.h
      pata: ixp4xx: Add explicit include for of.h
      virtio-mmio: Add explicit include for of.h
      tpm: atmel: Add explicit include for of.h
      fpga: lattice-sysconfig-spi: Add explicit include for of.h
      ACPI: Replace irqdomain.h include with struct declarations

 drivers/ata/pata_ixp4xx_cf.c            | 1 +
 drivers/ata/pata_macio.c                | 1 +
 drivers/char/tpm/tpm_atmel.h            | 2 +-
 drivers/fpga/lattice-sysconfig-spi.c    | 1 +
 drivers/iio/adc/ad7292.c                | 1 +
 drivers/staging/iio/resolver/ad2s1210.c | 1 +
 drivers/tty/serial/8250/8250_tegra.c    | 1 +
 drivers/virtio/virtio_mmio.c            | 1 +
 include/linux/acpi.h                    | 6 ++++--
 net/rfkill/rfkill-gpio.c                | 1 +
 10 files changed, 13 insertions(+), 3 deletions(-)
---
base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
change-id: 20230329-acpi-header-cleanup-665331828436

Best regards,
-- 
Rob Herring <robh@kernel.org>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 01/10] iio: adc: ad7292: Add explicit include for of.h
  2023-04-05 20:27 [PATCH v2 00/10] Remove acpi.h implicit include of of.h Rob Herring
@ 2023-04-05 20:27 ` Rob Herring
  2023-04-05 20:27 ` [PATCH v2 02/10] staging: iio: resolver: ad2s1210: " Rob Herring
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Rob Herring @ 2023-04-05 20:27 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Marcelo Schmitt,
	Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Greg Kroah-Hartman, Johannes Berg, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jiri Slaby, Thierry Reding,
	Jonathan Hunter, Marc Zyngier
  Cc: linux-iio, linux-kernel, linux-staging, linux-wireless, netdev,
	linux-serial, linux-tegra, linux-acpi, devicetree,
	Stephen Rothwell, Jacob Keller, Jonathan Cameron

With linux/acpi.h no longer implicitly including of.h, add an explicit
include of of.h to fix the following error:

drivers/iio/adc/ad7292.c:307:9: error: implicit declaration of function 'for_each_available_child_of_node'; did you mean 'fwnode_for_each_available_child_node'? [-Werror=implicit-function-declaration]

Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/iio/adc/ad7292.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/adc/ad7292.c b/drivers/iio/adc/ad7292.c
index a2f9fda25ff3..cccacec5db6d 100644
--- a/drivers/iio/adc/ad7292.c
+++ b/drivers/iio/adc/ad7292.c
@@ -8,6 +8,7 @@
 #include <linux/bitfield.h>
 #include <linux/device.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/regulator/consumer.h>
 #include <linux/spi/spi.h>
 

-- 
2.39.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 02/10] staging: iio: resolver: ad2s1210: Add explicit include for of.h
  2023-04-05 20:27 [PATCH v2 00/10] Remove acpi.h implicit include of of.h Rob Herring
  2023-04-05 20:27 ` [PATCH v2 01/10] iio: adc: ad7292: Add explicit include for of.h Rob Herring
@ 2023-04-05 20:27 ` Rob Herring
  2023-04-05 20:27 ` [PATCH v2 03/10] net: rfkill-gpio: " Rob Herring
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Rob Herring @ 2023-04-05 20:27 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Marcelo Schmitt,
	Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Greg Kroah-Hartman, Johannes Berg, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jiri Slaby, Thierry Reding,
	Jonathan Hunter, Marc Zyngier
  Cc: linux-iio, linux-kernel, linux-staging, linux-wireless, netdev,
	linux-serial, linux-tegra, linux-acpi, devicetree,
	Stephen Rothwell, Jacob Keller, Jonathan Cameron

With linux/acpi.h no longer implicitly including of.h, add an explicit
include of of.h to fix the following error:

drivers/staging/iio/resolver/ad2s1210.c:706:21: error: implicit declaration of function 'of_match_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/staging/iio/resolver/ad2s1210.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c
index e4cf42438487..eb364639fa58 100644
--- a/drivers/staging/iio/resolver/ad2s1210.c
+++ b/drivers/staging/iio/resolver/ad2s1210.c
@@ -7,6 +7,7 @@
 #include <linux/types.h>
 #include <linux/mutex.h>
 #include <linux/device.h>
+#include <linux/of.h>
 #include <linux/spi/spi.h>
 #include <linux/slab.h>
 #include <linux/sysfs.h>

-- 
2.39.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 03/10] net: rfkill-gpio: Add explicit include for of.h
  2023-04-05 20:27 [PATCH v2 00/10] Remove acpi.h implicit include of of.h Rob Herring
  2023-04-05 20:27 ` [PATCH v2 01/10] iio: adc: ad7292: Add explicit include for of.h Rob Herring
  2023-04-05 20:27 ` [PATCH v2 02/10] staging: iio: resolver: ad2s1210: " Rob Herring
@ 2023-04-05 20:27 ` Rob Herring
  2023-04-05 20:27 ` [PATCH v2 04/10] serial: 8250_tegra: " Rob Herring
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Rob Herring @ 2023-04-05 20:27 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Marcelo Schmitt,
	Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Greg Kroah-Hartman, Johannes Berg, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jiri Slaby, Thierry Reding,
	Jonathan Hunter, Marc Zyngier
  Cc: linux-iio, linux-kernel, linux-staging, linux-wireless, netdev,
	linux-serial, linux-tegra, linux-acpi, devicetree,
	Stephen Rothwell, Jacob Keller

With linux/acpi.h no longer implicitly including of.h, add an explicit
include of of.h to fix the following error:

net/rfkill/rfkill-gpio.c:181:21: error: implicit declaration of function 'of_match_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

Acked-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rob Herring <robh@kernel.org>
---
 net/rfkill/rfkill-gpio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c
index 786dbfdad772..e9d1b2f2ff0a 100644
--- a/net/rfkill/rfkill-gpio.c
+++ b/net/rfkill/rfkill-gpio.c
@@ -8,6 +8,7 @@
 #include <linux/module.h>
 #include <linux/mod_devicetable.h>
 #include <linux/rfkill.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 #include <linux/slab.h>

-- 
2.39.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 04/10] serial: 8250_tegra: Add explicit include for of.h
  2023-04-05 20:27 [PATCH v2 00/10] Remove acpi.h implicit include of of.h Rob Herring
                   ` (2 preceding siblings ...)
  2023-04-05 20:27 ` [PATCH v2 03/10] net: rfkill-gpio: " Rob Herring
@ 2023-04-05 20:27 ` Rob Herring
  2023-04-06  8:00   ` Thierry Reding
  2023-04-05 20:27 ` [PATCH v2 05/10] ata: pata_macio: Add explicit include of irqdomain.h Rob Herring
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 13+ messages in thread
From: Rob Herring @ 2023-04-05 20:27 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Marcelo Schmitt,
	Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Greg Kroah-Hartman, Johannes Berg, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jiri Slaby, Thierry Reding,
	Jonathan Hunter, Marc Zyngier
  Cc: linux-iio, linux-kernel, linux-staging, linux-wireless, netdev,
	linux-serial, linux-tegra, linux-acpi, devicetree,
	Stephen Rothwell, Jacob Keller

With linux/acpi.h no longer implicitly including of.h, add an explicit
include of of.h to fix the following error:

drivers/tty/serial/8250/8250_tegra.c:68:15: error: implicit declaration of function 'of_alias_get_id' [-Werror=implicit-function-declaration]

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/tty/serial/8250/8250_tegra.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/8250/8250_tegra.c b/drivers/tty/serial/8250/8250_tegra.c
index e7cddeec9d8e..2509e7f74ccf 100644
--- a/drivers/tty/serial/8250/8250_tegra.c
+++ b/drivers/tty/serial/8250/8250_tegra.c
@@ -11,6 +11,7 @@
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/reset.h>
 #include <linux/slab.h>
 

-- 
2.39.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 05/10] ata: pata_macio: Add explicit include of irqdomain.h
  2023-04-05 20:27 [PATCH v2 00/10] Remove acpi.h implicit include of of.h Rob Herring
                   ` (3 preceding siblings ...)
  2023-04-05 20:27 ` [PATCH v2 04/10] serial: 8250_tegra: " Rob Herring
@ 2023-04-05 20:27 ` Rob Herring
  2023-04-05 20:27 ` [PATCH v2 06/10] pata: ixp4xx: Add explicit include for of.h Rob Herring
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Rob Herring @ 2023-04-05 20:27 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Marcelo Schmitt,
	Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Greg Kroah-Hartman, Johannes Berg, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jiri Slaby, Thierry Reding,
	Jonathan Hunter, Marc Zyngier
  Cc: linux-iio, linux-kernel, linux-staging, linux-wireless, netdev,
	linux-serial, linux-tegra, linux-acpi, devicetree,
	Stephen Rothwell, Jacob Keller

With linux/acpi.h no longer including irqdomain.h, add an explicit
include of irqdomain.h to fix the following error:

drivers/ata/pata_macio.c:1172:23: error: implicit declaration of function 'irq_create_mapping' [-Werror=implicit-function-declaration]

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Rob Herring <robh@kernel.org>
---
v2: New patch
---
 drivers/ata/pata_macio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c
index 9ccaac9e2bc3..335e339a7ada 100644
--- a/drivers/ata/pata_macio.c
+++ b/drivers/ata/pata_macio.c
@@ -21,6 +21,7 @@
 #include <linux/adb.h>
 #include <linux/pmu.h>
 #include <linux/scatterlist.h>
+#include <linux/irqdomain.h>
 #include <linux/of.h>
 #include <linux/gfp.h>
 #include <linux/pci.h>

-- 
2.39.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 06/10] pata: ixp4xx: Add explicit include for of.h
  2023-04-05 20:27 [PATCH v2 00/10] Remove acpi.h implicit include of of.h Rob Herring
                   ` (4 preceding siblings ...)
  2023-04-05 20:27 ` [PATCH v2 05/10] ata: pata_macio: Add explicit include of irqdomain.h Rob Herring
@ 2023-04-05 20:27 ` Rob Herring
  2023-04-05 20:27 ` [PATCH v2 07/10] virtio-mmio: " Rob Herring
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Rob Herring @ 2023-04-05 20:27 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Marcelo Schmitt,
	Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Greg Kroah-Hartman, Johannes Berg, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jiri Slaby, Thierry Reding,
	Jonathan Hunter, Marc Zyngier
  Cc: linux-iio, linux-kernel, linux-staging, linux-wireless, netdev,
	linux-serial, linux-tegra, linux-acpi, devicetree,
	Stephen Rothwell, Jacob Keller

With linux/acpi.h no longer implicitly including of.h, add an explicit
include of of.h to fix the following error:

drivers/ata/pata_ixp4xx_cf.c:258:15: error: implicit declaration of function 'of_property_read_u32_index'; did you mean 'fwnode_property_read_u32_array'? [-Werror=implicit-function-declaration]

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Rob Herring <robh@kernel.org>
---
v2: New patch
---
 drivers/ata/pata_ixp4xx_cf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c
index e225913a619d..113087665832 100644
--- a/drivers/ata/pata_ixp4xx_cf.c
+++ b/drivers/ata/pata_ixp4xx_cf.c
@@ -17,6 +17,7 @@
 #include <linux/module.h>
 #include <linux/libata.h>
 #include <linux/irq.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 #include <scsi/scsi_host.h>

-- 
2.39.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 07/10] virtio-mmio: Add explicit include for of.h
  2023-04-05 20:27 [PATCH v2 00/10] Remove acpi.h implicit include of of.h Rob Herring
                   ` (5 preceding siblings ...)
  2023-04-05 20:27 ` [PATCH v2 06/10] pata: ixp4xx: Add explicit include for of.h Rob Herring
@ 2023-04-05 20:27 ` Rob Herring
  2023-04-05 20:27 ` [PATCH v2 08/10] tpm: atmel: " Rob Herring
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Rob Herring @ 2023-04-05 20:27 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Marcelo Schmitt,
	Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Greg Kroah-Hartman, Johannes Berg, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jiri Slaby, Thierry Reding,
	Jonathan Hunter, Marc Zyngier
  Cc: linux-iio, linux-kernel, linux-staging, linux-wireless, netdev,
	linux-serial, linux-tegra, linux-acpi, devicetree,
	Stephen Rothwell, Jacob Keller

With linux/acpi.h no longer implicitly including of.h, add an explicit
include of of.h to fix the following error:

drivers/virtio/virtio_mmio.c:492:13: error: implicit declaration of function 'of_property_read_bool'; did you mean 'fwnode_property_read_bool'? [-Werror=implicit-function-declaration]

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Rob Herring <robh@kernel.org>
---
v2: New patch
---
 drivers/virtio/virtio_mmio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 3ff746e3f24a..4b5e883055ee 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -61,6 +61,7 @@
 #include <linux/io.h>
 #include <linux/list.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm.h>
 #include <linux/slab.h>

-- 
2.39.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 08/10] tpm: atmel: Add explicit include for of.h
  2023-04-05 20:27 [PATCH v2 00/10] Remove acpi.h implicit include of of.h Rob Herring
                   ` (6 preceding siblings ...)
  2023-04-05 20:27 ` [PATCH v2 07/10] virtio-mmio: " Rob Herring
@ 2023-04-05 20:27 ` Rob Herring
  2023-04-05 20:27 ` [PATCH v2 09/10] fpga: lattice-sysconfig-spi: " Rob Herring
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Rob Herring @ 2023-04-05 20:27 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Marcelo Schmitt,
	Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Greg Kroah-Hartman, Johannes Berg, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jiri Slaby, Thierry Reding,
	Jonathan Hunter, Marc Zyngier
  Cc: linux-iio, linux-kernel, linux-staging, linux-wireless, netdev,
	linux-serial, linux-tegra, linux-acpi, devicetree,
	Stephen Rothwell, Jacob Keller

With linux/acpi.h (in linux/tpm.h) no longer implicitly including of.h,
add an explicit include of of.h to fix the following errors:

drivers/char/tpm/tpm_atmel.h:50:14: error: implicit declaration of function 'of_find_node_by_name'; did you mean 'bus_find_device_by_name'? [-Werror=implicit-function-declaration]
drivers/char/tpm/tpm_atmel.h:50:12: error: assignment to 'struct device_node *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
drivers/char/tpm/tpm_atmel.h:55:14: error: implicit declaration of function 'of_device_is_compatible'; did you mean 'fwnode_device_is_compatible'? [-Werror=implicit-function-declaration]
...

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Rob Herring <robh@kernel.org>
---
v2: New patch
---
 drivers/char/tpm/tpm_atmel.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/tpm/tpm_atmel.h b/drivers/char/tpm/tpm_atmel.h
index ba37e77e8af3..7ac3f69dcf0f 100644
--- a/drivers/char/tpm/tpm_atmel.h
+++ b/drivers/char/tpm/tpm_atmel.h
@@ -26,7 +26,7 @@ struct tpm_atmel_priv {
 
 #ifdef CONFIG_PPC64
 
-#include <asm/prom.h>
+#include <linux/of.h>
 
 #define atmel_getb(priv, offset) readb(priv->iobase + offset)
 #define atmel_putb(val, priv, offset) writeb(val, priv->iobase + offset)

-- 
2.39.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 09/10] fpga: lattice-sysconfig-spi: Add explicit include for of.h
  2023-04-05 20:27 [PATCH v2 00/10] Remove acpi.h implicit include of of.h Rob Herring
                   ` (7 preceding siblings ...)
  2023-04-05 20:27 ` [PATCH v2 08/10] tpm: atmel: " Rob Herring
@ 2023-04-05 20:27 ` Rob Herring
  2023-04-05 20:27 ` [PATCH v2 10/10] ACPI: Replace irqdomain.h include with struct declarations Rob Herring
  2023-04-06 18:40 ` [PATCH v2 00/10] Remove acpi.h implicit include of of.h Rafael J. Wysocki
  10 siblings, 0 replies; 13+ messages in thread
From: Rob Herring @ 2023-04-05 20:27 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Marcelo Schmitt,
	Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Greg Kroah-Hartman, Johannes Berg, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jiri Slaby, Thierry Reding,
	Jonathan Hunter, Marc Zyngier
  Cc: linux-iio, linux-kernel, linux-staging, linux-wireless, netdev,
	linux-serial, linux-tegra, linux-acpi, devicetree,
	Stephen Rothwell, Jacob Keller

With linux/acpi.h (in spi/spi.h) no longer implicitly including of.h,
add an explicit include of of.h to fix the following errors:

drivers/fpga/lattice-sysconfig-spi.c:146:35: error: implicit declaration of function 'of_match_ptr' [-Werror=implicit-function-declaration]

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Rob Herring <robh@kernel.org>
---
v2: New patch
---
 drivers/fpga/lattice-sysconfig-spi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/fpga/lattice-sysconfig-spi.c b/drivers/fpga/lattice-sysconfig-spi.c
index 2702b26b7f55..44691cfcf50a 100644
--- a/drivers/fpga/lattice-sysconfig-spi.c
+++ b/drivers/fpga/lattice-sysconfig-spi.c
@@ -3,6 +3,7 @@
  * Lattice FPGA programming over slave SPI sysCONFIG interface.
  */
 
+#include <linux/of.h>
 #include <linux/spi/spi.h>
 
 #include "lattice-sysconfig.h"

-- 
2.39.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 10/10] ACPI: Replace irqdomain.h include with struct declarations
  2023-04-05 20:27 [PATCH v2 00/10] Remove acpi.h implicit include of of.h Rob Herring
                   ` (8 preceding siblings ...)
  2023-04-05 20:27 ` [PATCH v2 09/10] fpga: lattice-sysconfig-spi: " Rob Herring
@ 2023-04-05 20:27 ` Rob Herring
  2023-04-06 18:40 ` [PATCH v2 00/10] Remove acpi.h implicit include of of.h Rafael J. Wysocki
  10 siblings, 0 replies; 13+ messages in thread
From: Rob Herring @ 2023-04-05 20:27 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Marcelo Schmitt,
	Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Greg Kroah-Hartman, Johannes Berg, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jiri Slaby, Thierry Reding,
	Jonathan Hunter, Marc Zyngier
  Cc: linux-iio, linux-kernel, linux-staging, linux-wireless, netdev,
	linux-serial, linux-tegra, linux-acpi, devicetree,
	Stephen Rothwell, Jacob Keller

linux/acpi.h includes irqdomain.h which includes of.h. Break the include
chain by replacing the irqdomain include with forward declarations for
struct irq_domain and irq_domain_ops which is sufficient for acpi.h.

of.h also includes mod_devicetable.h which many drivers implicitly
depend on. As acpi.h already includes it, just move it out of the
'#ifdef CONFIG_ACPI'.

Cc: Marc Zyngier <maz@kernel.org>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rob Herring <robh@kernel.org>
---
v2:
 - Move mod_devicetable.h out of #ifdef
---
 include/linux/acpi.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index efff750f326d..96bd672dc336 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -10,12 +10,15 @@
 
 #include <linux/errno.h>
 #include <linux/ioport.h>	/* for struct resource */
-#include <linux/irqdomain.h>
 #include <linux/resource_ext.h>
 #include <linux/device.h>
+#include <linux/mod_devicetable.h>
 #include <linux/property.h>
 #include <linux/uuid.h>
 
+struct irq_domain;
+struct irq_domain_ops;
+
 #ifndef _LINUX
 #define _LINUX
 #endif
@@ -24,7 +27,6 @@
 #ifdef	CONFIG_ACPI
 
 #include <linux/list.h>
-#include <linux/mod_devicetable.h>
 #include <linux/dynamic_debug.h>
 #include <linux/module.h>
 #include <linux/mutex.h>

-- 
2.39.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 04/10] serial: 8250_tegra: Add explicit include for of.h
  2023-04-05 20:27 ` [PATCH v2 04/10] serial: 8250_tegra: " Rob Herring
@ 2023-04-06  8:00   ` Thierry Reding
  0 siblings, 0 replies; 13+ messages in thread
From: Thierry Reding @ 2023-04-06  8:00 UTC (permalink / raw)
  To: Rob Herring
  Cc: Rafael J. Wysocki, Len Brown, Marcelo Schmitt,
	Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Greg Kroah-Hartman, Johannes Berg, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jiri Slaby, Jonathan Hunter,
	Marc Zyngier, linux-iio, linux-kernel, linux-staging,
	linux-wireless, netdev, linux-serial, linux-tegra, linux-acpi,
	devicetree, Stephen Rothwell, Jacob Keller

[-- Attachment #1: Type: text/plain, Size: 692 bytes --]

On Wed, Apr 05, 2023 at 03:27:18PM -0500, Rob Herring wrote:
> With linux/acpi.h no longer implicitly including of.h, add an explicit
> include of of.h to fix the following error:
> 
> drivers/tty/serial/8250/8250_tegra.c:68:15: error: implicit declaration of function 'of_alias_get_id' [-Werror=implicit-function-declaration]
> 
> Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  drivers/tty/serial/8250/8250_tegra.c | 1 +
>  1 file changed, 1 insertion(+)

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 00/10] Remove acpi.h implicit include of of.h
  2023-04-05 20:27 [PATCH v2 00/10] Remove acpi.h implicit include of of.h Rob Herring
                   ` (9 preceding siblings ...)
  2023-04-05 20:27 ` [PATCH v2 10/10] ACPI: Replace irqdomain.h include with struct declarations Rob Herring
@ 2023-04-06 18:40 ` Rafael J. Wysocki
  10 siblings, 0 replies; 13+ messages in thread
From: Rafael J. Wysocki @ 2023-04-06 18:40 UTC (permalink / raw)
  To: Rob Herring
  Cc: Rafael J. Wysocki, Len Brown, Marcelo Schmitt,
	Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Greg Kroah-Hartman, Johannes Berg, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jiri Slaby, Thierry Reding,
	Jonathan Hunter, Marc Zyngier, linux-iio, linux-kernel,
	linux-staging, linux-wireless, netdev, linux-serial, linux-tegra,
	linux-acpi, devicetree, Stephen Rothwell, Jacob Keller,
	Jonathan Cameron

On Wed, Apr 5, 2023 at 10:27 PM Rob Herring <robh@kernel.org> wrote:
>
> In the process of cleaning up DT includes, I found that some drivers
> using DT functions could build without any explicit DT include. I traced
> the include to be coming from acpi.h via irqdomain.h.
>
> I was pleasantly surprised that there were not 100s or even 10s of
> warnings when breaking the include chain. So here's the resulting
> series.
>
> I'd suggest Rafael take the whole series. Alternatively,the fixes can be
> applied in 6.4 and then the last patch either after rc1 or the
> following cycle.
>
> Compile tested on x86 and powerpc allmodconfig and arm64 allmodconfig
> minus CONFIG_ACPI.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Changes in v2:
> - More explicit include fixes reported by Stephen
> - Link to v1: https://lore.kernel.org/r/20230329-acpi-header-cleanup-v1-0-8dc5cd3c610e@kernel.org
>
> ---
> Rob Herring (10):
>       iio: adc: ad7292: Add explicit include for of.h
>       staging: iio: resolver: ad2s1210: Add explicit include for of.h
>       net: rfkill-gpio: Add explicit include for of.h
>       serial: 8250_tegra: Add explicit include for of.h
>       ata: pata_macio: Add explicit include of irqdomain.h
>       pata: ixp4xx: Add explicit include for of.h
>       virtio-mmio: Add explicit include for of.h
>       tpm: atmel: Add explicit include for of.h
>       fpga: lattice-sysconfig-spi: Add explicit include for of.h
>       ACPI: Replace irqdomain.h include with struct declarations
>
>  drivers/ata/pata_ixp4xx_cf.c            | 1 +
>  drivers/ata/pata_macio.c                | 1 +
>  drivers/char/tpm/tpm_atmel.h            | 2 +-
>  drivers/fpga/lattice-sysconfig-spi.c    | 1 +
>  drivers/iio/adc/ad7292.c                | 1 +
>  drivers/staging/iio/resolver/ad2s1210.c | 1 +
>  drivers/tty/serial/8250/8250_tegra.c    | 1 +
>  drivers/virtio/virtio_mmio.c            | 1 +
>  include/linux/acpi.h                    | 6 ++++--
>  net/rfkill/rfkill-gpio.c                | 1 +
>  10 files changed, 13 insertions(+), 3 deletions(-)
> ---
> base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
> change-id: 20230329-acpi-header-cleanup-665331828436

All applied as 6.4 material, thanks!

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-04-06 18:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-05 20:27 [PATCH v2 00/10] Remove acpi.h implicit include of of.h Rob Herring
2023-04-05 20:27 ` [PATCH v2 01/10] iio: adc: ad7292: Add explicit include for of.h Rob Herring
2023-04-05 20:27 ` [PATCH v2 02/10] staging: iio: resolver: ad2s1210: " Rob Herring
2023-04-05 20:27 ` [PATCH v2 03/10] net: rfkill-gpio: " Rob Herring
2023-04-05 20:27 ` [PATCH v2 04/10] serial: 8250_tegra: " Rob Herring
2023-04-06  8:00   ` Thierry Reding
2023-04-05 20:27 ` [PATCH v2 05/10] ata: pata_macio: Add explicit include of irqdomain.h Rob Herring
2023-04-05 20:27 ` [PATCH v2 06/10] pata: ixp4xx: Add explicit include for of.h Rob Herring
2023-04-05 20:27 ` [PATCH v2 07/10] virtio-mmio: " Rob Herring
2023-04-05 20:27 ` [PATCH v2 08/10] tpm: atmel: " Rob Herring
2023-04-05 20:27 ` [PATCH v2 09/10] fpga: lattice-sysconfig-spi: " Rob Herring
2023-04-05 20:27 ` [PATCH v2 10/10] ACPI: Replace irqdomain.h include with struct declarations Rob Herring
2023-04-06 18:40 ` [PATCH v2 00/10] Remove acpi.h implicit include of of.h Rafael J. Wysocki

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).