All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/19] DT header disentangling, part 1
@ 2023-03-29 15:51 ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:51 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

This is the first of a series of clean-ups to disentangle the DT 
includes. There's a decade plus old comment in of_device.h:

 #include <linux/of_platform.h> /* temporary until merge */

Who's this Grant person that wrote this? ;)

It gets better. of_device.h also pulls in of.h, and of_platform.h 
includes of_device.h. So naturally, drivers include all combinations of 
those 3 headers and sometimes they actually need them. 

I started on fixing this years ago, but just dropping the circular 
includes and fixing all the fallout was massive and didn't sit well. 
Pulling in of_device.h in all the drivers that happen to call only
of_device_get_match_data/of_match_device didn't seem great when the rest 
of of_device.h would never be needed. of_device.h being everything that 
works on a struct device is not a great split because several types of 
users deal with struct device. The better split seems to be by user 
(subsys driver vs. consumer) which several subsystems now do. For 
of_device.h, the users can primarily be split between bus 
implementations and device drivers. Device drivers also typically need 
of.h to read properties. So let's move of_device.h towards just bus 
related functions and move device driver related functions to of.h.

This series is just the first step. It makes a couple of clean-ups to 
replace some includes with forward declarations. It moves 
of_device_get_match_data() and of_cpu_device_node_get() to of.h. The 
former move is transparent for now and preparation for the next series.
The last part of the series updates drivers using 
of_cpu_device_node_get() and/or relying on the implicit cpu.h include 
which is removed in the last patch.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Rob Herring (19):
      of: Make devtree_lock declaration private
      of: Move of_device_(add|register|unregister) to of_platform.h
      of: Move of_device_get_match_data() declaration
      of: Move CPU node related functions to their own file
      of: Drop unnecessary includes in headers
      ARM: sunxi: Drop of_device.h include
      ARM: cpuidle: Drop of_device.h include
      riscv: Add explicit include for cpu.h
      riscv: cacheinfo: Adjust includes to remove of_device.h
      cacheinfo: Adjust includes to remove of_device.h
      clocksource: ingenic: Add explicit include for cpuhotplug.h
      thermal: cpuidle_cooling: Adjust includes to remove of_device.h
      soc: mediatek: mtk-svs: Add explicit include for cpu.h
      cpufreq: Adjust includes to remove of_device.h
      cpufreq: sun50i: Add explicit include for cpu.h
      cpuidle: Adjust includes to remove of_device.h
      irqchip: loongson-eiointc: Add explicit include for cpuhotplug.h
      OPP: Adjust includes to remove of_device.h
      of: Drop cpu.h include from of_device.h

 arch/arm/kernel/cpuidle.c              |   1 -
 arch/arm/mach-sunxi/mc_smp.c           |   1 -
 arch/riscv/kernel/cacheinfo.c          |   1 -
 arch/riscv/kernel/setup.c              |   2 +-
 arch/sparc/include/asm/prom.h          |   3 +
 drivers/base/cacheinfo.c               |   2 +-
 drivers/clocksource/ingenic-timer.c    |   3 +-
 drivers/cpufreq/cpufreq-dt-platdev.c   |   1 -
 drivers/cpufreq/kirkwood-cpufreq.c     |   2 +-
 drivers/cpufreq/maple-cpufreq.c        |   2 +-
 drivers/cpufreq/pmac32-cpufreq.c       |   2 +-
 drivers/cpufreq/pmac64-cpufreq.c       |   2 +-
 drivers/cpufreq/qcom-cpufreq-hw.c      |   4 +-
 drivers/cpufreq/spear-cpufreq.c        |   2 +-
 drivers/cpufreq/sun50i-cpufreq-nvmem.c |   3 +-
 drivers/cpufreq/tegra124-cpufreq.c     |   1 -
 drivers/cpufreq/tegra20-cpufreq.c      |   2 +-
 drivers/cpuidle/cpuidle-psci.c         |   1 -
 drivers/cpuidle/cpuidle-qcom-spm.c     |   3 +-
 drivers/cpuidle/cpuidle-riscv-sbi.c    |   2 +-
 drivers/cpuidle/dt_idle_states.c       |   1 -
 drivers/irqchip/irq-loongson-eiointc.c |   5 +-
 drivers/of/Makefile                    |   2 +-
 drivers/of/base.c                      | 187 -----------------------------
 drivers/of/cpu.c                       | 210 +++++++++++++++++++++++++++++++++
 drivers/of/of_private.h                |   1 +
 drivers/opp/of.c                       |   2 +-
 drivers/soc/mediatek/mtk-svs.c         |   1 +
 drivers/thermal/cpuidle_cooling.c      |   3 +-
 include/linux/cpufreq.h                |   1 -
 include/linux/of.h                     |  28 +++--
 include/linux/of_device.h              |  24 +---
 include/linux/of_platform.h            |  10 +-
 33 files changed, 261 insertions(+), 254 deletions(-)
---
base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
change-id: 20230329-dt-cpu-header-cleanups-c7bed8c0b352

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


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 00/19] DT header disentangling, part 1
@ 2023-03-29 15:51 ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:51 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

This is the first of a series of clean-ups to disentangle the DT 
includes. There's a decade plus old comment in of_device.h:

 #include <linux/of_platform.h> /* temporary until merge */

Who's this Grant person that wrote this? ;)

It gets better. of_device.h also pulls in of.h, and of_platform.h 
includes of_device.h. So naturally, drivers include all combinations of 
those 3 headers and sometimes they actually need them. 

I started on fixing this years ago, but just dropping the circular 
includes and fixing all the fallout was massive and didn't sit well. 
Pulling in of_device.h in all the drivers that happen to call only
of_device_get_match_data/of_match_device didn't seem great when the rest 
of of_device.h would never be needed. of_device.h being everything that 
works on a struct device is not a great split because several types of 
users deal with struct device. The better split seems to be by user 
(subsys driver vs. consumer) which several subsystems now do. For 
of_device.h, the users can primarily be split between bus 
implementations and device drivers. Device drivers also typically need 
of.h to read properties. So let's move of_device.h towards just bus 
related functions and move device driver related functions to of.h.

This series is just the first step. It makes a couple of clean-ups to 
replace some includes with forward declarations. It moves 
of_device_get_match_data() and of_cpu_device_node_get() to of.h. The 
former move is transparent for now and preparation for the next series.
The last part of the series updates drivers using 
of_cpu_device_node_get() and/or relying on the implicit cpu.h include 
which is removed in the last patch.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Rob Herring (19):
      of: Make devtree_lock declaration private
      of: Move of_device_(add|register|unregister) to of_platform.h
      of: Move of_device_get_match_data() declaration
      of: Move CPU node related functions to their own file
      of: Drop unnecessary includes in headers
      ARM: sunxi: Drop of_device.h include
      ARM: cpuidle: Drop of_device.h include
      riscv: Add explicit include for cpu.h
      riscv: cacheinfo: Adjust includes to remove of_device.h
      cacheinfo: Adjust includes to remove of_device.h
      clocksource: ingenic: Add explicit include for cpuhotplug.h
      thermal: cpuidle_cooling: Adjust includes to remove of_device.h
      soc: mediatek: mtk-svs: Add explicit include for cpu.h
      cpufreq: Adjust includes to remove of_device.h
      cpufreq: sun50i: Add explicit include for cpu.h
      cpuidle: Adjust includes to remove of_device.h
      irqchip: loongson-eiointc: Add explicit include for cpuhotplug.h
      OPP: Adjust includes to remove of_device.h
      of: Drop cpu.h include from of_device.h

 arch/arm/kernel/cpuidle.c              |   1 -
 arch/arm/mach-sunxi/mc_smp.c           |   1 -
 arch/riscv/kernel/cacheinfo.c          |   1 -
 arch/riscv/kernel/setup.c              |   2 +-
 arch/sparc/include/asm/prom.h          |   3 +
 drivers/base/cacheinfo.c               |   2 +-
 drivers/clocksource/ingenic-timer.c    |   3 +-
 drivers/cpufreq/cpufreq-dt-platdev.c   |   1 -
 drivers/cpufreq/kirkwood-cpufreq.c     |   2 +-
 drivers/cpufreq/maple-cpufreq.c        |   2 +-
 drivers/cpufreq/pmac32-cpufreq.c       |   2 +-
 drivers/cpufreq/pmac64-cpufreq.c       |   2 +-
 drivers/cpufreq/qcom-cpufreq-hw.c      |   4 +-
 drivers/cpufreq/spear-cpufreq.c        |   2 +-
 drivers/cpufreq/sun50i-cpufreq-nvmem.c |   3 +-
 drivers/cpufreq/tegra124-cpufreq.c     |   1 -
 drivers/cpufreq/tegra20-cpufreq.c      |   2 +-
 drivers/cpuidle/cpuidle-psci.c         |   1 -
 drivers/cpuidle/cpuidle-qcom-spm.c     |   3 +-
 drivers/cpuidle/cpuidle-riscv-sbi.c    |   2 +-
 drivers/cpuidle/dt_idle_states.c       |   1 -
 drivers/irqchip/irq-loongson-eiointc.c |   5 +-
 drivers/of/Makefile                    |   2 +-
 drivers/of/base.c                      | 187 -----------------------------
 drivers/of/cpu.c                       | 210 +++++++++++++++++++++++++++++++++
 drivers/of/of_private.h                |   1 +
 drivers/opp/of.c                       |   2 +-
 drivers/soc/mediatek/mtk-svs.c         |   1 +
 drivers/thermal/cpuidle_cooling.c      |   3 +-
 include/linux/cpufreq.h                |   1 -
 include/linux/of.h                     |  28 +++--
 include/linux/of_device.h              |  24 +---
 include/linux/of_platform.h            |  10 +-
 33 files changed, 261 insertions(+), 254 deletions(-)
---
base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
change-id: 20230329-dt-cpu-header-cleanups-c7bed8c0b352

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


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

* [PATCH 00/19] DT header disentangling, part 1
@ 2023-03-29 15:51 ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:51 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

This is the first of a series of clean-ups to disentangle the DT 
includes. There's a decade plus old comment in of_device.h:

 #include <linux/of_platform.h> /* temporary until merge */

Who's this Grant person that wrote this? ;)

It gets better. of_device.h also pulls in of.h, and of_platform.h 
includes of_device.h. So naturally, drivers include all combinations of 
those 3 headers and sometimes they actually need them. 

I started on fixing this years ago, but just dropping the circular 
includes and fixing all the fallout was massive and didn't sit well. 
Pulling in of_device.h in all the drivers that happen to call only
of_device_get_match_data/of_match_device didn't seem great when the rest 
of of_device.h would never be needed. of_device.h being everything that 
works on a struct device is not a great split because several types of 
users deal with struct device. The better split seems to be by user 
(subsys driver vs. consumer) which several subsystems now do. For 
of_device.h, the users can primarily be split between bus 
implementations and device drivers. Device drivers also typically need 
of.h to read properties. So let's move of_device.h towards just bus 
related functions and move device driver related functions to of.h.

This series is just the first step. It makes a couple of clean-ups to 
replace some includes with forward declarations. It moves 
of_device_get_match_data() and of_cpu_device_node_get() to of.h. The 
former move is transparent for now and preparation for the next series.
The last part of the series updates drivers using 
of_cpu_device_node_get() and/or relying on the implicit cpu.h include 
which is removed in the last patch.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Rob Herring (19):
      of: Make devtree_lock declaration private
      of: Move of_device_(add|register|unregister) to of_platform.h
      of: Move of_device_get_match_data() declaration
      of: Move CPU node related functions to their own file
      of: Drop unnecessary includes in headers
      ARM: sunxi: Drop of_device.h include
      ARM: cpuidle: Drop of_device.h include
      riscv: Add explicit include for cpu.h
      riscv: cacheinfo: Adjust includes to remove of_device.h
      cacheinfo: Adjust includes to remove of_device.h
      clocksource: ingenic: Add explicit include for cpuhotplug.h
      thermal: cpuidle_cooling: Adjust includes to remove of_device.h
      soc: mediatek: mtk-svs: Add explicit include for cpu.h
      cpufreq: Adjust includes to remove of_device.h
      cpufreq: sun50i: Add explicit include for cpu.h
      cpuidle: Adjust includes to remove of_device.h
      irqchip: loongson-eiointc: Add explicit include for cpuhotplug.h
      OPP: Adjust includes to remove of_device.h
      of: Drop cpu.h include from of_device.h

 arch/arm/kernel/cpuidle.c              |   1 -
 arch/arm/mach-sunxi/mc_smp.c           |   1 -
 arch/riscv/kernel/cacheinfo.c          |   1 -
 arch/riscv/kernel/setup.c              |   2 +-
 arch/sparc/include/asm/prom.h          |   3 +
 drivers/base/cacheinfo.c               |   2 +-
 drivers/clocksource/ingenic-timer.c    |   3 +-
 drivers/cpufreq/cpufreq-dt-platdev.c   |   1 -
 drivers/cpufreq/kirkwood-cpufreq.c     |   2 +-
 drivers/cpufreq/maple-cpufreq.c        |   2 +-
 drivers/cpufreq/pmac32-cpufreq.c       |   2 +-
 drivers/cpufreq/pmac64-cpufreq.c       |   2 +-
 drivers/cpufreq/qcom-cpufreq-hw.c      |   4 +-
 drivers/cpufreq/spear-cpufreq.c        |   2 +-
 drivers/cpufreq/sun50i-cpufreq-nvmem.c |   3 +-
 drivers/cpufreq/tegra124-cpufreq.c     |   1 -
 drivers/cpufreq/tegra20-cpufreq.c      |   2 +-
 drivers/cpuidle/cpuidle-psci.c         |   1 -
 drivers/cpuidle/cpuidle-qcom-spm.c     |   3 +-
 drivers/cpuidle/cpuidle-riscv-sbi.c    |   2 +-
 drivers/cpuidle/dt_idle_states.c       |   1 -
 drivers/irqchip/irq-loongson-eiointc.c |   5 +-
 drivers/of/Makefile                    |   2 +-
 drivers/of/base.c                      | 187 -----------------------------
 drivers/of/cpu.c                       | 210 +++++++++++++++++++++++++++++++++
 drivers/of/of_private.h                |   1 +
 drivers/opp/of.c                       |   2 +-
 drivers/soc/mediatek/mtk-svs.c         |   1 +
 drivers/thermal/cpuidle_cooling.c      |   3 +-
 include/linux/cpufreq.h                |   1 -
 include/linux/of.h                     |  28 +++--
 include/linux/of_device.h              |  24 +---
 include/linux/of_platform.h            |  10 +-
 33 files changed, 261 insertions(+), 254 deletions(-)
---
base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
change-id: 20230329-dt-cpu-header-cleanups-c7bed8c0b352

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


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

* [PATCH 01/19] of: Make devtree_lock declaration private
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:51   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:51 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Sparc is the only place devtree_lock is used outside of drivers/of/.
Move the devtree_lock declaration into of_private.h and Sparc's prom.h
so pulling in spinlock.h to of.h can be avoided for everything besides
Sparc.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 arch/sparc/include/asm/prom.h | 3 +++
 drivers/of/of_private.h       | 1 +
 include/linux/of.h            | 2 --
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index 587edb8b5a65..8184575b1336 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -19,11 +19,14 @@
 #include <linux/mutex.h>
 #include <linux/atomic.h>
 #include <linux/irqdomain.h>
+#include <linux/spinlock.h>
 
 #define of_compat_cmp(s1, s2, l)	strncmp((s1), (s2), (l))
 #define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcmp((s1), (s2))
 
+extern raw_spinlock_t devtree_lock;
+
 struct of_irq_controller {
 	unsigned int	(*irq_build)(struct device_node *, unsigned int, void *);
 	void		*data;
diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h
index fb6792d381a6..b57f1014e419 100644
--- a/drivers/of/of_private.h
+++ b/drivers/of/of_private.h
@@ -38,6 +38,7 @@ struct alias_prop {
 #define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
 
 extern struct mutex of_mutex;
+extern raw_spinlock_t devtree_lock;
 extern struct list_head aliases_lookup;
 extern struct kset *of_kset;
 
diff --git a/include/linux/of.h b/include/linux/of.h
index 0af611307db2..36cf94596eba 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -16,7 +16,6 @@
 #include <linux/errno.h>
 #include <linux/kobject.h>
 #include <linux/mod_devicetable.h>
-#include <linux/spinlock.h>
 #include <linux/topology.h>
 #include <linux/notifier.h>
 #include <linux/property.h>
@@ -145,7 +144,6 @@ extern struct device_node *of_root;
 extern struct device_node *of_chosen;
 extern struct device_node *of_aliases;
 extern struct device_node *of_stdout;
-extern raw_spinlock_t devtree_lock;
 
 /*
  * struct device_node flag descriptions

-- 
2.39.2


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

* [PATCH 01/19] of: Make devtree_lock declaration private
@ 2023-03-29 15:51   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:51 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Sparc is the only place devtree_lock is used outside of drivers/of/.
Move the devtree_lock declaration into of_private.h and Sparc's prom.h
so pulling in spinlock.h to of.h can be avoided for everything besides
Sparc.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 arch/sparc/include/asm/prom.h | 3 +++
 drivers/of/of_private.h       | 1 +
 include/linux/of.h            | 2 --
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index 587edb8b5a65..8184575b1336 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -19,11 +19,14 @@
 #include <linux/mutex.h>
 #include <linux/atomic.h>
 #include <linux/irqdomain.h>
+#include <linux/spinlock.h>
 
 #define of_compat_cmp(s1, s2, l)	strncmp((s1), (s2), (l))
 #define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcmp((s1), (s2))
 
+extern raw_spinlock_t devtree_lock;
+
 struct of_irq_controller {
 	unsigned int	(*irq_build)(struct device_node *, unsigned int, void *);
 	void		*data;
diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h
index fb6792d381a6..b57f1014e419 100644
--- a/drivers/of/of_private.h
+++ b/drivers/of/of_private.h
@@ -38,6 +38,7 @@ struct alias_prop {
 #define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
 
 extern struct mutex of_mutex;
+extern raw_spinlock_t devtree_lock;
 extern struct list_head aliases_lookup;
 extern struct kset *of_kset;
 
diff --git a/include/linux/of.h b/include/linux/of.h
index 0af611307db2..36cf94596eba 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -16,7 +16,6 @@
 #include <linux/errno.h>
 #include <linux/kobject.h>
 #include <linux/mod_devicetable.h>
-#include <linux/spinlock.h>
 #include <linux/topology.h>
 #include <linux/notifier.h>
 #include <linux/property.h>
@@ -145,7 +144,6 @@ extern struct device_node *of_root;
 extern struct device_node *of_chosen;
 extern struct device_node *of_aliases;
 extern struct device_node *of_stdout;
-extern raw_spinlock_t devtree_lock;
 
 /*
  * struct device_node flag descriptions

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 01/19] of: Make devtree_lock declaration private
@ 2023-03-29 15:51   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:51 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

Sparc is the only place devtree_lock is used outside of drivers/of/.
Move the devtree_lock declaration into of_private.h and Sparc's prom.h
so pulling in spinlock.h to of.h can be avoided for everything besides
Sparc.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 arch/sparc/include/asm/prom.h | 3 +++
 drivers/of/of_private.h       | 1 +
 include/linux/of.h            | 2 --
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index 587edb8b5a65..8184575b1336 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -19,11 +19,14 @@
 #include <linux/mutex.h>
 #include <linux/atomic.h>
 #include <linux/irqdomain.h>
+#include <linux/spinlock.h>
 
 #define of_compat_cmp(s1, s2, l)	strncmp((s1), (s2), (l))
 #define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2))
 #define of_node_cmp(s1, s2)		strcmp((s1), (s2))
 
+extern raw_spinlock_t devtree_lock;
+
 struct of_irq_controller {
 	unsigned int	(*irq_build)(struct device_node *, unsigned int, void *);
 	void		*data;
diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h
index fb6792d381a6..b57f1014e419 100644
--- a/drivers/of/of_private.h
+++ b/drivers/of/of_private.h
@@ -38,6 +38,7 @@ struct alias_prop {
 #define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
 
 extern struct mutex of_mutex;
+extern raw_spinlock_t devtree_lock;
 extern struct list_head aliases_lookup;
 extern struct kset *of_kset;
 
diff --git a/include/linux/of.h b/include/linux/of.h
index 0af611307db2..36cf94596eba 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -16,7 +16,6 @@
 #include <linux/errno.h>
 #include <linux/kobject.h>
 #include <linux/mod_devicetable.h>
-#include <linux/spinlock.h>
 #include <linux/topology.h>
 #include <linux/notifier.h>
 #include <linux/property.h>
@@ -145,7 +144,6 @@ extern struct device_node *of_root;
 extern struct device_node *of_chosen;
 extern struct device_node *of_aliases;
 extern struct device_node *of_stdout;
-extern raw_spinlock_t devtree_lock;
 
 /*
  * struct device_node flag descriptions

-- 
2.39.2


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

* [PATCH 02/19] of: Move of_device_(add|register|unregister) to of_platform.h
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:51   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:51 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

As of_device_(add|register|unregister) functions work on struct
platform_device, they should be declared in of_platform.h instead.

This move is transparent for now as both headers include each other.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 include/linux/of_device.h   | 4 ----
 include/linux/of_platform.h | 5 +++++
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index f4b57614979d..e4aa61cb2bd0 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -26,10 +26,6 @@ static inline int of_driver_match_device(struct device *dev,
 	return of_match_device(drv->of_match_table, dev) != NULL;
 }
 
-extern int of_device_add(struct platform_device *pdev);
-extern int of_device_register(struct platform_device *ofdev);
-extern void of_device_unregister(struct platform_device *ofdev);
-
 extern const void *of_device_get_match_data(const struct device *dev);
 
 extern ssize_t of_device_modalias(struct device *dev, char *str, ssize_t len);
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index d15b6cd5e1c3..8ac5cb933dc3 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -52,6 +52,11 @@ extern const struct of_device_id of_default_bus_match_table[];
 extern struct platform_device *of_device_alloc(struct device_node *np,
 					 const char *bus_id,
 					 struct device *parent);
+
+extern int of_device_add(struct platform_device *pdev);
+extern int of_device_register(struct platform_device *ofdev);
+extern void of_device_unregister(struct platform_device *ofdev);
+
 #ifdef CONFIG_OF
 extern struct platform_device *of_find_device_by_node(struct device_node *np);
 #else

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 02/19] of: Move of_device_(add|register|unregister) to of_platform.h
@ 2023-03-29 15:51   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:51 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

As of_device_(add|register|unregister) functions work on struct
platform_device, they should be declared in of_platform.h instead.

This move is transparent for now as both headers include each other.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 include/linux/of_device.h   | 4 ----
 include/linux/of_platform.h | 5 +++++
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index f4b57614979d..e4aa61cb2bd0 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -26,10 +26,6 @@ static inline int of_driver_match_device(struct device *dev,
 	return of_match_device(drv->of_match_table, dev) != NULL;
 }
 
-extern int of_device_add(struct platform_device *pdev);
-extern int of_device_register(struct platform_device *ofdev);
-extern void of_device_unregister(struct platform_device *ofdev);
-
 extern const void *of_device_get_match_data(const struct device *dev);
 
 extern ssize_t of_device_modalias(struct device *dev, char *str, ssize_t len);
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index d15b6cd5e1c3..8ac5cb933dc3 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -52,6 +52,11 @@ extern const struct of_device_id of_default_bus_match_table[];
 extern struct platform_device *of_device_alloc(struct device_node *np,
 					 const char *bus_id,
 					 struct device *parent);
+
+extern int of_device_add(struct platform_device *pdev);
+extern int of_device_register(struct platform_device *ofdev);
+extern void of_device_unregister(struct platform_device *ofdev);
+
 #ifdef CONFIG_OF
 extern struct platform_device *of_find_device_by_node(struct device_node *np);
 #else

-- 
2.39.2


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

* [PATCH 02/19] of: Move of_device_(add|register|unregister) to of_platform.h
@ 2023-03-29 15:51   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:51 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

As of_device_(add|register|unregister) functions work on struct
platform_device, they should be declared in of_platform.h instead.

This move is transparent for now as both headers include each other.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 include/linux/of_device.h   | 4 ----
 include/linux/of_platform.h | 5 +++++
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index f4b57614979d..e4aa61cb2bd0 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -26,10 +26,6 @@ static inline int of_driver_match_device(struct device *dev,
 	return of_match_device(drv->of_match_table, dev) != NULL;
 }
 
-extern int of_device_add(struct platform_device *pdev);
-extern int of_device_register(struct platform_device *ofdev);
-extern void of_device_unregister(struct platform_device *ofdev);
-
 extern const void *of_device_get_match_data(const struct device *dev);
 
 extern ssize_t of_device_modalias(struct device *dev, char *str, ssize_t len);
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index d15b6cd5e1c3..8ac5cb933dc3 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -52,6 +52,11 @@ extern const struct of_device_id of_default_bus_match_table[];
 extern struct platform_device *of_device_alloc(struct device_node *np,
 					 const char *bus_id,
 					 struct device *parent);
+
+extern int of_device_add(struct platform_device *pdev);
+extern int of_device_register(struct platform_device *ofdev);
+extern void of_device_unregister(struct platform_device *ofdev);
+
 #ifdef CONFIG_OF
 extern struct platform_device *of_find_device_by_node(struct device_node *np);
 #else

-- 
2.39.2


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

* [PATCH 03/19] of: Move of_device_get_match_data() declaration
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:52   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

of_device.h mostly defines functions for bus drivers whereas
of_device_get_match_data() is used by drivers. Let's move it to of.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 include/linux/of.h        | 2 ++
 include/linux/of_device.h | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/of.h b/include/linux/of.h
index 36cf94596eba..b7118d68c73a 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -416,6 +416,8 @@ extern int of_detach_node(struct device_node *);
 
 #define of_match_ptr(_ptr)	(_ptr)
 
+extern const void *of_device_get_match_data(const struct device *dev);
+
 /*
  * struct property *prop;
  * const __be32 *p;
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index e4aa61cb2bd0..6af4c3acd502 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -26,8 +26,6 @@ static inline int of_driver_match_device(struct device *dev,
 	return of_match_device(drv->of_match_table, dev) != NULL;
 }
 
-extern const void *of_device_get_match_data(const struct device *dev);
-
 extern ssize_t of_device_modalias(struct device *dev, char *str, ssize_t len);
 extern int of_device_request_module(struct device *dev);
 

-- 
2.39.2


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

* [PATCH 03/19] of: Move of_device_get_match_data() declaration
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

of_device.h mostly defines functions for bus drivers whereas
of_device_get_match_data() is used by drivers. Let's move it to of.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 include/linux/of.h        | 2 ++
 include/linux/of_device.h | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/of.h b/include/linux/of.h
index 36cf94596eba..b7118d68c73a 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -416,6 +416,8 @@ extern int of_detach_node(struct device_node *);
 
 #define of_match_ptr(_ptr)	(_ptr)
 
+extern const void *of_device_get_match_data(const struct device *dev);
+
 /*
  * struct property *prop;
  * const __be32 *p;
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index e4aa61cb2bd0..6af4c3acd502 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -26,8 +26,6 @@ static inline int of_driver_match_device(struct device *dev,
 	return of_match_device(drv->of_match_table, dev) != NULL;
 }
 
-extern const void *of_device_get_match_data(const struct device *dev);
-
 extern ssize_t of_device_modalias(struct device *dev, char *str, ssize_t len);
 extern int of_device_request_module(struct device *dev);
 

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 03/19] of: Move of_device_get_match_data() declaration
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

of_device.h mostly defines functions for bus drivers whereas
of_device_get_match_data() is used by drivers. Let's move it to of.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 include/linux/of.h        | 2 ++
 include/linux/of_device.h | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/of.h b/include/linux/of.h
index 36cf94596eba..b7118d68c73a 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -416,6 +416,8 @@ extern int of_detach_node(struct device_node *);
 
 #define of_match_ptr(_ptr)	(_ptr)
 
+extern const void *of_device_get_match_data(const struct device *dev);
+
 /*
  * struct property *prop;
  * const __be32 *p;
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index e4aa61cb2bd0..6af4c3acd502 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -26,8 +26,6 @@ static inline int of_driver_match_device(struct device *dev,
 	return of_match_device(drv->of_match_table, dev) != NULL;
 }
 
-extern const void *of_device_get_match_data(const struct device *dev);
-
 extern ssize_t of_device_modalias(struct device *dev, char *str, ssize_t len);
 extern int of_device_request_module(struct device *dev);
 

-- 
2.39.2


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

* [PATCH 04/19] of: Move CPU node related functions to their own file
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:52   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

drivers/of/base.c is quite long and we've accumulated a number of CPU
node functions. Let's move them to a new file, cpu.c, along with the
lone of_cpu_device_node_get() in of_device.h. Moving the declaration has
no effect yet as of.h is included by of_device.h. This serves as
preparation to disentangle the includes in of_device.h and
of_platform.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/of/Makefile       |   2 +-
 drivers/of/base.c         | 187 -----------------------------------------
 drivers/of/cpu.c          | 210 ++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/of.h        |  19 +++--
 include/linux/of_device.h |  14 ----
 5 files changed, 223 insertions(+), 209 deletions(-)

diff --git a/drivers/of/Makefile b/drivers/of/Makefile
index e0360a44306e..10f704592561 100644
--- a/drivers/of/Makefile
+++ b/drivers/of/Makefile
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
-obj-y = base.o device.o platform.o property.o
+obj-y = base.o cpu.o device.o platform.o property.o
 obj-$(CONFIG_OF_KOBJ) += kobj.o
 obj-$(CONFIG_OF_DYNAMIC) += dynamic.o
 obj-$(CONFIG_OF_FLATTREE) += fdt.o
diff --git a/drivers/of/base.c b/drivers/of/base.c
index ac6fde53342f..7f1720af813c 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -286,193 +286,6 @@ const void *of_get_property(const struct device_node *np, const char *name,
 }
 EXPORT_SYMBOL(of_get_property);
 
-/**
- * of_get_cpu_hwid - Get the hardware ID from a CPU device node
- *
- * @cpun: CPU number(logical index) for which device node is required
- * @thread: The local thread number to get the hardware ID for.
- *
- * Return: The hardware ID for the CPU node or ~0ULL if not found.
- */
-u64 of_get_cpu_hwid(struct device_node *cpun, unsigned int thread)
-{
-	const __be32 *cell;
-	int ac, len;
-
-	ac = of_n_addr_cells(cpun);
-	cell = of_get_property(cpun, "reg", &len);
-	if (!cell || !ac || ((sizeof(*cell) * ac * (thread + 1)) > len))
-		return ~0ULL;
-
-	cell += ac * thread;
-	return of_read_number(cell, ac);
-}
-
-/*
- * arch_match_cpu_phys_id - Match the given logical CPU and physical id
- *
- * @cpu: logical cpu index of a core/thread
- * @phys_id: physical identifier of a core/thread
- *
- * CPU logical to physical index mapping is architecture specific.
- * However this __weak function provides a default match of physical
- * id to logical cpu index. phys_id provided here is usually values read
- * from the device tree which must match the hardware internal registers.
- *
- * Returns true if the physical identifier and the logical cpu index
- * correspond to the same core/thread, false otherwise.
- */
-bool __weak arch_match_cpu_phys_id(int cpu, u64 phys_id)
-{
-	return (u32)phys_id == cpu;
-}
-
-/*
- * Checks if the given "prop_name" property holds the physical id of the
- * core/thread corresponding to the logical cpu 'cpu'. If 'thread' is not
- * NULL, local thread number within the core is returned in it.
- */
-static bool __of_find_n_match_cpu_property(struct device_node *cpun,
-			const char *prop_name, int cpu, unsigned int *thread)
-{
-	const __be32 *cell;
-	int ac, prop_len, tid;
-	u64 hwid;
-
-	ac = of_n_addr_cells(cpun);
-	cell = of_get_property(cpun, prop_name, &prop_len);
-	if (!cell && !ac && arch_match_cpu_phys_id(cpu, 0))
-		return true;
-	if (!cell || !ac)
-		return false;
-	prop_len /= sizeof(*cell) * ac;
-	for (tid = 0; tid < prop_len; tid++) {
-		hwid = of_read_number(cell, ac);
-		if (arch_match_cpu_phys_id(cpu, hwid)) {
-			if (thread)
-				*thread = tid;
-			return true;
-		}
-		cell += ac;
-	}
-	return false;
-}
-
-/*
- * arch_find_n_match_cpu_physical_id - See if the given device node is
- * for the cpu corresponding to logical cpu 'cpu'.  Return true if so,
- * else false.  If 'thread' is non-NULL, the local thread number within the
- * core is returned in it.
- */
-bool __weak arch_find_n_match_cpu_physical_id(struct device_node *cpun,
-					      int cpu, unsigned int *thread)
-{
-	/* Check for non-standard "ibm,ppc-interrupt-server#s" property
-	 * for thread ids on PowerPC. If it doesn't exist fallback to
-	 * standard "reg" property.
-	 */
-	if (IS_ENABLED(CONFIG_PPC) &&
-	    __of_find_n_match_cpu_property(cpun,
-					   "ibm,ppc-interrupt-server#s",
-					   cpu, thread))
-		return true;
-
-	return __of_find_n_match_cpu_property(cpun, "reg", cpu, thread);
-}
-
-/**
- * of_get_cpu_node - Get device node associated with the given logical CPU
- *
- * @cpu: CPU number(logical index) for which device node is required
- * @thread: if not NULL, local thread number within the physical core is
- *          returned
- *
- * The main purpose of this function is to retrieve the device node for the
- * given logical CPU index. It should be used to initialize the of_node in
- * cpu device. Once of_node in cpu device is populated, all the further
- * references can use that instead.
- *
- * CPU logical to physical index mapping is architecture specific and is built
- * before booting secondary cores. This function uses arch_match_cpu_phys_id
- * which can be overridden by architecture specific implementation.
- *
- * Return: A node pointer for the logical cpu with refcount incremented, use
- * of_node_put() on it when done. Returns NULL if not found.
- */
-struct device_node *of_get_cpu_node(int cpu, unsigned int *thread)
-{
-	struct device_node *cpun;
-
-	for_each_of_cpu_node(cpun) {
-		if (arch_find_n_match_cpu_physical_id(cpun, cpu, thread))
-			return cpun;
-	}
-	return NULL;
-}
-EXPORT_SYMBOL(of_get_cpu_node);
-
-/**
- * of_cpu_node_to_id: Get the logical CPU number for a given device_node
- *
- * @cpu_node: Pointer to the device_node for CPU.
- *
- * Return: The logical CPU number of the given CPU device_node or -ENODEV if the
- * CPU is not found.
- */
-int of_cpu_node_to_id(struct device_node *cpu_node)
-{
-	int cpu;
-	bool found = false;
-	struct device_node *np;
-
-	for_each_possible_cpu(cpu) {
-		np = of_cpu_device_node_get(cpu);
-		found = (cpu_node == np);
-		of_node_put(np);
-		if (found)
-			return cpu;
-	}
-
-	return -ENODEV;
-}
-EXPORT_SYMBOL(of_cpu_node_to_id);
-
-/**
- * of_get_cpu_state_node - Get CPU's idle state node at the given index
- *
- * @cpu_node: The device node for the CPU
- * @index: The index in the list of the idle states
- *
- * Two generic methods can be used to describe a CPU's idle states, either via
- * a flattened description through the "cpu-idle-states" binding or via the
- * hierarchical layout, using the "power-domains" and the "domain-idle-states"
- * bindings. This function check for both and returns the idle state node for
- * the requested index.
- *
- * Return: An idle state node if found at @index. The refcount is incremented
- * for it, so call of_node_put() on it when done. Returns NULL if not found.
- */
-struct device_node *of_get_cpu_state_node(struct device_node *cpu_node,
-					  int index)
-{
-	struct of_phandle_args args;
-	int err;
-
-	err = of_parse_phandle_with_args(cpu_node, "power-domains",
-					"#power-domain-cells", 0, &args);
-	if (!err) {
-		struct device_node *state_node =
-			of_parse_phandle(args.np, "domain-idle-states", index);
-
-		of_node_put(args.np);
-		if (state_node)
-			return state_node;
-	}
-
-	return of_parse_phandle(cpu_node, "cpu-idle-states", index);
-}
-EXPORT_SYMBOL(of_get_cpu_state_node);
-
 /**
  * __of_device_is_compatible() - Check if the node matches given constraints
  * @device: pointer to node
diff --git a/drivers/of/cpu.c b/drivers/of/cpu.c
new file mode 100644
index 000000000000..d17b2f851082
--- /dev/null
+++ b/drivers/of/cpu.c
@@ -0,0 +1,210 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <linux/cpu.h>
+#include <linux/kernel.h>
+#include <linux/of.h>
+
+/**
+ * of_get_cpu_hwid - Get the hardware ID from a CPU device node
+ *
+ * @cpun: CPU number(logical index) for which device node is required
+ * @thread: The local thread number to get the hardware ID for.
+ *
+ * Return: The hardware ID for the CPU node or ~0ULL if not found.
+ */
+u64 of_get_cpu_hwid(struct device_node *cpun, unsigned int thread)
+{
+	const __be32 *cell;
+	int ac, len;
+
+	ac = of_n_addr_cells(cpun);
+	cell = of_get_property(cpun, "reg", &len);
+	if (!cell || !ac || ((sizeof(*cell) * ac * (thread + 1)) > len))
+		return ~0ULL;
+
+	cell += ac * thread;
+	return of_read_number(cell, ac);
+}
+
+/*
+ * arch_match_cpu_phys_id - Match the given logical CPU and physical id
+ *
+ * @cpu: logical cpu index of a core/thread
+ * @phys_id: physical identifier of a core/thread
+ *
+ * CPU logical to physical index mapping is architecture specific.
+ * However this __weak function provides a default match of physical
+ * id to logical cpu index. phys_id provided here is usually values read
+ * from the device tree which must match the hardware internal registers.
+ *
+ * Returns true if the physical identifier and the logical cpu index
+ * correspond to the same core/thread, false otherwise.
+ */
+bool __weak arch_match_cpu_phys_id(int cpu, u64 phys_id)
+{
+	return (u32)phys_id == cpu;
+}
+
+/*
+ * Checks if the given "prop_name" property holds the physical id of the
+ * core/thread corresponding to the logical cpu 'cpu'. If 'thread' is not
+ * NULL, local thread number within the core is returned in it.
+ */
+static bool __of_find_n_match_cpu_property(struct device_node *cpun,
+			const char *prop_name, int cpu, unsigned int *thread)
+{
+	const __be32 *cell;
+	int ac, prop_len, tid;
+	u64 hwid;
+
+	ac = of_n_addr_cells(cpun);
+	cell = of_get_property(cpun, prop_name, &prop_len);
+	if (!cell && !ac && arch_match_cpu_phys_id(cpu, 0))
+		return true;
+	if (!cell || !ac)
+		return false;
+	prop_len /= sizeof(*cell) * ac;
+	for (tid = 0; tid < prop_len; tid++) {
+		hwid = of_read_number(cell, ac);
+		if (arch_match_cpu_phys_id(cpu, hwid)) {
+			if (thread)
+				*thread = tid;
+			return true;
+		}
+		cell += ac;
+	}
+	return false;
+}
+
+/*
+ * arch_find_n_match_cpu_physical_id - See if the given device node is
+ * for the cpu corresponding to logical cpu 'cpu'.  Return true if so,
+ * else false.  If 'thread' is non-NULL, the local thread number within the
+ * core is returned in it.
+ */
+bool __weak arch_find_n_match_cpu_physical_id(struct device_node *cpun,
+					      int cpu, unsigned int *thread)
+{
+	/* Check for non-standard "ibm,ppc-interrupt-server#s" property
+	 * for thread ids on PowerPC. If it doesn't exist fallback to
+	 * standard "reg" property.
+	 */
+	if (IS_ENABLED(CONFIG_PPC) &&
+	    __of_find_n_match_cpu_property(cpun,
+					   "ibm,ppc-interrupt-server#s",
+					   cpu, thread))
+		return true;
+
+	return __of_find_n_match_cpu_property(cpun, "reg", cpu, thread);
+}
+
+/**
+ * of_get_cpu_node - Get device node associated with the given logical CPU
+ *
+ * @cpu: CPU number(logical index) for which device node is required
+ * @thread: if not NULL, local thread number within the physical core is
+ *          returned
+ *
+ * The main purpose of this function is to retrieve the device node for the
+ * given logical CPU index. It should be used to initialize the of_node in
+ * cpu device. Once of_node in cpu device is populated, all the further
+ * references can use that instead.
+ *
+ * CPU logical to physical index mapping is architecture specific and is built
+ * before booting secondary cores. This function uses arch_match_cpu_phys_id
+ * which can be overridden by architecture specific implementation.
+ *
+ * Return: A node pointer for the logical cpu with refcount incremented, use
+ * of_node_put() on it when done. Returns NULL if not found.
+ */
+struct device_node *of_get_cpu_node(int cpu, unsigned int *thread)
+{
+	struct device_node *cpun;
+
+	for_each_of_cpu_node(cpun) {
+		if (arch_find_n_match_cpu_physical_id(cpun, cpu, thread))
+			return cpun;
+	}
+	return NULL;
+}
+EXPORT_SYMBOL(of_get_cpu_node);
+
+/**
+ * of_cpu_device_node_get: Get the CPU device_node for a given logical CPU number
+ *
+ * @cpu: The logical CPU number
+ *
+ * Return: Pointer to the device_node for CPU with its reference count
+ * incremented of the given logical CPU number or NULL if the CPU device_node
+ * is not found.
+ */
+struct device_node *of_cpu_device_node_get(int cpu)
+{
+	struct device *cpu_dev;
+	cpu_dev = get_cpu_device(cpu);
+	if (!cpu_dev)
+		return of_get_cpu_node(cpu, NULL);
+	return of_node_get(cpu_dev->of_node);
+}
+EXPORT_SYMBOL(of_cpu_device_node_get);
+
+/**
+ * of_cpu_node_to_id: Get the logical CPU number for a given device_node
+ *
+ * @cpu_node: Pointer to the device_node for CPU.
+ *
+ * Return: The logical CPU number of the given CPU device_node or -ENODEV if the
+ * CPU is not found.
+ */
+int of_cpu_node_to_id(struct device_node *cpu_node)
+{
+	int cpu;
+	bool found = false;
+	struct device_node *np;
+
+	for_each_possible_cpu(cpu) {
+		np = of_cpu_device_node_get(cpu);
+		found = (cpu_node == np);
+		of_node_put(np);
+		if (found)
+			return cpu;
+	}
+
+	return -ENODEV;
+}
+EXPORT_SYMBOL(of_cpu_node_to_id);
+
+/**
+ * of_get_cpu_state_node - Get CPU's idle state node at the given index
+ *
+ * @cpu_node: The device node for the CPU
+ * @index: The index in the list of the idle states
+ *
+ * Two generic methods can be used to describe a CPU's idle states, either via
+ * a flattened description through the "cpu-idle-states" binding or via the
+ * hierarchical layout, using the "power-domains" and the "domain-idle-states"
+ * bindings. This function check for both and returns the idle state node for
+ * the requested index.
+ *
+ * Return: An idle state node if found at @index. The refcount is incremented
+ * for it, so call of_node_put() on it when done. Returns NULL if not found.
+ */
+struct device_node *of_get_cpu_state_node(struct device_node *cpu_node,
+					  int index)
+{
+	struct of_phandle_args args;
+	int err;
+
+	err = of_parse_phandle_with_args(cpu_node, "power-domains",
+					"#power-domain-cells", 0, &args);
+	if (!err) {
+		struct device_node *state_node =
+			of_parse_phandle(args.np, "domain-idle-states", index);
+
+		of_node_put(args.np);
+		if (state_node)
+			return state_node;
+	}
+
+	return of_parse_phandle(cpu_node, "cpu-idle-states", index);
+}
+EXPORT_SYMBOL(of_get_cpu_state_node);
diff --git a/include/linux/of.h b/include/linux/of.h
index b7118d68c73a..1f1e847a1c13 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -359,6 +359,8 @@ extern const void *of_get_property(const struct device_node *node,
 				const char *name,
 				int *lenp);
 extern struct device_node *of_get_cpu_node(int cpu, unsigned int *thread);
+extern struct device_node *of_cpu_device_node_get(int cpu);
+extern int of_cpu_node_to_id(struct device_node *np);
 extern struct device_node *of_get_next_cpu_node(struct device_node *prev);
 extern struct device_node *of_get_cpu_state_node(struct device_node *cpu_node,
 						 int index);
@@ -439,8 +441,6 @@ const char *of_prop_next_string(struct property *prop, const char *cur);
 
 bool of_console_check(struct device_node *dn, char *name, int index);
 
-extern int of_cpu_node_to_id(struct device_node *np);
-
 int of_map_id(struct device_node *np, u32 id,
 	       const char *map_name, const char *map_mask_name,
 	       struct device_node **target, u32 *id_out);
@@ -635,6 +635,16 @@ static inline struct device_node *of_get_cpu_node(int cpu,
 	return NULL;
 }
 
+static inline struct device_node *of_cpu_device_node_get(int cpu)
+{
+	return NULL;
+}
+
+static inline int of_cpu_node_to_id(struct device_node *np)
+{
+	return -ENODEV;
+}
+
 static inline struct device_node *of_get_next_cpu_node(struct device_node *prev)
 {
 	return NULL;
@@ -837,11 +847,6 @@ static inline void of_property_clear_flag(struct property *p, unsigned long flag
 {
 }
 
-static inline int of_cpu_node_to_id(struct device_node *np)
-{
-	return -ENODEV;
-}
-
 static inline int of_map_id(struct device_node *np, u32 id,
 			     const char *map_name, const char *map_mask_name,
 			     struct device_node **target, u32 *id_out)
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index 6af4c3acd502..910951a22eb4 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -32,15 +32,6 @@ extern int of_device_request_module(struct device *dev);
 extern void of_device_uevent(const struct device *dev, struct kobj_uevent_env *env);
 extern int of_device_uevent_modalias(const struct device *dev, struct kobj_uevent_env *env);
 
-static inline struct device_node *of_cpu_device_node_get(int cpu)
-{
-	struct device *cpu_dev;
-	cpu_dev = get_cpu_device(cpu);
-	if (!cpu_dev)
-		return of_get_cpu_node(cpu, NULL);
-	return of_node_get(cpu_dev->of_node);
-}
-
 int of_dma_configure_id(struct device *dev,
 		     struct device_node *np,
 		     bool force_dma, const u32 *id);
@@ -89,11 +80,6 @@ static inline const struct of_device_id *of_match_device(
 	return NULL;
 }
 
-static inline struct device_node *of_cpu_device_node_get(int cpu)
-{
-	return NULL;
-}
-
 static inline int of_dma_configure_id(struct device *dev,
 				      struct device_node *np,
 				      bool force_dma,

-- 
2.39.2


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

* [PATCH 04/19] of: Move CPU node related functions to their own file
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

drivers/of/base.c is quite long and we've accumulated a number of CPU
node functions. Let's move them to a new file, cpu.c, along with the
lone of_cpu_device_node_get() in of_device.h. Moving the declaration has
no effect yet as of.h is included by of_device.h. This serves as
preparation to disentangle the includes in of_device.h and
of_platform.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/of/Makefile       |   2 +-
 drivers/of/base.c         | 187 -----------------------------------------
 drivers/of/cpu.c          | 210 ++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/of.h        |  19 +++--
 include/linux/of_device.h |  14 ----
 5 files changed, 223 insertions(+), 209 deletions(-)

diff --git a/drivers/of/Makefile b/drivers/of/Makefile
index e0360a44306e..10f704592561 100644
--- a/drivers/of/Makefile
+++ b/drivers/of/Makefile
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
-obj-y = base.o device.o platform.o property.o
+obj-y = base.o cpu.o device.o platform.o property.o
 obj-$(CONFIG_OF_KOBJ) += kobj.o
 obj-$(CONFIG_OF_DYNAMIC) += dynamic.o
 obj-$(CONFIG_OF_FLATTREE) += fdt.o
diff --git a/drivers/of/base.c b/drivers/of/base.c
index ac6fde53342f..7f1720af813c 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -286,193 +286,6 @@ const void *of_get_property(const struct device_node *np, const char *name,
 }
 EXPORT_SYMBOL(of_get_property);
 
-/**
- * of_get_cpu_hwid - Get the hardware ID from a CPU device node
- *
- * @cpun: CPU number(logical index) for which device node is required
- * @thread: The local thread number to get the hardware ID for.
- *
- * Return: The hardware ID for the CPU node or ~0ULL if not found.
- */
-u64 of_get_cpu_hwid(struct device_node *cpun, unsigned int thread)
-{
-	const __be32 *cell;
-	int ac, len;
-
-	ac = of_n_addr_cells(cpun);
-	cell = of_get_property(cpun, "reg", &len);
-	if (!cell || !ac || ((sizeof(*cell) * ac * (thread + 1)) > len))
-		return ~0ULL;
-
-	cell += ac * thread;
-	return of_read_number(cell, ac);
-}
-
-/*
- * arch_match_cpu_phys_id - Match the given logical CPU and physical id
- *
- * @cpu: logical cpu index of a core/thread
- * @phys_id: physical identifier of a core/thread
- *
- * CPU logical to physical index mapping is architecture specific.
- * However this __weak function provides a default match of physical
- * id to logical cpu index. phys_id provided here is usually values read
- * from the device tree which must match the hardware internal registers.
- *
- * Returns true if the physical identifier and the logical cpu index
- * correspond to the same core/thread, false otherwise.
- */
-bool __weak arch_match_cpu_phys_id(int cpu, u64 phys_id)
-{
-	return (u32)phys_id == cpu;
-}
-
-/*
- * Checks if the given "prop_name" property holds the physical id of the
- * core/thread corresponding to the logical cpu 'cpu'. If 'thread' is not
- * NULL, local thread number within the core is returned in it.
- */
-static bool __of_find_n_match_cpu_property(struct device_node *cpun,
-			const char *prop_name, int cpu, unsigned int *thread)
-{
-	const __be32 *cell;
-	int ac, prop_len, tid;
-	u64 hwid;
-
-	ac = of_n_addr_cells(cpun);
-	cell = of_get_property(cpun, prop_name, &prop_len);
-	if (!cell && !ac && arch_match_cpu_phys_id(cpu, 0))
-		return true;
-	if (!cell || !ac)
-		return false;
-	prop_len /= sizeof(*cell) * ac;
-	for (tid = 0; tid < prop_len; tid++) {
-		hwid = of_read_number(cell, ac);
-		if (arch_match_cpu_phys_id(cpu, hwid)) {
-			if (thread)
-				*thread = tid;
-			return true;
-		}
-		cell += ac;
-	}
-	return false;
-}
-
-/*
- * arch_find_n_match_cpu_physical_id - See if the given device node is
- * for the cpu corresponding to logical cpu 'cpu'.  Return true if so,
- * else false.  If 'thread' is non-NULL, the local thread number within the
- * core is returned in it.
- */
-bool __weak arch_find_n_match_cpu_physical_id(struct device_node *cpun,
-					      int cpu, unsigned int *thread)
-{
-	/* Check for non-standard "ibm,ppc-interrupt-server#s" property
-	 * for thread ids on PowerPC. If it doesn't exist fallback to
-	 * standard "reg" property.
-	 */
-	if (IS_ENABLED(CONFIG_PPC) &&
-	    __of_find_n_match_cpu_property(cpun,
-					   "ibm,ppc-interrupt-server#s",
-					   cpu, thread))
-		return true;
-
-	return __of_find_n_match_cpu_property(cpun, "reg", cpu, thread);
-}
-
-/**
- * of_get_cpu_node - Get device node associated with the given logical CPU
- *
- * @cpu: CPU number(logical index) for which device node is required
- * @thread: if not NULL, local thread number within the physical core is
- *          returned
- *
- * The main purpose of this function is to retrieve the device node for the
- * given logical CPU index. It should be used to initialize the of_node in
- * cpu device. Once of_node in cpu device is populated, all the further
- * references can use that instead.
- *
- * CPU logical to physical index mapping is architecture specific and is built
- * before booting secondary cores. This function uses arch_match_cpu_phys_id
- * which can be overridden by architecture specific implementation.
- *
- * Return: A node pointer for the logical cpu with refcount incremented, use
- * of_node_put() on it when done. Returns NULL if not found.
- */
-struct device_node *of_get_cpu_node(int cpu, unsigned int *thread)
-{
-	struct device_node *cpun;
-
-	for_each_of_cpu_node(cpun) {
-		if (arch_find_n_match_cpu_physical_id(cpun, cpu, thread))
-			return cpun;
-	}
-	return NULL;
-}
-EXPORT_SYMBOL(of_get_cpu_node);
-
-/**
- * of_cpu_node_to_id: Get the logical CPU number for a given device_node
- *
- * @cpu_node: Pointer to the device_node for CPU.
- *
- * Return: The logical CPU number of the given CPU device_node or -ENODEV if the
- * CPU is not found.
- */
-int of_cpu_node_to_id(struct device_node *cpu_node)
-{
-	int cpu;
-	bool found = false;
-	struct device_node *np;
-
-	for_each_possible_cpu(cpu) {
-		np = of_cpu_device_node_get(cpu);
-		found = (cpu_node == np);
-		of_node_put(np);
-		if (found)
-			return cpu;
-	}
-
-	return -ENODEV;
-}
-EXPORT_SYMBOL(of_cpu_node_to_id);
-
-/**
- * of_get_cpu_state_node - Get CPU's idle state node at the given index
- *
- * @cpu_node: The device node for the CPU
- * @index: The index in the list of the idle states
- *
- * Two generic methods can be used to describe a CPU's idle states, either via
- * a flattened description through the "cpu-idle-states" binding or via the
- * hierarchical layout, using the "power-domains" and the "domain-idle-states"
- * bindings. This function check for both and returns the idle state node for
- * the requested index.
- *
- * Return: An idle state node if found at @index. The refcount is incremented
- * for it, so call of_node_put() on it when done. Returns NULL if not found.
- */
-struct device_node *of_get_cpu_state_node(struct device_node *cpu_node,
-					  int index)
-{
-	struct of_phandle_args args;
-	int err;
-
-	err = of_parse_phandle_with_args(cpu_node, "power-domains",
-					"#power-domain-cells", 0, &args);
-	if (!err) {
-		struct device_node *state_node =
-			of_parse_phandle(args.np, "domain-idle-states", index);
-
-		of_node_put(args.np);
-		if (state_node)
-			return state_node;
-	}
-
-	return of_parse_phandle(cpu_node, "cpu-idle-states", index);
-}
-EXPORT_SYMBOL(of_get_cpu_state_node);
-
 /**
  * __of_device_is_compatible() - Check if the node matches given constraints
  * @device: pointer to node
diff --git a/drivers/of/cpu.c b/drivers/of/cpu.c
new file mode 100644
index 000000000000..d17b2f851082
--- /dev/null
+++ b/drivers/of/cpu.c
@@ -0,0 +1,210 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <linux/cpu.h>
+#include <linux/kernel.h>
+#include <linux/of.h>
+
+/**
+ * of_get_cpu_hwid - Get the hardware ID from a CPU device node
+ *
+ * @cpun: CPU number(logical index) for which device node is required
+ * @thread: The local thread number to get the hardware ID for.
+ *
+ * Return: The hardware ID for the CPU node or ~0ULL if not found.
+ */
+u64 of_get_cpu_hwid(struct device_node *cpun, unsigned int thread)
+{
+	const __be32 *cell;
+	int ac, len;
+
+	ac = of_n_addr_cells(cpun);
+	cell = of_get_property(cpun, "reg", &len);
+	if (!cell || !ac || ((sizeof(*cell) * ac * (thread + 1)) > len))
+		return ~0ULL;
+
+	cell += ac * thread;
+	return of_read_number(cell, ac);
+}
+
+/*
+ * arch_match_cpu_phys_id - Match the given logical CPU and physical id
+ *
+ * @cpu: logical cpu index of a core/thread
+ * @phys_id: physical identifier of a core/thread
+ *
+ * CPU logical to physical index mapping is architecture specific.
+ * However this __weak function provides a default match of physical
+ * id to logical cpu index. phys_id provided here is usually values read
+ * from the device tree which must match the hardware internal registers.
+ *
+ * Returns true if the physical identifier and the logical cpu index
+ * correspond to the same core/thread, false otherwise.
+ */
+bool __weak arch_match_cpu_phys_id(int cpu, u64 phys_id)
+{
+	return (u32)phys_id == cpu;
+}
+
+/*
+ * Checks if the given "prop_name" property holds the physical id of the
+ * core/thread corresponding to the logical cpu 'cpu'. If 'thread' is not
+ * NULL, local thread number within the core is returned in it.
+ */
+static bool __of_find_n_match_cpu_property(struct device_node *cpun,
+			const char *prop_name, int cpu, unsigned int *thread)
+{
+	const __be32 *cell;
+	int ac, prop_len, tid;
+	u64 hwid;
+
+	ac = of_n_addr_cells(cpun);
+	cell = of_get_property(cpun, prop_name, &prop_len);
+	if (!cell && !ac && arch_match_cpu_phys_id(cpu, 0))
+		return true;
+	if (!cell || !ac)
+		return false;
+	prop_len /= sizeof(*cell) * ac;
+	for (tid = 0; tid < prop_len; tid++) {
+		hwid = of_read_number(cell, ac);
+		if (arch_match_cpu_phys_id(cpu, hwid)) {
+			if (thread)
+				*thread = tid;
+			return true;
+		}
+		cell += ac;
+	}
+	return false;
+}
+
+/*
+ * arch_find_n_match_cpu_physical_id - See if the given device node is
+ * for the cpu corresponding to logical cpu 'cpu'.  Return true if so,
+ * else false.  If 'thread' is non-NULL, the local thread number within the
+ * core is returned in it.
+ */
+bool __weak arch_find_n_match_cpu_physical_id(struct device_node *cpun,
+					      int cpu, unsigned int *thread)
+{
+	/* Check for non-standard "ibm,ppc-interrupt-server#s" property
+	 * for thread ids on PowerPC. If it doesn't exist fallback to
+	 * standard "reg" property.
+	 */
+	if (IS_ENABLED(CONFIG_PPC) &&
+	    __of_find_n_match_cpu_property(cpun,
+					   "ibm,ppc-interrupt-server#s",
+					   cpu, thread))
+		return true;
+
+	return __of_find_n_match_cpu_property(cpun, "reg", cpu, thread);
+}
+
+/**
+ * of_get_cpu_node - Get device node associated with the given logical CPU
+ *
+ * @cpu: CPU number(logical index) for which device node is required
+ * @thread: if not NULL, local thread number within the physical core is
+ *          returned
+ *
+ * The main purpose of this function is to retrieve the device node for the
+ * given logical CPU index. It should be used to initialize the of_node in
+ * cpu device. Once of_node in cpu device is populated, all the further
+ * references can use that instead.
+ *
+ * CPU logical to physical index mapping is architecture specific and is built
+ * before booting secondary cores. This function uses arch_match_cpu_phys_id
+ * which can be overridden by architecture specific implementation.
+ *
+ * Return: A node pointer for the logical cpu with refcount incremented, use
+ * of_node_put() on it when done. Returns NULL if not found.
+ */
+struct device_node *of_get_cpu_node(int cpu, unsigned int *thread)
+{
+	struct device_node *cpun;
+
+	for_each_of_cpu_node(cpun) {
+		if (arch_find_n_match_cpu_physical_id(cpun, cpu, thread))
+			return cpun;
+	}
+	return NULL;
+}
+EXPORT_SYMBOL(of_get_cpu_node);
+
+/**
+ * of_cpu_device_node_get: Get the CPU device_node for a given logical CPU number
+ *
+ * @cpu: The logical CPU number
+ *
+ * Return: Pointer to the device_node for CPU with its reference count
+ * incremented of the given logical CPU number or NULL if the CPU device_node
+ * is not found.
+ */
+struct device_node *of_cpu_device_node_get(int cpu)
+{
+	struct device *cpu_dev;
+	cpu_dev = get_cpu_device(cpu);
+	if (!cpu_dev)
+		return of_get_cpu_node(cpu, NULL);
+	return of_node_get(cpu_dev->of_node);
+}
+EXPORT_SYMBOL(of_cpu_device_node_get);
+
+/**
+ * of_cpu_node_to_id: Get the logical CPU number for a given device_node
+ *
+ * @cpu_node: Pointer to the device_node for CPU.
+ *
+ * Return: The logical CPU number of the given CPU device_node or -ENODEV if the
+ * CPU is not found.
+ */
+int of_cpu_node_to_id(struct device_node *cpu_node)
+{
+	int cpu;
+	bool found = false;
+	struct device_node *np;
+
+	for_each_possible_cpu(cpu) {
+		np = of_cpu_device_node_get(cpu);
+		found = (cpu_node == np);
+		of_node_put(np);
+		if (found)
+			return cpu;
+	}
+
+	return -ENODEV;
+}
+EXPORT_SYMBOL(of_cpu_node_to_id);
+
+/**
+ * of_get_cpu_state_node - Get CPU's idle state node at the given index
+ *
+ * @cpu_node: The device node for the CPU
+ * @index: The index in the list of the idle states
+ *
+ * Two generic methods can be used to describe a CPU's idle states, either via
+ * a flattened description through the "cpu-idle-states" binding or via the
+ * hierarchical layout, using the "power-domains" and the "domain-idle-states"
+ * bindings. This function check for both and returns the idle state node for
+ * the requested index.
+ *
+ * Return: An idle state node if found at @index. The refcount is incremented
+ * for it, so call of_node_put() on it when done. Returns NULL if not found.
+ */
+struct device_node *of_get_cpu_state_node(struct device_node *cpu_node,
+					  int index)
+{
+	struct of_phandle_args args;
+	int err;
+
+	err = of_parse_phandle_with_args(cpu_node, "power-domains",
+					"#power-domain-cells", 0, &args);
+	if (!err) {
+		struct device_node *state_node =
+			of_parse_phandle(args.np, "domain-idle-states", index);
+
+		of_node_put(args.np);
+		if (state_node)
+			return state_node;
+	}
+
+	return of_parse_phandle(cpu_node, "cpu-idle-states", index);
+}
+EXPORT_SYMBOL(of_get_cpu_state_node);
diff --git a/include/linux/of.h b/include/linux/of.h
index b7118d68c73a..1f1e847a1c13 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -359,6 +359,8 @@ extern const void *of_get_property(const struct device_node *node,
 				const char *name,
 				int *lenp);
 extern struct device_node *of_get_cpu_node(int cpu, unsigned int *thread);
+extern struct device_node *of_cpu_device_node_get(int cpu);
+extern int of_cpu_node_to_id(struct device_node *np);
 extern struct device_node *of_get_next_cpu_node(struct device_node *prev);
 extern struct device_node *of_get_cpu_state_node(struct device_node *cpu_node,
 						 int index);
@@ -439,8 +441,6 @@ const char *of_prop_next_string(struct property *prop, const char *cur);
 
 bool of_console_check(struct device_node *dn, char *name, int index);
 
-extern int of_cpu_node_to_id(struct device_node *np);
-
 int of_map_id(struct device_node *np, u32 id,
 	       const char *map_name, const char *map_mask_name,
 	       struct device_node **target, u32 *id_out);
@@ -635,6 +635,16 @@ static inline struct device_node *of_get_cpu_node(int cpu,
 	return NULL;
 }
 
+static inline struct device_node *of_cpu_device_node_get(int cpu)
+{
+	return NULL;
+}
+
+static inline int of_cpu_node_to_id(struct device_node *np)
+{
+	return -ENODEV;
+}
+
 static inline struct device_node *of_get_next_cpu_node(struct device_node *prev)
 {
 	return NULL;
@@ -837,11 +847,6 @@ static inline void of_property_clear_flag(struct property *p, unsigned long flag
 {
 }
 
-static inline int of_cpu_node_to_id(struct device_node *np)
-{
-	return -ENODEV;
-}
-
 static inline int of_map_id(struct device_node *np, u32 id,
 			     const char *map_name, const char *map_mask_name,
 			     struct device_node **target, u32 *id_out)
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index 6af4c3acd502..910951a22eb4 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -32,15 +32,6 @@ extern int of_device_request_module(struct device *dev);
 extern void of_device_uevent(const struct device *dev, struct kobj_uevent_env *env);
 extern int of_device_uevent_modalias(const struct device *dev, struct kobj_uevent_env *env);
 
-static inline struct device_node *of_cpu_device_node_get(int cpu)
-{
-	struct device *cpu_dev;
-	cpu_dev = get_cpu_device(cpu);
-	if (!cpu_dev)
-		return of_get_cpu_node(cpu, NULL);
-	return of_node_get(cpu_dev->of_node);
-}
-
 int of_dma_configure_id(struct device *dev,
 		     struct device_node *np,
 		     bool force_dma, const u32 *id);
@@ -89,11 +80,6 @@ static inline const struct of_device_id *of_match_device(
 	return NULL;
 }
 
-static inline struct device_node *of_cpu_device_node_get(int cpu)
-{
-	return NULL;
-}
-
 static inline int of_dma_configure_id(struct device *dev,
 				      struct device_node *np,
 				      bool force_dma,

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 04/19] of: Move CPU node related functions to their own file
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

drivers/of/base.c is quite long and we've accumulated a number of CPU
node functions. Let's move them to a new file, cpu.c, along with the
lone of_cpu_device_node_get() in of_device.h. Moving the declaration has
no effect yet as of.h is included by of_device.h. This serves as
preparation to disentangle the includes in of_device.h and
of_platform.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/of/Makefile       |   2 +-
 drivers/of/base.c         | 187 -----------------------------------------
 drivers/of/cpu.c          | 210 ++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/of.h        |  19 +++--
 include/linux/of_device.h |  14 ----
 5 files changed, 223 insertions(+), 209 deletions(-)

diff --git a/drivers/of/Makefile b/drivers/of/Makefile
index e0360a44306e..10f704592561 100644
--- a/drivers/of/Makefile
+++ b/drivers/of/Makefile
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
-obj-y = base.o device.o platform.o property.o
+obj-y = base.o cpu.o device.o platform.o property.o
 obj-$(CONFIG_OF_KOBJ) += kobj.o
 obj-$(CONFIG_OF_DYNAMIC) += dynamic.o
 obj-$(CONFIG_OF_FLATTREE) += fdt.o
diff --git a/drivers/of/base.c b/drivers/of/base.c
index ac6fde53342f..7f1720af813c 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -286,193 +286,6 @@ const void *of_get_property(const struct device_node *np, const char *name,
 }
 EXPORT_SYMBOL(of_get_property);
 
-/**
- * of_get_cpu_hwid - Get the hardware ID from a CPU device node
- *
- * @cpun: CPU number(logical index) for which device node is required
- * @thread: The local thread number to get the hardware ID for.
- *
- * Return: The hardware ID for the CPU node or ~0ULL if not found.
- */
-u64 of_get_cpu_hwid(struct device_node *cpun, unsigned int thread)
-{
-	const __be32 *cell;
-	int ac, len;
-
-	ac = of_n_addr_cells(cpun);
-	cell = of_get_property(cpun, "reg", &len);
-	if (!cell || !ac || ((sizeof(*cell) * ac * (thread + 1)) > len))
-		return ~0ULL;
-
-	cell += ac * thread;
-	return of_read_number(cell, ac);
-}
-
-/*
- * arch_match_cpu_phys_id - Match the given logical CPU and physical id
- *
- * @cpu: logical cpu index of a core/thread
- * @phys_id: physical identifier of a core/thread
- *
- * CPU logical to physical index mapping is architecture specific.
- * However this __weak function provides a default match of physical
- * id to logical cpu index. phys_id provided here is usually values read
- * from the device tree which must match the hardware internal registers.
- *
- * Returns true if the physical identifier and the logical cpu index
- * correspond to the same core/thread, false otherwise.
- */
-bool __weak arch_match_cpu_phys_id(int cpu, u64 phys_id)
-{
-	return (u32)phys_id == cpu;
-}
-
-/*
- * Checks if the given "prop_name" property holds the physical id of the
- * core/thread corresponding to the logical cpu 'cpu'. If 'thread' is not
- * NULL, local thread number within the core is returned in it.
- */
-static bool __of_find_n_match_cpu_property(struct device_node *cpun,
-			const char *prop_name, int cpu, unsigned int *thread)
-{
-	const __be32 *cell;
-	int ac, prop_len, tid;
-	u64 hwid;
-
-	ac = of_n_addr_cells(cpun);
-	cell = of_get_property(cpun, prop_name, &prop_len);
-	if (!cell && !ac && arch_match_cpu_phys_id(cpu, 0))
-		return true;
-	if (!cell || !ac)
-		return false;
-	prop_len /= sizeof(*cell) * ac;
-	for (tid = 0; tid < prop_len; tid++) {
-		hwid = of_read_number(cell, ac);
-		if (arch_match_cpu_phys_id(cpu, hwid)) {
-			if (thread)
-				*thread = tid;
-			return true;
-		}
-		cell += ac;
-	}
-	return false;
-}
-
-/*
- * arch_find_n_match_cpu_physical_id - See if the given device node is
- * for the cpu corresponding to logical cpu 'cpu'.  Return true if so,
- * else false.  If 'thread' is non-NULL, the local thread number within the
- * core is returned in it.
- */
-bool __weak arch_find_n_match_cpu_physical_id(struct device_node *cpun,
-					      int cpu, unsigned int *thread)
-{
-	/* Check for non-standard "ibm,ppc-interrupt-server#s" property
-	 * for thread ids on PowerPC. If it doesn't exist fallback to
-	 * standard "reg" property.
-	 */
-	if (IS_ENABLED(CONFIG_PPC) &&
-	    __of_find_n_match_cpu_property(cpun,
-					   "ibm,ppc-interrupt-server#s",
-					   cpu, thread))
-		return true;
-
-	return __of_find_n_match_cpu_property(cpun, "reg", cpu, thread);
-}
-
-/**
- * of_get_cpu_node - Get device node associated with the given logical CPU
- *
- * @cpu: CPU number(logical index) for which device node is required
- * @thread: if not NULL, local thread number within the physical core is
- *          returned
- *
- * The main purpose of this function is to retrieve the device node for the
- * given logical CPU index. It should be used to initialize the of_node in
- * cpu device. Once of_node in cpu device is populated, all the further
- * references can use that instead.
- *
- * CPU logical to physical index mapping is architecture specific and is built
- * before booting secondary cores. This function uses arch_match_cpu_phys_id
- * which can be overridden by architecture specific implementation.
- *
- * Return: A node pointer for the logical cpu with refcount incremented, use
- * of_node_put() on it when done. Returns NULL if not found.
- */
-struct device_node *of_get_cpu_node(int cpu, unsigned int *thread)
-{
-	struct device_node *cpun;
-
-	for_each_of_cpu_node(cpun) {
-		if (arch_find_n_match_cpu_physical_id(cpun, cpu, thread))
-			return cpun;
-	}
-	return NULL;
-}
-EXPORT_SYMBOL(of_get_cpu_node);
-
-/**
- * of_cpu_node_to_id: Get the logical CPU number for a given device_node
- *
- * @cpu_node: Pointer to the device_node for CPU.
- *
- * Return: The logical CPU number of the given CPU device_node or -ENODEV if the
- * CPU is not found.
- */
-int of_cpu_node_to_id(struct device_node *cpu_node)
-{
-	int cpu;
-	bool found = false;
-	struct device_node *np;
-
-	for_each_possible_cpu(cpu) {
-		np = of_cpu_device_node_get(cpu);
-		found = (cpu_node == np);
-		of_node_put(np);
-		if (found)
-			return cpu;
-	}
-
-	return -ENODEV;
-}
-EXPORT_SYMBOL(of_cpu_node_to_id);
-
-/**
- * of_get_cpu_state_node - Get CPU's idle state node at the given index
- *
- * @cpu_node: The device node for the CPU
- * @index: The index in the list of the idle states
- *
- * Two generic methods can be used to describe a CPU's idle states, either via
- * a flattened description through the "cpu-idle-states" binding or via the
- * hierarchical layout, using the "power-domains" and the "domain-idle-states"
- * bindings. This function check for both and returns the idle state node for
- * the requested index.
- *
- * Return: An idle state node if found at @index. The refcount is incremented
- * for it, so call of_node_put() on it when done. Returns NULL if not found.
- */
-struct device_node *of_get_cpu_state_node(struct device_node *cpu_node,
-					  int index)
-{
-	struct of_phandle_args args;
-	int err;
-
-	err = of_parse_phandle_with_args(cpu_node, "power-domains",
-					"#power-domain-cells", 0, &args);
-	if (!err) {
-		struct device_node *state_node =
-			of_parse_phandle(args.np, "domain-idle-states", index);
-
-		of_node_put(args.np);
-		if (state_node)
-			return state_node;
-	}
-
-	return of_parse_phandle(cpu_node, "cpu-idle-states", index);
-}
-EXPORT_SYMBOL(of_get_cpu_state_node);
-
 /**
  * __of_device_is_compatible() - Check if the node matches given constraints
  * @device: pointer to node
diff --git a/drivers/of/cpu.c b/drivers/of/cpu.c
new file mode 100644
index 000000000000..d17b2f851082
--- /dev/null
+++ b/drivers/of/cpu.c
@@ -0,0 +1,210 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <linux/cpu.h>
+#include <linux/kernel.h>
+#include <linux/of.h>
+
+/**
+ * of_get_cpu_hwid - Get the hardware ID from a CPU device node
+ *
+ * @cpun: CPU number(logical index) for which device node is required
+ * @thread: The local thread number to get the hardware ID for.
+ *
+ * Return: The hardware ID for the CPU node or ~0ULL if not found.
+ */
+u64 of_get_cpu_hwid(struct device_node *cpun, unsigned int thread)
+{
+	const __be32 *cell;
+	int ac, len;
+
+	ac = of_n_addr_cells(cpun);
+	cell = of_get_property(cpun, "reg", &len);
+	if (!cell || !ac || ((sizeof(*cell) * ac * (thread + 1)) > len))
+		return ~0ULL;
+
+	cell += ac * thread;
+	return of_read_number(cell, ac);
+}
+
+/*
+ * arch_match_cpu_phys_id - Match the given logical CPU and physical id
+ *
+ * @cpu: logical cpu index of a core/thread
+ * @phys_id: physical identifier of a core/thread
+ *
+ * CPU logical to physical index mapping is architecture specific.
+ * However this __weak function provides a default match of physical
+ * id to logical cpu index. phys_id provided here is usually values read
+ * from the device tree which must match the hardware internal registers.
+ *
+ * Returns true if the physical identifier and the logical cpu index
+ * correspond to the same core/thread, false otherwise.
+ */
+bool __weak arch_match_cpu_phys_id(int cpu, u64 phys_id)
+{
+	return (u32)phys_id == cpu;
+}
+
+/*
+ * Checks if the given "prop_name" property holds the physical id of the
+ * core/thread corresponding to the logical cpu 'cpu'. If 'thread' is not
+ * NULL, local thread number within the core is returned in it.
+ */
+static bool __of_find_n_match_cpu_property(struct device_node *cpun,
+			const char *prop_name, int cpu, unsigned int *thread)
+{
+	const __be32 *cell;
+	int ac, prop_len, tid;
+	u64 hwid;
+
+	ac = of_n_addr_cells(cpun);
+	cell = of_get_property(cpun, prop_name, &prop_len);
+	if (!cell && !ac && arch_match_cpu_phys_id(cpu, 0))
+		return true;
+	if (!cell || !ac)
+		return false;
+	prop_len /= sizeof(*cell) * ac;
+	for (tid = 0; tid < prop_len; tid++) {
+		hwid = of_read_number(cell, ac);
+		if (arch_match_cpu_phys_id(cpu, hwid)) {
+			if (thread)
+				*thread = tid;
+			return true;
+		}
+		cell += ac;
+	}
+	return false;
+}
+
+/*
+ * arch_find_n_match_cpu_physical_id - See if the given device node is
+ * for the cpu corresponding to logical cpu 'cpu'.  Return true if so,
+ * else false.  If 'thread' is non-NULL, the local thread number within the
+ * core is returned in it.
+ */
+bool __weak arch_find_n_match_cpu_physical_id(struct device_node *cpun,
+					      int cpu, unsigned int *thread)
+{
+	/* Check for non-standard "ibm,ppc-interrupt-server#s" property
+	 * for thread ids on PowerPC. If it doesn't exist fallback to
+	 * standard "reg" property.
+	 */
+	if (IS_ENABLED(CONFIG_PPC) &&
+	    __of_find_n_match_cpu_property(cpun,
+					   "ibm,ppc-interrupt-server#s",
+					   cpu, thread))
+		return true;
+
+	return __of_find_n_match_cpu_property(cpun, "reg", cpu, thread);
+}
+
+/**
+ * of_get_cpu_node - Get device node associated with the given logical CPU
+ *
+ * @cpu: CPU number(logical index) for which device node is required
+ * @thread: if not NULL, local thread number within the physical core is
+ *          returned
+ *
+ * The main purpose of this function is to retrieve the device node for the
+ * given logical CPU index. It should be used to initialize the of_node in
+ * cpu device. Once of_node in cpu device is populated, all the further
+ * references can use that instead.
+ *
+ * CPU logical to physical index mapping is architecture specific and is built
+ * before booting secondary cores. This function uses arch_match_cpu_phys_id
+ * which can be overridden by architecture specific implementation.
+ *
+ * Return: A node pointer for the logical cpu with refcount incremented, use
+ * of_node_put() on it when done. Returns NULL if not found.
+ */
+struct device_node *of_get_cpu_node(int cpu, unsigned int *thread)
+{
+	struct device_node *cpun;
+
+	for_each_of_cpu_node(cpun) {
+		if (arch_find_n_match_cpu_physical_id(cpun, cpu, thread))
+			return cpun;
+	}
+	return NULL;
+}
+EXPORT_SYMBOL(of_get_cpu_node);
+
+/**
+ * of_cpu_device_node_get: Get the CPU device_node for a given logical CPU number
+ *
+ * @cpu: The logical CPU number
+ *
+ * Return: Pointer to the device_node for CPU with its reference count
+ * incremented of the given logical CPU number or NULL if the CPU device_node
+ * is not found.
+ */
+struct device_node *of_cpu_device_node_get(int cpu)
+{
+	struct device *cpu_dev;
+	cpu_dev = get_cpu_device(cpu);
+	if (!cpu_dev)
+		return of_get_cpu_node(cpu, NULL);
+	return of_node_get(cpu_dev->of_node);
+}
+EXPORT_SYMBOL(of_cpu_device_node_get);
+
+/**
+ * of_cpu_node_to_id: Get the logical CPU number for a given device_node
+ *
+ * @cpu_node: Pointer to the device_node for CPU.
+ *
+ * Return: The logical CPU number of the given CPU device_node or -ENODEV if the
+ * CPU is not found.
+ */
+int of_cpu_node_to_id(struct device_node *cpu_node)
+{
+	int cpu;
+	bool found = false;
+	struct device_node *np;
+
+	for_each_possible_cpu(cpu) {
+		np = of_cpu_device_node_get(cpu);
+		found = (cpu_node == np);
+		of_node_put(np);
+		if (found)
+			return cpu;
+	}
+
+	return -ENODEV;
+}
+EXPORT_SYMBOL(of_cpu_node_to_id);
+
+/**
+ * of_get_cpu_state_node - Get CPU's idle state node at the given index
+ *
+ * @cpu_node: The device node for the CPU
+ * @index: The index in the list of the idle states
+ *
+ * Two generic methods can be used to describe a CPU's idle states, either via
+ * a flattened description through the "cpu-idle-states" binding or via the
+ * hierarchical layout, using the "power-domains" and the "domain-idle-states"
+ * bindings. This function check for both and returns the idle state node for
+ * the requested index.
+ *
+ * Return: An idle state node if found at @index. The refcount is incremented
+ * for it, so call of_node_put() on it when done. Returns NULL if not found.
+ */
+struct device_node *of_get_cpu_state_node(struct device_node *cpu_node,
+					  int index)
+{
+	struct of_phandle_args args;
+	int err;
+
+	err = of_parse_phandle_with_args(cpu_node, "power-domains",
+					"#power-domain-cells", 0, &args);
+	if (!err) {
+		struct device_node *state_node =
+			of_parse_phandle(args.np, "domain-idle-states", index);
+
+		of_node_put(args.np);
+		if (state_node)
+			return state_node;
+	}
+
+	return of_parse_phandle(cpu_node, "cpu-idle-states", index);
+}
+EXPORT_SYMBOL(of_get_cpu_state_node);
diff --git a/include/linux/of.h b/include/linux/of.h
index b7118d68c73a..1f1e847a1c13 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -359,6 +359,8 @@ extern const void *of_get_property(const struct device_node *node,
 				const char *name,
 				int *lenp);
 extern struct device_node *of_get_cpu_node(int cpu, unsigned int *thread);
+extern struct device_node *of_cpu_device_node_get(int cpu);
+extern int of_cpu_node_to_id(struct device_node *np);
 extern struct device_node *of_get_next_cpu_node(struct device_node *prev);
 extern struct device_node *of_get_cpu_state_node(struct device_node *cpu_node,
 						 int index);
@@ -439,8 +441,6 @@ const char *of_prop_next_string(struct property *prop, const char *cur);
 
 bool of_console_check(struct device_node *dn, char *name, int index);
 
-extern int of_cpu_node_to_id(struct device_node *np);
-
 int of_map_id(struct device_node *np, u32 id,
 	       const char *map_name, const char *map_mask_name,
 	       struct device_node **target, u32 *id_out);
@@ -635,6 +635,16 @@ static inline struct device_node *of_get_cpu_node(int cpu,
 	return NULL;
 }
 
+static inline struct device_node *of_cpu_device_node_get(int cpu)
+{
+	return NULL;
+}
+
+static inline int of_cpu_node_to_id(struct device_node *np)
+{
+	return -ENODEV;
+}
+
 static inline struct device_node *of_get_next_cpu_node(struct device_node *prev)
 {
 	return NULL;
@@ -837,11 +847,6 @@ static inline void of_property_clear_flag(struct property *p, unsigned long flag
 {
 }
 
-static inline int of_cpu_node_to_id(struct device_node *np)
-{
-	return -ENODEV;
-}
-
 static inline int of_map_id(struct device_node *np, u32 id,
 			     const char *map_name, const char *map_mask_name,
 			     struct device_node **target, u32 *id_out)
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index 6af4c3acd502..910951a22eb4 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -32,15 +32,6 @@ extern int of_device_request_module(struct device *dev);
 extern void of_device_uevent(const struct device *dev, struct kobj_uevent_env *env);
 extern int of_device_uevent_modalias(const struct device *dev, struct kobj_uevent_env *env);
 
-static inline struct device_node *of_cpu_device_node_get(int cpu)
-{
-	struct device *cpu_dev;
-	cpu_dev = get_cpu_device(cpu);
-	if (!cpu_dev)
-		return of_get_cpu_node(cpu, NULL);
-	return of_node_get(cpu_dev->of_node);
-}
-
 int of_dma_configure_id(struct device *dev,
 		     struct device_node *np,
 		     bool force_dma, const u32 *id);
@@ -89,11 +80,6 @@ static inline const struct of_device_id *of_match_device(
 	return NULL;
 }
 
-static inline struct device_node *of_cpu_device_node_get(int cpu)
-{
-	return NULL;
-}
-
 static inline int of_dma_configure_id(struct device *dev,
 				      struct device_node *np,
 				      bool force_dma,

-- 
2.39.2


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

* [PATCH 05/19] of: Drop unnecessary includes in headers
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:52   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Drop unnecessary includes in DT headers. Some simply aren't needed and
some can be replaced with forward declarations.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 include/linux/of.h          | 5 ++---
 include/linux/of_device.h   | 3 ++-
 include/linux/of_platform.h | 5 +++--
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/include/linux/of.h b/include/linux/of.h
index 1f1e847a1c13..96979c67c5fa 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -16,13 +16,10 @@
 #include <linux/errno.h>
 #include <linux/kobject.h>
 #include <linux/mod_devicetable.h>
-#include <linux/topology.h>
-#include <linux/notifier.h>
 #include <linux/property.h>
 #include <linux/list.h>
 
 #include <asm/byteorder.h>
-#include <asm/errno.h>
 
 typedef u32 phandle;
 typedef u32 ihandle;
@@ -1517,6 +1514,8 @@ enum of_reconfig_change {
 	OF_RECONFIG_CHANGE_REMOVE,
 };
 
+struct notifier_block;
+
 #ifdef CONFIG_OF_DYNAMIC
 extern int of_reconfig_notifier_register(struct notifier_block *);
 extern int of_reconfig_notifier_unregister(struct notifier_block *);
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index 910951a22eb4..5cdafe19dc80 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -7,9 +7,10 @@
 #include <linux/of_platform.h> /* temporary until merge */
 
 #include <linux/of.h>
-#include <linux/mod_devicetable.h>
 
 struct device;
+struct of_device_id;
+struct kobj_uevent_env;
 
 #ifdef CONFIG_OF
 extern const struct of_device_id *of_match_device(
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index 8ac5cb933dc3..d8045bcfc35e 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -6,12 +6,13 @@
  *			 <benh@kernel.crashing.org>
  */
 
-#include <linux/device.h>
 #include <linux/mod_devicetable.h>
-#include <linux/pm.h>
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
 
+struct device;
+struct of_device_id;
+
 /**
  * struct of_dev_auxdata - lookup table entry for device names & platform_data
  * @compatible: compatible value of node to match against node

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 05/19] of: Drop unnecessary includes in headers
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Drop unnecessary includes in DT headers. Some simply aren't needed and
some can be replaced with forward declarations.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 include/linux/of.h          | 5 ++---
 include/linux/of_device.h   | 3 ++-
 include/linux/of_platform.h | 5 +++--
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/include/linux/of.h b/include/linux/of.h
index 1f1e847a1c13..96979c67c5fa 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -16,13 +16,10 @@
 #include <linux/errno.h>
 #include <linux/kobject.h>
 #include <linux/mod_devicetable.h>
-#include <linux/topology.h>
-#include <linux/notifier.h>
 #include <linux/property.h>
 #include <linux/list.h>
 
 #include <asm/byteorder.h>
-#include <asm/errno.h>
 
 typedef u32 phandle;
 typedef u32 ihandle;
@@ -1517,6 +1514,8 @@ enum of_reconfig_change {
 	OF_RECONFIG_CHANGE_REMOVE,
 };
 
+struct notifier_block;
+
 #ifdef CONFIG_OF_DYNAMIC
 extern int of_reconfig_notifier_register(struct notifier_block *);
 extern int of_reconfig_notifier_unregister(struct notifier_block *);
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index 910951a22eb4..5cdafe19dc80 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -7,9 +7,10 @@
 #include <linux/of_platform.h> /* temporary until merge */
 
 #include <linux/of.h>
-#include <linux/mod_devicetable.h>
 
 struct device;
+struct of_device_id;
+struct kobj_uevent_env;
 
 #ifdef CONFIG_OF
 extern const struct of_device_id *of_match_device(
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index 8ac5cb933dc3..d8045bcfc35e 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -6,12 +6,13 @@
  *			 <benh@kernel.crashing.org>
  */
 
-#include <linux/device.h>
 #include <linux/mod_devicetable.h>
-#include <linux/pm.h>
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
 
+struct device;
+struct of_device_id;
+
 /**
  * struct of_dev_auxdata - lookup table entry for device names & platform_data
  * @compatible: compatible value of node to match against node

-- 
2.39.2


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

* [PATCH 05/19] of: Drop unnecessary includes in headers
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

Drop unnecessary includes in DT headers. Some simply aren't needed and
some can be replaced with forward declarations.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 include/linux/of.h          | 5 ++---
 include/linux/of_device.h   | 3 ++-
 include/linux/of_platform.h | 5 +++--
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/include/linux/of.h b/include/linux/of.h
index 1f1e847a1c13..96979c67c5fa 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -16,13 +16,10 @@
 #include <linux/errno.h>
 #include <linux/kobject.h>
 #include <linux/mod_devicetable.h>
-#include <linux/topology.h>
-#include <linux/notifier.h>
 #include <linux/property.h>
 #include <linux/list.h>
 
 #include <asm/byteorder.h>
-#include <asm/errno.h>
 
 typedef u32 phandle;
 typedef u32 ihandle;
@@ -1517,6 +1514,8 @@ enum of_reconfig_change {
 	OF_RECONFIG_CHANGE_REMOVE,
 };
 
+struct notifier_block;
+
 #ifdef CONFIG_OF_DYNAMIC
 extern int of_reconfig_notifier_register(struct notifier_block *);
 extern int of_reconfig_notifier_unregister(struct notifier_block *);
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index 910951a22eb4..5cdafe19dc80 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -7,9 +7,10 @@
 #include <linux/of_platform.h> /* temporary until merge */
 
 #include <linux/of.h>
-#include <linux/mod_devicetable.h>
 
 struct device;
+struct of_device_id;
+struct kobj_uevent_env;
 
 #ifdef CONFIG_OF
 extern const struct of_device_id *of_match_device(
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index 8ac5cb933dc3..d8045bcfc35e 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -6,12 +6,13 @@
  *			 <benh@kernel.crashing.org>
  */
 
-#include <linux/device.h>
 #include <linux/mod_devicetable.h>
-#include <linux/pm.h>
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
 
+struct device;
+struct of_device_id;
+
 /**
  * struct of_dev_auxdata - lookup table entry for device names & platform_data
  * @compatible: compatible value of node to match against node

-- 
2.39.2


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

* [PATCH 06/19] ARM: sunxi: Drop of_device.h include
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:52   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Just drop
including of_device.h as of.h is already included.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 arch/arm/mach-sunxi/mc_smp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/mach-sunxi/mc_smp.c b/arch/arm/mach-sunxi/mc_smp.c
index 26cbce135338..cb63921232a6 100644
--- a/arch/arm/mach-sunxi/mc_smp.c
+++ b/arch/arm/mach-sunxi/mc_smp.c
@@ -19,7 +19,6 @@
 #include <linux/irqchip/arm-gic.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
-#include <linux/of_device.h>
 #include <linux/smp.h>
 
 #include <asm/cacheflush.h>

-- 
2.39.2


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

* [PATCH 06/19] ARM: sunxi: Drop of_device.h include
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Just drop
including of_device.h as of.h is already included.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 arch/arm/mach-sunxi/mc_smp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/mach-sunxi/mc_smp.c b/arch/arm/mach-sunxi/mc_smp.c
index 26cbce135338..cb63921232a6 100644
--- a/arch/arm/mach-sunxi/mc_smp.c
+++ b/arch/arm/mach-sunxi/mc_smp.c
@@ -19,7 +19,6 @@
 #include <linux/irqchip/arm-gic.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
-#include <linux/of_device.h>
 #include <linux/smp.h>
 
 #include <asm/cacheflush.h>

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 06/19] ARM: sunxi: Drop of_device.h include
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Just drop
including of_device.h as of.h is already included.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 arch/arm/mach-sunxi/mc_smp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/mach-sunxi/mc_smp.c b/arch/arm/mach-sunxi/mc_smp.c
index 26cbce135338..cb63921232a6 100644
--- a/arch/arm/mach-sunxi/mc_smp.c
+++ b/arch/arm/mach-sunxi/mc_smp.c
@@ -19,7 +19,6 @@
 #include <linux/irqchip/arm-gic.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
-#include <linux/of_device.h>
 #include <linux/smp.h>
 
 #include <asm/cacheflush.h>

-- 
2.39.2


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

* [PATCH 07/19] ARM: cpuidle: Drop of_device.h include
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:52   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Just drop
including of_device.h as of.h is already included.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 arch/arm/kernel/cpuidle.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/kernel/cpuidle.c b/arch/arm/kernel/cpuidle.c
index 437ff39f7808..fba1f8bb03b5 100644
--- a/arch/arm/kernel/cpuidle.c
+++ b/arch/arm/kernel/cpuidle.c
@@ -5,7 +5,6 @@
 
 #include <linux/cpuidle.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <asm/cpuidle.h>
 
 extern struct of_cpuidle_method __cpuidle_method_of_table[];

-- 
2.39.2


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

* [PATCH 07/19] ARM: cpuidle: Drop of_device.h include
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Just drop
including of_device.h as of.h is already included.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 arch/arm/kernel/cpuidle.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/kernel/cpuidle.c b/arch/arm/kernel/cpuidle.c
index 437ff39f7808..fba1f8bb03b5 100644
--- a/arch/arm/kernel/cpuidle.c
+++ b/arch/arm/kernel/cpuidle.c
@@ -5,7 +5,6 @@
 
 #include <linux/cpuidle.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <asm/cpuidle.h>
 
 extern struct of_cpuidle_method __cpuidle_method_of_table[];

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 07/19] ARM: cpuidle: Drop of_device.h include
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Just drop
including of_device.h as of.h is already included.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 arch/arm/kernel/cpuidle.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/kernel/cpuidle.c b/arch/arm/kernel/cpuidle.c
index 437ff39f7808..fba1f8bb03b5 100644
--- a/arch/arm/kernel/cpuidle.c
+++ b/arch/arm/kernel/cpuidle.c
@@ -5,7 +5,6 @@
 
 #include <linux/cpuidle.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <asm/cpuidle.h>
 
 extern struct of_cpuidle_method __cpuidle_method_of_table[];

-- 
2.39.2


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

* [PATCH 08/19] riscv: Add explicit include for cpu.h
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:52   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Removing the include of cpu.h from of_device.h (included by
of_platform.h) causes an error in setup.c:

arch/riscv/kernel/setup.c:313:22: error: arithmetic on a pointer to an incomplete type 'typeof(struct cpu)' (aka 'struct cpu')

The of_platform.h header is not necessary either, so it can be dropped.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 arch/riscv/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index 376d2827e736..dcfa4b6fa4b1 100644
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -8,6 +8,7 @@
  *  Nick Kossifidis <mick@ics.forth.gr>
  */
 
+#include <linux/cpu.h>
 #include <linux/init.h>
 #include <linux/mm.h>
 #include <linux/memblock.h>
@@ -15,7 +16,6 @@
 #include <linux/console.h>
 #include <linux/screen_info.h>
 #include <linux/of_fdt.h>
-#include <linux/of_platform.h>
 #include <linux/sched/task.h>
 #include <linux/smp.h>
 #include <linux/efi.h>

-- 
2.39.2


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

* [PATCH 08/19] riscv: Add explicit include for cpu.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Removing the include of cpu.h from of_device.h (included by
of_platform.h) causes an error in setup.c:

arch/riscv/kernel/setup.c:313:22: error: arithmetic on a pointer to an incomplete type 'typeof(struct cpu)' (aka 'struct cpu')

The of_platform.h header is not necessary either, so it can be dropped.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 arch/riscv/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index 376d2827e736..dcfa4b6fa4b1 100644
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -8,6 +8,7 @@
  *  Nick Kossifidis <mick@ics.forth.gr>
  */
 
+#include <linux/cpu.h>
 #include <linux/init.h>
 #include <linux/mm.h>
 #include <linux/memblock.h>
@@ -15,7 +16,6 @@
 #include <linux/console.h>
 #include <linux/screen_info.h>
 #include <linux/of_fdt.h>
-#include <linux/of_platform.h>
 #include <linux/sched/task.h>
 #include <linux/smp.h>
 #include <linux/efi.h>

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 08/19] riscv: Add explicit include for cpu.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

Removing the include of cpu.h from of_device.h (included by
of_platform.h) causes an error in setup.c:

arch/riscv/kernel/setup.c:313:22: error: arithmetic on a pointer to an incomplete type 'typeof(struct cpu)' (aka 'struct cpu')

The of_platform.h header is not necessary either, so it can be dropped.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 arch/riscv/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index 376d2827e736..dcfa4b6fa4b1 100644
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -8,6 +8,7 @@
  *  Nick Kossifidis <mick@ics.forth.gr>
  */
 
+#include <linux/cpu.h>
 #include <linux/init.h>
 #include <linux/mm.h>
 #include <linux/memblock.h>
@@ -15,7 +16,6 @@
 #include <linux/console.h>
 #include <linux/screen_info.h>
 #include <linux/of_fdt.h>
-#include <linux/of_platform.h>
 #include <linux/sched/task.h>
 #include <linux/smp.h>
 #include <linux/efi.h>

-- 
2.39.2


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

* [PATCH 09/19] riscv: cacheinfo: Adjust includes to remove of_device.h
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:52   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Adjust the
include files with what was implicitly included by of_device.h (cpu.h and
of.h) and drop including of_device.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 arch/riscv/kernel/cacheinfo.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c
index 3a13113f1b29..e3829d2de5d9 100644
--- a/arch/riscv/kernel/cacheinfo.c
+++ b/arch/riscv/kernel/cacheinfo.c
@@ -5,7 +5,6 @@
 
 #include <linux/cpu.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <asm/cacheinfo.h>
 
 static struct riscv_cacheinfo_ops *rv_cache_ops;

-- 
2.39.2


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

* [PATCH 09/19] riscv: cacheinfo: Adjust includes to remove of_device.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Adjust the
include files with what was implicitly included by of_device.h (cpu.h and
of.h) and drop including of_device.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 arch/riscv/kernel/cacheinfo.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c
index 3a13113f1b29..e3829d2de5d9 100644
--- a/arch/riscv/kernel/cacheinfo.c
+++ b/arch/riscv/kernel/cacheinfo.c
@@ -5,7 +5,6 @@
 
 #include <linux/cpu.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <asm/cacheinfo.h>
 
 static struct riscv_cacheinfo_ops *rv_cache_ops;

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 09/19] riscv: cacheinfo: Adjust includes to remove of_device.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Adjust the
include files with what was implicitly included by of_device.h (cpu.h and
of.h) and drop including of_device.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 arch/riscv/kernel/cacheinfo.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c
index 3a13113f1b29..e3829d2de5d9 100644
--- a/arch/riscv/kernel/cacheinfo.c
+++ b/arch/riscv/kernel/cacheinfo.c
@@ -5,7 +5,6 @@
 
 #include <linux/cpu.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <asm/cacheinfo.h>
 
 static struct riscv_cacheinfo_ops *rv_cache_ops;

-- 
2.39.2


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

* [PATCH 10/19] cacheinfo: Adjust includes to remove of_device.h
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:52   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Update the
includes to use of.h instead of of_device.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/base/cacheinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c
index f6573c335f4c..a5f7a1063411 100644
--- a/drivers/base/cacheinfo.c
+++ b/drivers/base/cacheinfo.c
@@ -14,7 +14,7 @@
 #include <linux/cpu.h>
 #include <linux/device.h>
 #include <linux/init.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/smp.h>

-- 
2.39.2


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

* [PATCH 10/19] cacheinfo: Adjust includes to remove of_device.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Update the
includes to use of.h instead of of_device.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/base/cacheinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c
index f6573c335f4c..a5f7a1063411 100644
--- a/drivers/base/cacheinfo.c
+++ b/drivers/base/cacheinfo.c
@@ -14,7 +14,7 @@
 #include <linux/cpu.h>
 #include <linux/device.h>
 #include <linux/init.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/smp.h>

-- 
2.39.2


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

* [PATCH 10/19] cacheinfo: Adjust includes to remove of_device.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Update the
includes to use of.h instead of of_device.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/base/cacheinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c
index f6573c335f4c..a5f7a1063411 100644
--- a/drivers/base/cacheinfo.c
+++ b/drivers/base/cacheinfo.c
@@ -14,7 +14,7 @@
 #include <linux/cpu.h>
 #include <linux/device.h>
 #include <linux/init.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/smp.h>

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 11/19] clocksource: ingenic: Add explicit include for cpuhotplug.h
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:52   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Removing include of cpu.h from of_device.h (included by of_platform.h)
causes an error in ingenic-timer:

drivers/clocksource/ingenic-timer.c: In function ‘ingenic_tcu_init’:
drivers/clocksource/ingenic-timer.c:338:15: error: implicit declaration of function ‘cpuhp_setup_state’

The of_platform.h header is not necessary either, so it and of_address.h
can be dropped.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/clocksource/ingenic-timer.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/clocksource/ingenic-timer.c b/drivers/clocksource/ingenic-timer.c
index 24ed0f1f089b..089ce64b1c3f 100644
--- a/drivers/clocksource/ingenic-timer.c
+++ b/drivers/clocksource/ingenic-timer.c
@@ -9,13 +9,12 @@
 #include <linux/clk.h>
 #include <linux/clockchips.h>
 #include <linux/clocksource.h>
+#include <linux/cpuhotplug.h>
 #include <linux/interrupt.h>
 #include <linux/mfd/ingenic-tcu.h>
 #include <linux/mfd/syscon.h>
 #include <linux/of.h>
-#include <linux/of_address.h>
 #include <linux/of_irq.h>
-#include <linux/of_platform.h>
 #include <linux/overflow.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 11/19] clocksource: ingenic: Add explicit include for cpuhotplug.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Removing include of cpu.h from of_device.h (included by of_platform.h)
causes an error in ingenic-timer:

drivers/clocksource/ingenic-timer.c: In function ‘ingenic_tcu_init’:
drivers/clocksource/ingenic-timer.c:338:15: error: implicit declaration of function ‘cpuhp_setup_state’

The of_platform.h header is not necessary either, so it and of_address.h
can be dropped.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/clocksource/ingenic-timer.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/clocksource/ingenic-timer.c b/drivers/clocksource/ingenic-timer.c
index 24ed0f1f089b..089ce64b1c3f 100644
--- a/drivers/clocksource/ingenic-timer.c
+++ b/drivers/clocksource/ingenic-timer.c
@@ -9,13 +9,12 @@
 #include <linux/clk.h>
 #include <linux/clockchips.h>
 #include <linux/clocksource.h>
+#include <linux/cpuhotplug.h>
 #include <linux/interrupt.h>
 #include <linux/mfd/ingenic-tcu.h>
 #include <linux/mfd/syscon.h>
 #include <linux/of.h>
-#include <linux/of_address.h>
 #include <linux/of_irq.h>
-#include <linux/of_platform.h>
 #include <linux/overflow.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>

-- 
2.39.2


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

* [PATCH 11/19] clocksource: ingenic: Add explicit include for cpuhotplug.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

Removing include of cpu.h from of_device.h (included by of_platform.h)
causes an error in ingenic-timer:

drivers/clocksource/ingenic-timer.c: In function ‘ingenic_tcu_init’:
drivers/clocksource/ingenic-timer.c:338:15: error: implicit declaration of function ‘cpuhp_setup_state’

The of_platform.h header is not necessary either, so it and of_address.h
can be dropped.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/clocksource/ingenic-timer.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/clocksource/ingenic-timer.c b/drivers/clocksource/ingenic-timer.c
index 24ed0f1f089b..089ce64b1c3f 100644
--- a/drivers/clocksource/ingenic-timer.c
+++ b/drivers/clocksource/ingenic-timer.c
@@ -9,13 +9,12 @@
 #include <linux/clk.h>
 #include <linux/clockchips.h>
 #include <linux/clocksource.h>
+#include <linux/cpuhotplug.h>
 #include <linux/interrupt.h>
 #include <linux/mfd/ingenic-tcu.h>
 #include <linux/mfd/syscon.h>
 #include <linux/of.h>
-#include <linux/of_address.h>
 #include <linux/of_irq.h>
-#include <linux/of_platform.h>
 #include <linux/overflow.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>

-- 
2.39.2


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

* [PATCH 12/19] thermal: cpuidle_cooling: Adjust includes to remove of_device.h
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:52   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Adjust the
include files with what was implicitly included by of_device.h (cpu.h and
of.h) and drop including of_device.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/thermal/cpuidle_cooling.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/cpuidle_cooling.c b/drivers/thermal/cpuidle_cooling.c
index 4f41102e8b16..6f6daead485e 100644
--- a/drivers/thermal/cpuidle_cooling.c
+++ b/drivers/thermal/cpuidle_cooling.c
@@ -7,12 +7,13 @@
  */
 #define pr_fmt(fmt) "cpuidle cooling: " fmt
 
+#include <linux/cpu.h>
 #include <linux/cpu_cooling.h>
 #include <linux/cpuidle.h>
 #include <linux/device.h>
 #include <linux/err.h>
 #include <linux/idle_inject.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/slab.h>
 #include <linux/thermal.h>
 

-- 
2.39.2


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

* [PATCH 12/19] thermal: cpuidle_cooling: Adjust includes to remove of_device.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Adjust the
include files with what was implicitly included by of_device.h (cpu.h and
of.h) and drop including of_device.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/thermal/cpuidle_cooling.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/cpuidle_cooling.c b/drivers/thermal/cpuidle_cooling.c
index 4f41102e8b16..6f6daead485e 100644
--- a/drivers/thermal/cpuidle_cooling.c
+++ b/drivers/thermal/cpuidle_cooling.c
@@ -7,12 +7,13 @@
  */
 #define pr_fmt(fmt) "cpuidle cooling: " fmt
 
+#include <linux/cpu.h>
 #include <linux/cpu_cooling.h>
 #include <linux/cpuidle.h>
 #include <linux/device.h>
 #include <linux/err.h>
 #include <linux/idle_inject.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/slab.h>
 #include <linux/thermal.h>
 

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 12/19] thermal: cpuidle_cooling: Adjust includes to remove of_device.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Adjust the
include files with what was implicitly included by of_device.h (cpu.h and
of.h) and drop including of_device.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/thermal/cpuidle_cooling.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/cpuidle_cooling.c b/drivers/thermal/cpuidle_cooling.c
index 4f41102e8b16..6f6daead485e 100644
--- a/drivers/thermal/cpuidle_cooling.c
+++ b/drivers/thermal/cpuidle_cooling.c
@@ -7,12 +7,13 @@
  */
 #define pr_fmt(fmt) "cpuidle cooling: " fmt
 
+#include <linux/cpu.h>
 #include <linux/cpu_cooling.h>
 #include <linux/cpuidle.h>
 #include <linux/device.h>
 #include <linux/err.h>
 #include <linux/idle_inject.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/slab.h>
 #include <linux/thermal.h>
 

-- 
2.39.2


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

* [PATCH 13/19] soc: mediatek: mtk-svs: Add explicit include for cpu.h
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:52   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Removing the include of cpu.h from of_device.h (included by
of_platform.h) causes an error:

drivers/soc/mediatek/mtk-svs.c:2134:41: error: implicit declaration of function 'get_cpu_device'; did you mean 'get_swap_device'? [-Werror=implicit-function-declaration]

of_platform.h is still needed for of_find_device_by_node().

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/soc/mediatek/mtk-svs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c
index f26eb2f637d5..1b7579a5bec6 100644
--- a/drivers/soc/mediatek/mtk-svs.c
+++ b/drivers/soc/mediatek/mtk-svs.c
@@ -7,6 +7,7 @@
 #include <linux/bits.h>
 #include <linux/clk.h>
 #include <linux/completion.h>
+#include <linux/cpu.h>
 #include <linux/cpuidle.h>
 #include <linux/debugfs.h>
 #include <linux/device.h>

-- 
2.39.2


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

* [PATCH 13/19] soc: mediatek: mtk-svs: Add explicit include for cpu.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Removing the include of cpu.h from of_device.h (included by
of_platform.h) causes an error:

drivers/soc/mediatek/mtk-svs.c:2134:41: error: implicit declaration of function 'get_cpu_device'; did you mean 'get_swap_device'? [-Werror=implicit-function-declaration]

of_platform.h is still needed for of_find_device_by_node().

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/soc/mediatek/mtk-svs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c
index f26eb2f637d5..1b7579a5bec6 100644
--- a/drivers/soc/mediatek/mtk-svs.c
+++ b/drivers/soc/mediatek/mtk-svs.c
@@ -7,6 +7,7 @@
 #include <linux/bits.h>
 #include <linux/clk.h>
 #include <linux/completion.h>
+#include <linux/cpu.h>
 #include <linux/cpuidle.h>
 #include <linux/debugfs.h>
 #include <linux/device.h>

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 13/19] soc: mediatek: mtk-svs: Add explicit include for cpu.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

Removing the include of cpu.h from of_device.h (included by
of_platform.h) causes an error:

drivers/soc/mediatek/mtk-svs.c:2134:41: error: implicit declaration of function 'get_cpu_device'; did you mean 'get_swap_device'? [-Werror=implicit-function-declaration]

of_platform.h is still needed for of_find_device_by_node().

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/soc/mediatek/mtk-svs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c
index f26eb2f637d5..1b7579a5bec6 100644
--- a/drivers/soc/mediatek/mtk-svs.c
+++ b/drivers/soc/mediatek/mtk-svs.c
@@ -7,6 +7,7 @@
 #include <linux/bits.h>
 #include <linux/clk.h>
 #include <linux/completion.h>
+#include <linux/cpu.h>
 #include <linux/cpuidle.h>
 #include <linux/debugfs.h>
 #include <linux/device.h>

-- 
2.39.2


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

* [PATCH 14/19] cpufreq: Adjust includes to remove of_device.h
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:52   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Adjust the
include files with what was implicitly included by of_device.h (cpu.h and
of.h) and drop including of_device.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/cpufreq/cpufreq-dt-platdev.c | 1 -
 drivers/cpufreq/kirkwood-cpufreq.c   | 2 +-
 drivers/cpufreq/maple-cpufreq.c      | 2 +-
 drivers/cpufreq/pmac32-cpufreq.c     | 2 +-
 drivers/cpufreq/pmac64-cpufreq.c     | 2 +-
 drivers/cpufreq/qcom-cpufreq-hw.c    | 4 ++--
 drivers/cpufreq/spear-cpufreq.c      | 2 +-
 drivers/cpufreq/tegra124-cpufreq.c   | 1 -
 drivers/cpufreq/tegra20-cpufreq.c    | 2 +-
 include/linux/cpufreq.h              | 1 -
 10 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index e85703651098..f9675e1a8529 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -6,7 +6,6 @@
 
 #include <linux/err.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 
 #include "cpufreq-dt.h"
diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c
index 70ad8fe1d78b..95588101efbd 100644
--- a/drivers/cpufreq/kirkwood-cpufreq.c
+++ b/drivers/cpufreq/kirkwood-cpufreq.c
@@ -9,7 +9,7 @@
 #include <linux/module.h>
 #include <linux/clk.h>
 #include <linux/cpufreq.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <asm/proc-fns.h>
diff --git a/drivers/cpufreq/maple-cpufreq.c b/drivers/cpufreq/maple-cpufreq.c
index 28d346062166..f9306410a07f 100644
--- a/drivers/cpufreq/maple-cpufreq.c
+++ b/drivers/cpufreq/maple-cpufreq.c
@@ -23,7 +23,7 @@
 #include <linux/completion.h>
 #include <linux/mutex.h>
 #include <linux/time.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 
 #define DBG(fmt...) pr_debug(fmt)
 
diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c
index 4b8ee2014da6..a28716d8fc54 100644
--- a/drivers/cpufreq/pmac32-cpufreq.c
+++ b/drivers/cpufreq/pmac32-cpufreq.c
@@ -23,7 +23,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/hardirq.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 
 #include <asm/machdep.h>
 #include <asm/irq.h>
diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c
index ba9c31d98bd6..2cd2b06849a2 100644
--- a/drivers/cpufreq/pmac64-cpufreq.c
+++ b/drivers/cpufreq/pmac64-cpufreq.c
@@ -21,7 +21,7 @@
 #include <linux/init.h>
 #include <linux/completion.h>
 #include <linux/mutex.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 
 #include <asm/machdep.h>
 #include <asm/irq.h>
diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
index 2f581d2d617d..df165a078d14 100644
--- a/drivers/cpufreq/qcom-cpufreq-hw.c
+++ b/drivers/cpufreq/qcom-cpufreq-hw.c
@@ -11,8 +11,8 @@
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of_address.h>
-#include <linux/of_platform.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
 #include <linux/pm_opp.h>
 #include <linux/pm_qos.h>
 #include <linux/slab.h>
diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c
index c6fdf019dbde..78b875db6b66 100644
--- a/drivers/cpufreq/spear-cpufreq.c
+++ b/drivers/cpufreq/spear-cpufreq.c
@@ -18,7 +18,7 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/types.h>
diff --git a/drivers/cpufreq/tegra124-cpufreq.c b/drivers/cpufreq/tegra124-cpufreq.c
index 7a1ea6fdcab6..312ca5ddc6c4 100644
--- a/drivers/cpufreq/tegra124-cpufreq.c
+++ b/drivers/cpufreq/tegra124-cpufreq.c
@@ -11,7 +11,6 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
 #include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm_opp.h>
diff --git a/drivers/cpufreq/tegra20-cpufreq.c b/drivers/cpufreq/tegra20-cpufreq.c
index ab7ac7df9e62..5d1f5f87e46d 100644
--- a/drivers/cpufreq/tegra20-cpufreq.c
+++ b/drivers/cpufreq/tegra20-cpufreq.c
@@ -12,7 +12,7 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm_opp.h>
 #include <linux/types.h>
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 65623233ab2f..3ac4a10d4651 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -15,7 +15,6 @@
 #include <linux/kobject.h>
 #include <linux/notifier.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/pm_opp.h>
 #include <linux/pm_qos.h>
 #include <linux/spinlock.h>

-- 
2.39.2


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

* [PATCH 14/19] cpufreq: Adjust includes to remove of_device.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Adjust the
include files with what was implicitly included by of_device.h (cpu.h and
of.h) and drop including of_device.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/cpufreq/cpufreq-dt-platdev.c | 1 -
 drivers/cpufreq/kirkwood-cpufreq.c   | 2 +-
 drivers/cpufreq/maple-cpufreq.c      | 2 +-
 drivers/cpufreq/pmac32-cpufreq.c     | 2 +-
 drivers/cpufreq/pmac64-cpufreq.c     | 2 +-
 drivers/cpufreq/qcom-cpufreq-hw.c    | 4 ++--
 drivers/cpufreq/spear-cpufreq.c      | 2 +-
 drivers/cpufreq/tegra124-cpufreq.c   | 1 -
 drivers/cpufreq/tegra20-cpufreq.c    | 2 +-
 include/linux/cpufreq.h              | 1 -
 10 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index e85703651098..f9675e1a8529 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -6,7 +6,6 @@
 
 #include <linux/err.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 
 #include "cpufreq-dt.h"
diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c
index 70ad8fe1d78b..95588101efbd 100644
--- a/drivers/cpufreq/kirkwood-cpufreq.c
+++ b/drivers/cpufreq/kirkwood-cpufreq.c
@@ -9,7 +9,7 @@
 #include <linux/module.h>
 #include <linux/clk.h>
 #include <linux/cpufreq.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <asm/proc-fns.h>
diff --git a/drivers/cpufreq/maple-cpufreq.c b/drivers/cpufreq/maple-cpufreq.c
index 28d346062166..f9306410a07f 100644
--- a/drivers/cpufreq/maple-cpufreq.c
+++ b/drivers/cpufreq/maple-cpufreq.c
@@ -23,7 +23,7 @@
 #include <linux/completion.h>
 #include <linux/mutex.h>
 #include <linux/time.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 
 #define DBG(fmt...) pr_debug(fmt)
 
diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c
index 4b8ee2014da6..a28716d8fc54 100644
--- a/drivers/cpufreq/pmac32-cpufreq.c
+++ b/drivers/cpufreq/pmac32-cpufreq.c
@@ -23,7 +23,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/hardirq.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 
 #include <asm/machdep.h>
 #include <asm/irq.h>
diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c
index ba9c31d98bd6..2cd2b06849a2 100644
--- a/drivers/cpufreq/pmac64-cpufreq.c
+++ b/drivers/cpufreq/pmac64-cpufreq.c
@@ -21,7 +21,7 @@
 #include <linux/init.h>
 #include <linux/completion.h>
 #include <linux/mutex.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 
 #include <asm/machdep.h>
 #include <asm/irq.h>
diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
index 2f581d2d617d..df165a078d14 100644
--- a/drivers/cpufreq/qcom-cpufreq-hw.c
+++ b/drivers/cpufreq/qcom-cpufreq-hw.c
@@ -11,8 +11,8 @@
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of_address.h>
-#include <linux/of_platform.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
 #include <linux/pm_opp.h>
 #include <linux/pm_qos.h>
 #include <linux/slab.h>
diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c
index c6fdf019dbde..78b875db6b66 100644
--- a/drivers/cpufreq/spear-cpufreq.c
+++ b/drivers/cpufreq/spear-cpufreq.c
@@ -18,7 +18,7 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/types.h>
diff --git a/drivers/cpufreq/tegra124-cpufreq.c b/drivers/cpufreq/tegra124-cpufreq.c
index 7a1ea6fdcab6..312ca5ddc6c4 100644
--- a/drivers/cpufreq/tegra124-cpufreq.c
+++ b/drivers/cpufreq/tegra124-cpufreq.c
@@ -11,7 +11,6 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
 #include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm_opp.h>
diff --git a/drivers/cpufreq/tegra20-cpufreq.c b/drivers/cpufreq/tegra20-cpufreq.c
index ab7ac7df9e62..5d1f5f87e46d 100644
--- a/drivers/cpufreq/tegra20-cpufreq.c
+++ b/drivers/cpufreq/tegra20-cpufreq.c
@@ -12,7 +12,7 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm_opp.h>
 #include <linux/types.h>
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 65623233ab2f..3ac4a10d4651 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -15,7 +15,6 @@
 #include <linux/kobject.h>
 #include <linux/notifier.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/pm_opp.h>
 #include <linux/pm_qos.h>
 #include <linux/spinlock.h>

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 14/19] cpufreq: Adjust includes to remove of_device.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Adjust the
include files with what was implicitly included by of_device.h (cpu.h and
of.h) and drop including of_device.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/cpufreq/cpufreq-dt-platdev.c | 1 -
 drivers/cpufreq/kirkwood-cpufreq.c   | 2 +-
 drivers/cpufreq/maple-cpufreq.c      | 2 +-
 drivers/cpufreq/pmac32-cpufreq.c     | 2 +-
 drivers/cpufreq/pmac64-cpufreq.c     | 2 +-
 drivers/cpufreq/qcom-cpufreq-hw.c    | 4 ++--
 drivers/cpufreq/spear-cpufreq.c      | 2 +-
 drivers/cpufreq/tegra124-cpufreq.c   | 1 -
 drivers/cpufreq/tegra20-cpufreq.c    | 2 +-
 include/linux/cpufreq.h              | 1 -
 10 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index e85703651098..f9675e1a8529 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -6,7 +6,6 @@
 
 #include <linux/err.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 
 #include "cpufreq-dt.h"
diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c
index 70ad8fe1d78b..95588101efbd 100644
--- a/drivers/cpufreq/kirkwood-cpufreq.c
+++ b/drivers/cpufreq/kirkwood-cpufreq.c
@@ -9,7 +9,7 @@
 #include <linux/module.h>
 #include <linux/clk.h>
 #include <linux/cpufreq.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <asm/proc-fns.h>
diff --git a/drivers/cpufreq/maple-cpufreq.c b/drivers/cpufreq/maple-cpufreq.c
index 28d346062166..f9306410a07f 100644
--- a/drivers/cpufreq/maple-cpufreq.c
+++ b/drivers/cpufreq/maple-cpufreq.c
@@ -23,7 +23,7 @@
 #include <linux/completion.h>
 #include <linux/mutex.h>
 #include <linux/time.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 
 #define DBG(fmt...) pr_debug(fmt)
 
diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c
index 4b8ee2014da6..a28716d8fc54 100644
--- a/drivers/cpufreq/pmac32-cpufreq.c
+++ b/drivers/cpufreq/pmac32-cpufreq.c
@@ -23,7 +23,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/hardirq.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 
 #include <asm/machdep.h>
 #include <asm/irq.h>
diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c
index ba9c31d98bd6..2cd2b06849a2 100644
--- a/drivers/cpufreq/pmac64-cpufreq.c
+++ b/drivers/cpufreq/pmac64-cpufreq.c
@@ -21,7 +21,7 @@
 #include <linux/init.h>
 #include <linux/completion.h>
 #include <linux/mutex.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 
 #include <asm/machdep.h>
 #include <asm/irq.h>
diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
index 2f581d2d617d..df165a078d14 100644
--- a/drivers/cpufreq/qcom-cpufreq-hw.c
+++ b/drivers/cpufreq/qcom-cpufreq-hw.c
@@ -11,8 +11,8 @@
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of_address.h>
-#include <linux/of_platform.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
 #include <linux/pm_opp.h>
 #include <linux/pm_qos.h>
 #include <linux/slab.h>
diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c
index c6fdf019dbde..78b875db6b66 100644
--- a/drivers/cpufreq/spear-cpufreq.c
+++ b/drivers/cpufreq/spear-cpufreq.c
@@ -18,7 +18,7 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/types.h>
diff --git a/drivers/cpufreq/tegra124-cpufreq.c b/drivers/cpufreq/tegra124-cpufreq.c
index 7a1ea6fdcab6..312ca5ddc6c4 100644
--- a/drivers/cpufreq/tegra124-cpufreq.c
+++ b/drivers/cpufreq/tegra124-cpufreq.c
@@ -11,7 +11,6 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
 #include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm_opp.h>
diff --git a/drivers/cpufreq/tegra20-cpufreq.c b/drivers/cpufreq/tegra20-cpufreq.c
index ab7ac7df9e62..5d1f5f87e46d 100644
--- a/drivers/cpufreq/tegra20-cpufreq.c
+++ b/drivers/cpufreq/tegra20-cpufreq.c
@@ -12,7 +12,7 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm_opp.h>
 #include <linux/types.h>
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 65623233ab2f..3ac4a10d4651 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -15,7 +15,6 @@
 #include <linux/kobject.h>
 #include <linux/notifier.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/pm_opp.h>
 #include <linux/pm_qos.h>
 #include <linux/spinlock.h>

-- 
2.39.2


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

* [PATCH 15/19] cpufreq: sun50i: Add explicit include for cpu.h
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:52   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Removing the include of cpu.h from of_device.h causes an error:

drivers/cpufreq/sun50i-cpufreq-nvmem.c:42:19: error: implicit declaration of function ‘get_cpu_device’; did you mean ‘get_device’? [-Werror=implicit-function-declaration]

As of_device.h is not otherwise needed, it can be replaced with of.h
(also implicitly included).

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/cpufreq/sun50i-cpufreq-nvmem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/sun50i-cpufreq-nvmem.c b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
index 1583a370da39..4321d7bbe769 100644
--- a/drivers/cpufreq/sun50i-cpufreq-nvmem.c
+++ b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
@@ -10,9 +10,10 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
+#include <linux/cpu.h>
 #include <linux/module.h>
 #include <linux/nvmem-consumer.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm_opp.h>
 #include <linux/slab.h>

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 15/19] cpufreq: sun50i: Add explicit include for cpu.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Removing the include of cpu.h from of_device.h causes an error:

drivers/cpufreq/sun50i-cpufreq-nvmem.c:42:19: error: implicit declaration of function ‘get_cpu_device’; did you mean ‘get_device’? [-Werror=implicit-function-declaration]

As of_device.h is not otherwise needed, it can be replaced with of.h
(also implicitly included).

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/cpufreq/sun50i-cpufreq-nvmem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/sun50i-cpufreq-nvmem.c b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
index 1583a370da39..4321d7bbe769 100644
--- a/drivers/cpufreq/sun50i-cpufreq-nvmem.c
+++ b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
@@ -10,9 +10,10 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
+#include <linux/cpu.h>
 #include <linux/module.h>
 #include <linux/nvmem-consumer.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm_opp.h>
 #include <linux/slab.h>

-- 
2.39.2


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

* [PATCH 15/19] cpufreq: sun50i: Add explicit include for cpu.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

Removing the include of cpu.h from of_device.h causes an error:

drivers/cpufreq/sun50i-cpufreq-nvmem.c:42:19: error: implicit declaration of function ‘get_cpu_device’; did you mean ‘get_device’? [-Werror=implicit-function-declaration]

As of_device.h is not otherwise needed, it can be replaced with of.h
(also implicitly included).

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/cpufreq/sun50i-cpufreq-nvmem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/sun50i-cpufreq-nvmem.c b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
index 1583a370da39..4321d7bbe769 100644
--- a/drivers/cpufreq/sun50i-cpufreq-nvmem.c
+++ b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
@@ -10,9 +10,10 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
+#include <linux/cpu.h>
 #include <linux/module.h>
 #include <linux/nvmem-consumer.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm_opp.h>
 #include <linux/slab.h>

-- 
2.39.2


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

* [PATCH 16/19] cpuidle: Adjust includes to remove of_device.h
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:52   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Adjust the
include files with what was implicitly included by of_device.h (cpu.h,
cpuhotplug.h, of.h, and of_platform.h) and drop including of_device.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/cpuidle/cpuidle-psci.c      | 1 -
 drivers/cpuidle/cpuidle-qcom-spm.c  | 3 +--
 drivers/cpuidle/cpuidle-riscv-sbi.c | 2 +-
 drivers/cpuidle/dt_idle_states.c    | 1 -
 4 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
index 6de027f9f6f5..bf68920d038a 100644
--- a/drivers/cpuidle/cpuidle-psci.c
+++ b/drivers/cpuidle/cpuidle-psci.c
@@ -16,7 +16,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/psci.h>
 #include <linux/pm_domain.h>
diff --git a/drivers/cpuidle/cpuidle-qcom-spm.c b/drivers/cpuidle/cpuidle-qcom-spm.c
index c6e2e91bb4c3..1fc9968eae19 100644
--- a/drivers/cpuidle/cpuidle-qcom-spm.c
+++ b/drivers/cpuidle/cpuidle-qcom-spm.c
@@ -11,8 +11,7 @@
 #include <linux/io.h>
 #include <linux/slab.h>
 #include <linux/of.h>
-#include <linux/of_address.h>
-#include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
 #include <linux/cpuidle.h>
diff --git a/drivers/cpuidle/cpuidle-riscv-sbi.c b/drivers/cpuidle/cpuidle-riscv-sbi.c
index be383f4b6855..ae0b838a0634 100644
--- a/drivers/cpuidle/cpuidle-riscv-sbi.c
+++ b/drivers/cpuidle/cpuidle-riscv-sbi.c
@@ -8,6 +8,7 @@
 
 #define pr_fmt(fmt) "cpuidle-riscv-sbi: " fmt
 
+#include <linux/cpuhotplug.h>
 #include <linux/cpuidle.h>
 #include <linux/cpumask.h>
 #include <linux/cpu_pm.h>
@@ -15,7 +16,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/slab.h>
 #include <linux/platform_device.h>
 #include <linux/pm_domain.h>
diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c
index 02aa0b39af9d..12fec92a85fd 100644
--- a/drivers/cpuidle/dt_idle_states.c
+++ b/drivers/cpuidle/dt_idle_states.c
@@ -14,7 +14,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 
 #include "dt_idle_states.h"
 

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 16/19] cpuidle: Adjust includes to remove of_device.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Adjust the
include files with what was implicitly included by of_device.h (cpu.h,
cpuhotplug.h, of.h, and of_platform.h) and drop including of_device.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/cpuidle/cpuidle-psci.c      | 1 -
 drivers/cpuidle/cpuidle-qcom-spm.c  | 3 +--
 drivers/cpuidle/cpuidle-riscv-sbi.c | 2 +-
 drivers/cpuidle/dt_idle_states.c    | 1 -
 4 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
index 6de027f9f6f5..bf68920d038a 100644
--- a/drivers/cpuidle/cpuidle-psci.c
+++ b/drivers/cpuidle/cpuidle-psci.c
@@ -16,7 +16,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/psci.h>
 #include <linux/pm_domain.h>
diff --git a/drivers/cpuidle/cpuidle-qcom-spm.c b/drivers/cpuidle/cpuidle-qcom-spm.c
index c6e2e91bb4c3..1fc9968eae19 100644
--- a/drivers/cpuidle/cpuidle-qcom-spm.c
+++ b/drivers/cpuidle/cpuidle-qcom-spm.c
@@ -11,8 +11,7 @@
 #include <linux/io.h>
 #include <linux/slab.h>
 #include <linux/of.h>
-#include <linux/of_address.h>
-#include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
 #include <linux/cpuidle.h>
diff --git a/drivers/cpuidle/cpuidle-riscv-sbi.c b/drivers/cpuidle/cpuidle-riscv-sbi.c
index be383f4b6855..ae0b838a0634 100644
--- a/drivers/cpuidle/cpuidle-riscv-sbi.c
+++ b/drivers/cpuidle/cpuidle-riscv-sbi.c
@@ -8,6 +8,7 @@
 
 #define pr_fmt(fmt) "cpuidle-riscv-sbi: " fmt
 
+#include <linux/cpuhotplug.h>
 #include <linux/cpuidle.h>
 #include <linux/cpumask.h>
 #include <linux/cpu_pm.h>
@@ -15,7 +16,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/slab.h>
 #include <linux/platform_device.h>
 #include <linux/pm_domain.h>
diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c
index 02aa0b39af9d..12fec92a85fd 100644
--- a/drivers/cpuidle/dt_idle_states.c
+++ b/drivers/cpuidle/dt_idle_states.c
@@ -14,7 +14,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 
 #include "dt_idle_states.h"
 

-- 
2.39.2


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

* [PATCH 16/19] cpuidle: Adjust includes to remove of_device.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Adjust the
include files with what was implicitly included by of_device.h (cpu.h,
cpuhotplug.h, of.h, and of_platform.h) and drop including of_device.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/cpuidle/cpuidle-psci.c      | 1 -
 drivers/cpuidle/cpuidle-qcom-spm.c  | 3 +--
 drivers/cpuidle/cpuidle-riscv-sbi.c | 2 +-
 drivers/cpuidle/dt_idle_states.c    | 1 -
 4 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
index 6de027f9f6f5..bf68920d038a 100644
--- a/drivers/cpuidle/cpuidle-psci.c
+++ b/drivers/cpuidle/cpuidle-psci.c
@@ -16,7 +16,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/psci.h>
 #include <linux/pm_domain.h>
diff --git a/drivers/cpuidle/cpuidle-qcom-spm.c b/drivers/cpuidle/cpuidle-qcom-spm.c
index c6e2e91bb4c3..1fc9968eae19 100644
--- a/drivers/cpuidle/cpuidle-qcom-spm.c
+++ b/drivers/cpuidle/cpuidle-qcom-spm.c
@@ -11,8 +11,7 @@
 #include <linux/io.h>
 #include <linux/slab.h>
 #include <linux/of.h>
-#include <linux/of_address.h>
-#include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
 #include <linux/cpuidle.h>
diff --git a/drivers/cpuidle/cpuidle-riscv-sbi.c b/drivers/cpuidle/cpuidle-riscv-sbi.c
index be383f4b6855..ae0b838a0634 100644
--- a/drivers/cpuidle/cpuidle-riscv-sbi.c
+++ b/drivers/cpuidle/cpuidle-riscv-sbi.c
@@ -8,6 +8,7 @@
 
 #define pr_fmt(fmt) "cpuidle-riscv-sbi: " fmt
 
+#include <linux/cpuhotplug.h>
 #include <linux/cpuidle.h>
 #include <linux/cpumask.h>
 #include <linux/cpu_pm.h>
@@ -15,7 +16,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/slab.h>
 #include <linux/platform_device.h>
 #include <linux/pm_domain.h>
diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c
index 02aa0b39af9d..12fec92a85fd 100644
--- a/drivers/cpuidle/dt_idle_states.c
+++ b/drivers/cpuidle/dt_idle_states.c
@@ -14,7 +14,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 
 #include "dt_idle_states.h"
 

-- 
2.39.2


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

* [PATCH 17/19] irqchip: loongson-eiointc: Add explicit include for cpuhotplug.h
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:52   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Removing the include of cpu.h from of_device.h causes an error:

drivers/irqchip/irq-loongson-eiointc.c:420:9: error: implicit declaration of function 'cpuhp_setup_state_nocalls' [-Werror=implicit-function-declaration]

This driver doesn't even use DT, so all the DT includes can be dropped.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/irqchip/irq-loongson-eiointc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c
index d15fd38c1756..fd9d87f1470e 100644
--- a/drivers/irqchip/irq-loongson-eiointc.c
+++ b/drivers/irqchip/irq-loongson-eiointc.c
@@ -7,16 +7,13 @@
 
 #define pr_fmt(fmt) "eiointc: " fmt
 
+#include <linux/cpuhotplug.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/irqchip.h>
 #include <linux/irqdomain.h>
 #include <linux/irqchip/chained_irq.h>
 #include <linux/kernel.h>
-#include <linux/platform_device.h>
-#include <linux/of_address.h>
-#include <linux/of_irq.h>
-#include <linux/of_platform.h>
 #include <linux/syscore_ops.h>
 
 #define EIOINTC_REG_NODEMAP	0x14a0

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 17/19] irqchip: loongson-eiointc: Add explicit include for cpuhotplug.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Removing the include of cpu.h from of_device.h causes an error:

drivers/irqchip/irq-loongson-eiointc.c:420:9: error: implicit declaration of function 'cpuhp_setup_state_nocalls' [-Werror=implicit-function-declaration]

This driver doesn't even use DT, so all the DT includes can be dropped.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/irqchip/irq-loongson-eiointc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c
index d15fd38c1756..fd9d87f1470e 100644
--- a/drivers/irqchip/irq-loongson-eiointc.c
+++ b/drivers/irqchip/irq-loongson-eiointc.c
@@ -7,16 +7,13 @@
 
 #define pr_fmt(fmt) "eiointc: " fmt
 
+#include <linux/cpuhotplug.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/irqchip.h>
 #include <linux/irqdomain.h>
 #include <linux/irqchip/chained_irq.h>
 #include <linux/kernel.h>
-#include <linux/platform_device.h>
-#include <linux/of_address.h>
-#include <linux/of_irq.h>
-#include <linux/of_platform.h>
 #include <linux/syscore_ops.h>
 
 #define EIOINTC_REG_NODEMAP	0x14a0

-- 
2.39.2


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

* [PATCH 17/19] irqchip: loongson-eiointc: Add explicit include for cpuhotplug.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

Removing the include of cpu.h from of_device.h causes an error:

drivers/irqchip/irq-loongson-eiointc.c:420:9: error: implicit declaration of function 'cpuhp_setup_state_nocalls' [-Werror=implicit-function-declaration]

This driver doesn't even use DT, so all the DT includes can be dropped.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/irqchip/irq-loongson-eiointc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c
index d15fd38c1756..fd9d87f1470e 100644
--- a/drivers/irqchip/irq-loongson-eiointc.c
+++ b/drivers/irqchip/irq-loongson-eiointc.c
@@ -7,16 +7,13 @@
 
 #define pr_fmt(fmt) "eiointc: " fmt
 
+#include <linux/cpuhotplug.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/irqchip.h>
 #include <linux/irqdomain.h>
 #include <linux/irqchip/chained_irq.h>
 #include <linux/kernel.h>
-#include <linux/platform_device.h>
-#include <linux/of_address.h>
-#include <linux/of_irq.h>
-#include <linux/of_platform.h>
 #include <linux/syscore_ops.h>
 
 #define EIOINTC_REG_NODEMAP	0x14a0

-- 
2.39.2


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

* [PATCH 18/19] OPP: Adjust includes to remove of_device.h
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:52   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Adjust the
include files with what was implicitly included by of_device.h (cpu.h and
of.h) and drop including of_device.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/opp/of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/opp/of.c b/drivers/opp/of.c
index e55c6095adf0..63b126c6215e 100644
--- a/drivers/opp/of.c
+++ b/drivers/opp/of.c
@@ -13,7 +13,7 @@
 #include <linux/cpu.h>
 #include <linux/errno.h>
 #include <linux/device.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/pm_domain.h>
 #include <linux/slab.h>
 #include <linux/export.h>

-- 
2.39.2


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

* [PATCH 18/19] OPP: Adjust includes to remove of_device.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Adjust the
include files with what was implicitly included by of_device.h (cpu.h and
of.h) and drop including of_device.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/opp/of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/opp/of.c b/drivers/opp/of.c
index e55c6095adf0..63b126c6215e 100644
--- a/drivers/opp/of.c
+++ b/drivers/opp/of.c
@@ -13,7 +13,7 @@
 #include <linux/cpu.h>
 #include <linux/errno.h>
 #include <linux/device.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/pm_domain.h>
 #include <linux/slab.h>
 #include <linux/export.h>

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 18/19] OPP: Adjust includes to remove of_device.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Adjust the
include files with what was implicitly included by of_device.h (cpu.h and
of.h) and drop including of_device.h.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take the series via the DT tree.
---
 drivers/opp/of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/opp/of.c b/drivers/opp/of.c
index e55c6095adf0..63b126c6215e 100644
--- a/drivers/opp/of.c
+++ b/drivers/opp/of.c
@@ -13,7 +13,7 @@
 #include <linux/cpu.h>
 #include <linux/errno.h>
 #include <linux/device.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/pm_domain.h>
 #include <linux/slab.h>
 #include <linux/export.h>

-- 
2.39.2


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

* [PATCH 19/19] of: Drop cpu.h include from of_device.h
  2023-03-29 15:51 ` Rob Herring
  (?)
@ 2023-03-29 15:52   ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Now that all users which had an implicit dependency on cpu.h have been
fixed. the cpu.h include can be dropped from of_device.h

Signed-off-by: Rob Herring <robh@kernel.org>
---
 include/linux/of_device.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index 5cdafe19dc80..7ac9a8ae9c80 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -2,7 +2,6 @@
 #ifndef _LINUX_OF_DEVICE_H
 #define _LINUX_OF_DEVICE_H
 
-#include <linux/cpu.h>
 #include <linux/platform_device.h>
 #include <linux/of_platform.h> /* temporary until merge */
 

-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 19/19] of: Drop cpu.h include from of_device.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Now that all users which had an implicit dependency on cpu.h have been
fixed. the cpu.h include can be dropped from of_device.h

Signed-off-by: Rob Herring <robh@kernel.org>
---
 include/linux/of_device.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index 5cdafe19dc80..7ac9a8ae9c80 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -2,7 +2,6 @@
 #ifndef _LINUX_OF_DEVICE_H
 #define _LINUX_OF_DEVICE_H
 
-#include <linux/cpu.h>
 #include <linux/platform_device.h>
 #include <linux/of_platform.h> /* temporary until merge */
 

-- 
2.39.2


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

* [PATCH 19/19] of: Drop cpu.h include from of_device.h
@ 2023-03-29 15:52   ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2023-03-29 15:52 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

Now that all users which had an implicit dependency on cpu.h have been
fixed. the cpu.h include can be dropped from of_device.h

Signed-off-by: Rob Herring <robh@kernel.org>
---
 include/linux/of_device.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index 5cdafe19dc80..7ac9a8ae9c80 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -2,7 +2,6 @@
 #ifndef _LINUX_OF_DEVICE_H
 #define _LINUX_OF_DEVICE_H
 
-#include <linux/cpu.h>
 #include <linux/platform_device.h>
 #include <linux/of_platform.h> /* temporary until merge */
 

-- 
2.39.2


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

* Re: [PATCH 06/19] ARM: sunxi: Drop of_device.h include
  2023-03-29 15:52   ` Rob Herring
  (?)
@ 2023-03-29 15:56     ` Chen-Yu Tsai
  -1 siblings, 0 replies; 112+ messages in thread
From: Chen-Yu Tsai @ 2023-03-29 15:56 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Jernej Skrabec, Samuel Holland, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki, Daniel Lezcano,
	Thomas Gleixner, Amit Daniel Kachhap, Viresh Kumar, Lukasz Luba,
	Amit Kucheria, Zhang Rui, Matthias Brugger,
	AngeloGioacchino Del Regno, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Thierry Reding, Jonathan Hunter, Yangtao Li,
	Lorenzo Pieralisi, Sudeep Holla, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Anup Patel, Huacai Chen, Jiaxun Yang,
	Marc Zyngier, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

On Wed, Mar 29, 2023 at 11:53 PM Rob Herring <robh@kernel.org> wrote:
>
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Just drop
> including of_device.h as of.h is already included.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.

Acked-by: Chen-Yu Tsai <wens@csie.org>

I doubt this file would ever see any more changes.

> ---
>  arch/arm/mach-sunxi/mc_smp.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/arch/arm/mach-sunxi/mc_smp.c b/arch/arm/mach-sunxi/mc_smp.c
> index 26cbce135338..cb63921232a6 100644
> --- a/arch/arm/mach-sunxi/mc_smp.c
> +++ b/arch/arm/mach-sunxi/mc_smp.c
> @@ -19,7 +19,6 @@
>  #include <linux/irqchip/arm-gic.h>
>  #include <linux/of.h>
>  #include <linux/of_address.h>
> -#include <linux/of_device.h>
>  #include <linux/smp.h>
>
>  #include <asm/cacheflush.h>
>
> --
> 2.39.2
>

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

* Re: [PATCH 06/19] ARM: sunxi: Drop of_device.h include
@ 2023-03-29 15:56     ` Chen-Yu Tsai
  0 siblings, 0 replies; 112+ messages in thread
From: Chen-Yu Tsai @ 2023-03-29 15:56 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Jernej Skrabec, Samuel Holland, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki, Daniel Lezcano,
	Thomas Gleixner, Amit Daniel Kachhap, Viresh Kumar, Lukasz Luba,
	Amit Kucheria, Zhang Rui, Matthias Brugger,
	AngeloGioacchino Del Regno, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Thierry Reding, Jonathan Hunter, Yangtao Li,
	Lorenzo Pieralisi, Sudeep Holla, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Anup Patel, Huacai Chen, Jiaxun Yang,
	Marc Zyngier, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

On Wed, Mar 29, 2023 at 11:53 PM Rob Herring <robh@kernel.org> wrote:
>
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Just drop
> including of_device.h as of.h is already included.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.

Acked-by: Chen-Yu Tsai <wens@csie.org>

I doubt this file would ever see any more changes.

> ---
>  arch/arm/mach-sunxi/mc_smp.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/arch/arm/mach-sunxi/mc_smp.c b/arch/arm/mach-sunxi/mc_smp.c
> index 26cbce135338..cb63921232a6 100644
> --- a/arch/arm/mach-sunxi/mc_smp.c
> +++ b/arch/arm/mach-sunxi/mc_smp.c
> @@ -19,7 +19,6 @@
>  #include <linux/irqchip/arm-gic.h>
>  #include <linux/of.h>
>  #include <linux/of_address.h>
> -#include <linux/of_device.h>
>  #include <linux/smp.h>
>
>  #include <asm/cacheflush.h>
>
> --
> 2.39.2
>

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 06/19] ARM: sunxi: Drop of_device.h include
@ 2023-03-29 15:56     ` Chen-Yu Tsai
  0 siblings, 0 replies; 112+ messages in thread
From: Chen-Yu Tsai @ 2023-03-29 15:56 UTC (permalink / raw)
  To: Rob Herring
  Cc: Nishanth Menon, Huacai Chen, Rafael J. Wysocki, Yangtao Li,
	Viresh Kumar, Lorenzo Pieralisi, Amit Kucheria, Jiaxun Yang,
	linux-mips, linux-tegra, Thierry Reding, sparclinux, linux-riscv,
	Frank Rowand, Viresh Kumar, Bjorn Andersson, Marc Zyngier,
	Samuel Holland, Daniel Lezcano, Russell King, Jernej Skrabec,
	Jonathan Hunter, Andy Gross, Anup Patel, Zhang Rui, linux-sunxi,
	devicetree, Albert Ou

On Wed, Mar 29, 2023 at 11:53 PM Rob Herring <robh@kernel.org> wrote:
>
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Just drop
> including of_device.h as of.h is already included.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.

Acked-by: Chen-Yu Tsai <wens@csie.org>

I doubt this file would ever see any more changes.

> ---
>  arch/arm/mach-sunxi/mc_smp.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/arch/arm/mach-sunxi/mc_smp.c b/arch/arm/mach-sunxi/mc_smp.c
> index 26cbce135338..cb63921232a6 100644
> --- a/arch/arm/mach-sunxi/mc_smp.c
> +++ b/arch/arm/mach-sunxi/mc_smp.c
> @@ -19,7 +19,6 @@
>  #include <linux/irqchip/arm-gic.h>
>  #include <linux/of.h>
>  #include <linux/of_address.h>
> -#include <linux/of_device.h>
>  #include <linux/smp.h>
>
>  #include <asm/cacheflush.h>
>
> --
> 2.39.2
>

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

* Re: [PATCH 16/19] cpuidle: Adjust includes to remove of_device.h
  2023-03-29 15:52   ` Rob Herring
  (?)
@ 2023-03-29 15:57     ` Rafael J. Wysocki
  -1 siblings, 0 replies; 112+ messages in thread
From: Rafael J. Wysocki @ 2023-03-29 15:57 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd, sparclinux, linux-kernel,
	devicetree, linux-arm-kernel, linux-sunxi, linux-riscv, linux-pm,
	linux-mediatek, linuxppc-dev, linux-tegra, linux-arm-msm,
	linux-mips

On Wed, Mar 29, 2023 at 5:52 PM Rob Herring <robh@kernel.org> wrote:
>
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h,
> cpuhotplug.h, of.h, and of_platform.h) and drop including of_device.h.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

> ---
>  drivers/cpuidle/cpuidle-psci.c      | 1 -
>  drivers/cpuidle/cpuidle-qcom-spm.c  | 3 +--
>  drivers/cpuidle/cpuidle-riscv-sbi.c | 2 +-
>  drivers/cpuidle/dt_idle_states.c    | 1 -
>  4 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
> index 6de027f9f6f5..bf68920d038a 100644
> --- a/drivers/cpuidle/cpuidle-psci.c
> +++ b/drivers/cpuidle/cpuidle-psci.c
> @@ -16,7 +16,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/platform_device.h>
>  #include <linux/psci.h>
>  #include <linux/pm_domain.h>
> diff --git a/drivers/cpuidle/cpuidle-qcom-spm.c b/drivers/cpuidle/cpuidle-qcom-spm.c
> index c6e2e91bb4c3..1fc9968eae19 100644
> --- a/drivers/cpuidle/cpuidle-qcom-spm.c
> +++ b/drivers/cpuidle/cpuidle-qcom-spm.c
> @@ -11,8 +11,7 @@
>  #include <linux/io.h>
>  #include <linux/slab.h>
>  #include <linux/of.h>
> -#include <linux/of_address.h>
> -#include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/err.h>
>  #include <linux/platform_device.h>
>  #include <linux/cpuidle.h>
> diff --git a/drivers/cpuidle/cpuidle-riscv-sbi.c b/drivers/cpuidle/cpuidle-riscv-sbi.c
> index be383f4b6855..ae0b838a0634 100644
> --- a/drivers/cpuidle/cpuidle-riscv-sbi.c
> +++ b/drivers/cpuidle/cpuidle-riscv-sbi.c
> @@ -8,6 +8,7 @@
>
>  #define pr_fmt(fmt) "cpuidle-riscv-sbi: " fmt
>
> +#include <linux/cpuhotplug.h>
>  #include <linux/cpuidle.h>
>  #include <linux/cpumask.h>
>  #include <linux/cpu_pm.h>
> @@ -15,7 +16,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/slab.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_domain.h>
> diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c
> index 02aa0b39af9d..12fec92a85fd 100644
> --- a/drivers/cpuidle/dt_idle_states.c
> +++ b/drivers/cpuidle/dt_idle_states.c
> @@ -14,7 +14,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>
>  #include "dt_idle_states.h"
>
>
> --
> 2.39.2
>

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

* Re: [PATCH 16/19] cpuidle: Adjust includes to remove of_device.h
@ 2023-03-29 15:57     ` Rafael J. Wysocki
  0 siblings, 0 replies; 112+ messages in thread
From: Rafael J. Wysocki @ 2023-03-29 15:57 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd, sparclinux, linux-kernel,
	devicetree, linux-arm-kernel, linux-sunxi, linux-riscv, linux-pm,
	linux-mediatek, linuxppc-dev, linux-tegra, linux-arm-msm,
	linux-mips

On Wed, Mar 29, 2023 at 5:52 PM Rob Herring <robh@kernel.org> wrote:
>
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h,
> cpuhotplug.h, of.h, and of_platform.h) and drop including of_device.h.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

> ---
>  drivers/cpuidle/cpuidle-psci.c      | 1 -
>  drivers/cpuidle/cpuidle-qcom-spm.c  | 3 +--
>  drivers/cpuidle/cpuidle-riscv-sbi.c | 2 +-
>  drivers/cpuidle/dt_idle_states.c    | 1 -
>  4 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
> index 6de027f9f6f5..bf68920d038a 100644
> --- a/drivers/cpuidle/cpuidle-psci.c
> +++ b/drivers/cpuidle/cpuidle-psci.c
> @@ -16,7 +16,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/platform_device.h>
>  #include <linux/psci.h>
>  #include <linux/pm_domain.h>
> diff --git a/drivers/cpuidle/cpuidle-qcom-spm.c b/drivers/cpuidle/cpuidle-qcom-spm.c
> index c6e2e91bb4c3..1fc9968eae19 100644
> --- a/drivers/cpuidle/cpuidle-qcom-spm.c
> +++ b/drivers/cpuidle/cpuidle-qcom-spm.c
> @@ -11,8 +11,7 @@
>  #include <linux/io.h>
>  #include <linux/slab.h>
>  #include <linux/of.h>
> -#include <linux/of_address.h>
> -#include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/err.h>
>  #include <linux/platform_device.h>
>  #include <linux/cpuidle.h>
> diff --git a/drivers/cpuidle/cpuidle-riscv-sbi.c b/drivers/cpuidle/cpuidle-riscv-sbi.c
> index be383f4b6855..ae0b838a0634 100644
> --- a/drivers/cpuidle/cpuidle-riscv-sbi.c
> +++ b/drivers/cpuidle/cpuidle-riscv-sbi.c
> @@ -8,6 +8,7 @@
>
>  #define pr_fmt(fmt) "cpuidle-riscv-sbi: " fmt
>
> +#include <linux/cpuhotplug.h>
>  #include <linux/cpuidle.h>
>  #include <linux/cpumask.h>
>  #include <linux/cpu_pm.h>
> @@ -15,7 +16,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/slab.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_domain.h>
> diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c
> index 02aa0b39af9d..12fec92a85fd 100644
> --- a/drivers/cpuidle/dt_idle_states.c
> +++ b/drivers/cpuidle/dt_idle_states.c
> @@ -14,7 +14,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>
>  #include "dt_idle_states.h"
>
>
> --
> 2.39.2
>

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 16/19] cpuidle: Adjust includes to remove of_device.h
@ 2023-03-29 15:57     ` Rafael J. Wysocki
  0 siblings, 0 replies; 112+ messages in thread
From: Rafael J. Wysocki @ 2023-03-29 15:57 UTC (permalink / raw)
  To: Rob Herring
  Cc: Nishanth Menon, Huacai Chen, Rafael J. Wysocki, Yangtao Li,
	Viresh Kumar, Lorenzo Pieralisi, Amit Kucheria, Jiaxun Yang,
	linux-mips, linux-tegra, Thierry Reding, sparclinux, linux-riscv,
	Frank Rowand, Viresh Kumar, Bjorn Andersson, Marc Zyngier,
	Samuel Holland, Daniel Lezcano, Russell King, Jernej Skrabec,
	Jonathan Hunter, Chen-Yu Tsai, Andy Gross, Anup Patel, Zhang Rui,
	linux-sunxi, devicetree, A lbert Ou, linux-pm, linux-arm-msm,
	Nicholas Piggin, Rob Herring, linux-mediatek, Paul Walmsley,
	Matthias Brugger, Thomas Gleixner, linux-arm-kernel,
	AngeloGioacchino Del Regno, Stephen Boyd, Greg Kroah-Hartman,
	Amit Daniel Kachhap, linux-kernel, Konrad Dybcio, Palmer Dabbelt,
	Sudeep Holla, linuxppc-dev, David S. Miller, Lukasz Luba

On Wed, Mar 29, 2023 at 5:52 PM Rob Herring <robh@kernel.org> wrote:
>
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h,
> cpuhotplug.h, of.h, and of_platform.h) and drop including of_device.h.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

> ---
>  drivers/cpuidle/cpuidle-psci.c      | 1 -
>  drivers/cpuidle/cpuidle-qcom-spm.c  | 3 +--
>  drivers/cpuidle/cpuidle-riscv-sbi.c | 2 +-
>  drivers/cpuidle/dt_idle_states.c    | 1 -
>  4 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
> index 6de027f9f6f5..bf68920d038a 100644
> --- a/drivers/cpuidle/cpuidle-psci.c
> +++ b/drivers/cpuidle/cpuidle-psci.c
> @@ -16,7 +16,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/platform_device.h>
>  #include <linux/psci.h>
>  #include <linux/pm_domain.h>
> diff --git a/drivers/cpuidle/cpuidle-qcom-spm.c b/drivers/cpuidle/cpuidle-qcom-spm.c
> index c6e2e91bb4c3..1fc9968eae19 100644
> --- a/drivers/cpuidle/cpuidle-qcom-spm.c
> +++ b/drivers/cpuidle/cpuidle-qcom-spm.c
> @@ -11,8 +11,7 @@
>  #include <linux/io.h>
>  #include <linux/slab.h>
>  #include <linux/of.h>
> -#include <linux/of_address.h>
> -#include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/err.h>
>  #include <linux/platform_device.h>
>  #include <linux/cpuidle.h>
> diff --git a/drivers/cpuidle/cpuidle-riscv-sbi.c b/drivers/cpuidle/cpuidle-riscv-sbi.c
> index be383f4b6855..ae0b838a0634 100644
> --- a/drivers/cpuidle/cpuidle-riscv-sbi.c
> +++ b/drivers/cpuidle/cpuidle-riscv-sbi.c
> @@ -8,6 +8,7 @@
>
>  #define pr_fmt(fmt) "cpuidle-riscv-sbi: " fmt
>
> +#include <linux/cpuhotplug.h>
>  #include <linux/cpuidle.h>
>  #include <linux/cpumask.h>
>  #include <linux/cpu_pm.h>
> @@ -15,7 +16,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/slab.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_domain.h>
> diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c
> index 02aa0b39af9d..12fec92a85fd 100644
> --- a/drivers/cpuidle/dt_idle_states.c
> +++ b/drivers/cpuidle/dt_idle_states.c
> @@ -14,7 +14,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>
>  #include "dt_idle_states.h"
>
>
> --
> 2.39.2
>

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

* Re: [PATCH 14/19] cpufreq: Adjust includes to remove of_device.h
  2023-03-29 15:52   ` Rob Herring
  (?)
@ 2023-03-29 15:57     ` Rafael J. Wysocki
  -1 siblings, 0 replies; 112+ messages in thread
From: Rafael J. Wysocki @ 2023-03-29 15:57 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd, sparclinux, linux-kernel,
	devicetree, linux-arm-kernel, linux-sunxi, linux-riscv, linux-pm,
	linux-mediatek, linuxppc-dev, linux-tegra, linux-arm-msm,
	linux-mips

On Wed, Mar 29, 2023 at 5:53 PM Rob Herring <robh@kernel.org> wrote:
>
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h and
> of.h) and drop including of_device.h.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

> ---
>  drivers/cpufreq/cpufreq-dt-platdev.c | 1 -
>  drivers/cpufreq/kirkwood-cpufreq.c   | 2 +-
>  drivers/cpufreq/maple-cpufreq.c      | 2 +-
>  drivers/cpufreq/pmac32-cpufreq.c     | 2 +-
>  drivers/cpufreq/pmac64-cpufreq.c     | 2 +-
>  drivers/cpufreq/qcom-cpufreq-hw.c    | 4 ++--
>  drivers/cpufreq/spear-cpufreq.c      | 2 +-
>  drivers/cpufreq/tegra124-cpufreq.c   | 1 -
>  drivers/cpufreq/tegra20-cpufreq.c    | 2 +-
>  include/linux/cpufreq.h              | 1 -
>  10 files changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
> index e85703651098..f9675e1a8529 100644
> --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> @@ -6,7 +6,6 @@
>
>  #include <linux/err.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/platform_device.h>
>
>  #include "cpufreq-dt.h"
> diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c
> index 70ad8fe1d78b..95588101efbd 100644
> --- a/drivers/cpufreq/kirkwood-cpufreq.c
> +++ b/drivers/cpufreq/kirkwood-cpufreq.c
> @@ -9,7 +9,7 @@
>  #include <linux/module.h>
>  #include <linux/clk.h>
>  #include <linux/cpufreq.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>  #include <linux/platform_device.h>
>  #include <linux/io.h>
>  #include <asm/proc-fns.h>
> diff --git a/drivers/cpufreq/maple-cpufreq.c b/drivers/cpufreq/maple-cpufreq.c
> index 28d346062166..f9306410a07f 100644
> --- a/drivers/cpufreq/maple-cpufreq.c
> +++ b/drivers/cpufreq/maple-cpufreq.c
> @@ -23,7 +23,7 @@
>  #include <linux/completion.h>
>  #include <linux/mutex.h>
>  #include <linux/time.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>
>  #define DBG(fmt...) pr_debug(fmt)
>
> diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c
> index 4b8ee2014da6..a28716d8fc54 100644
> --- a/drivers/cpufreq/pmac32-cpufreq.c
> +++ b/drivers/cpufreq/pmac32-cpufreq.c
> @@ -23,7 +23,7 @@
>  #include <linux/init.h>
>  #include <linux/device.h>
>  #include <linux/hardirq.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>
>  #include <asm/machdep.h>
>  #include <asm/irq.h>
> diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c
> index ba9c31d98bd6..2cd2b06849a2 100644
> --- a/drivers/cpufreq/pmac64-cpufreq.c
> +++ b/drivers/cpufreq/pmac64-cpufreq.c
> @@ -21,7 +21,7 @@
>  #include <linux/init.h>
>  #include <linux/completion.h>
>  #include <linux/mutex.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>
>  #include <asm/machdep.h>
>  #include <asm/irq.h>
> diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
> index 2f581d2d617d..df165a078d14 100644
> --- a/drivers/cpufreq/qcom-cpufreq-hw.c
> +++ b/drivers/cpufreq/qcom-cpufreq-hw.c
> @@ -11,8 +11,8 @@
>  #include <linux/interrupt.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> -#include <linux/of_address.h>
> -#include <linux/of_platform.h>
> +#include <linux/of.h>
> +#include <linux/platform_device.h>
>  #include <linux/pm_opp.h>
>  #include <linux/pm_qos.h>
>  #include <linux/slab.h>
> diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c
> index c6fdf019dbde..78b875db6b66 100644
> --- a/drivers/cpufreq/spear-cpufreq.c
> +++ b/drivers/cpufreq/spear-cpufreq.c
> @@ -18,7 +18,7 @@
>  #include <linux/err.h>
>  #include <linux/init.h>
>  #include <linux/module.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>  #include <linux/platform_device.h>
>  #include <linux/slab.h>
>  #include <linux/types.h>
> diff --git a/drivers/cpufreq/tegra124-cpufreq.c b/drivers/cpufreq/tegra124-cpufreq.c
> index 7a1ea6fdcab6..312ca5ddc6c4 100644
> --- a/drivers/cpufreq/tegra124-cpufreq.c
> +++ b/drivers/cpufreq/tegra124-cpufreq.c
> @@ -11,7 +11,6 @@
>  #include <linux/init.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> -#include <linux/of_device.h>
>  #include <linux/of.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_opp.h>
> diff --git a/drivers/cpufreq/tegra20-cpufreq.c b/drivers/cpufreq/tegra20-cpufreq.c
> index ab7ac7df9e62..5d1f5f87e46d 100644
> --- a/drivers/cpufreq/tegra20-cpufreq.c
> +++ b/drivers/cpufreq/tegra20-cpufreq.c
> @@ -12,7 +12,7 @@
>  #include <linux/err.h>
>  #include <linux/init.h>
>  #include <linux/module.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_opp.h>
>  #include <linux/types.h>
> diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
> index 65623233ab2f..3ac4a10d4651 100644
> --- a/include/linux/cpufreq.h
> +++ b/include/linux/cpufreq.h
> @@ -15,7 +15,6 @@
>  #include <linux/kobject.h>
>  #include <linux/notifier.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/pm_opp.h>
>  #include <linux/pm_qos.h>
>  #include <linux/spinlock.h>
>
> --
> 2.39.2
>

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

* Re: [PATCH 14/19] cpufreq: Adjust includes to remove of_device.h
@ 2023-03-29 15:57     ` Rafael J. Wysocki
  0 siblings, 0 replies; 112+ messages in thread
From: Rafael J. Wysocki @ 2023-03-29 15:57 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd, sparclinux, linux-kernel,
	devicetree, linux-arm-kernel, linux-sunxi, linux-riscv, linux-pm,
	linux-mediatek, linuxppc-dev, linux-tegra, linux-arm-msm,
	linux-mips

On Wed, Mar 29, 2023 at 5:53 PM Rob Herring <robh@kernel.org> wrote:
>
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h and
> of.h) and drop including of_device.h.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

> ---
>  drivers/cpufreq/cpufreq-dt-platdev.c | 1 -
>  drivers/cpufreq/kirkwood-cpufreq.c   | 2 +-
>  drivers/cpufreq/maple-cpufreq.c      | 2 +-
>  drivers/cpufreq/pmac32-cpufreq.c     | 2 +-
>  drivers/cpufreq/pmac64-cpufreq.c     | 2 +-
>  drivers/cpufreq/qcom-cpufreq-hw.c    | 4 ++--
>  drivers/cpufreq/spear-cpufreq.c      | 2 +-
>  drivers/cpufreq/tegra124-cpufreq.c   | 1 -
>  drivers/cpufreq/tegra20-cpufreq.c    | 2 +-
>  include/linux/cpufreq.h              | 1 -
>  10 files changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
> index e85703651098..f9675e1a8529 100644
> --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> @@ -6,7 +6,6 @@
>
>  #include <linux/err.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/platform_device.h>
>
>  #include "cpufreq-dt.h"
> diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c
> index 70ad8fe1d78b..95588101efbd 100644
> --- a/drivers/cpufreq/kirkwood-cpufreq.c
> +++ b/drivers/cpufreq/kirkwood-cpufreq.c
> @@ -9,7 +9,7 @@
>  #include <linux/module.h>
>  #include <linux/clk.h>
>  #include <linux/cpufreq.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>  #include <linux/platform_device.h>
>  #include <linux/io.h>
>  #include <asm/proc-fns.h>
> diff --git a/drivers/cpufreq/maple-cpufreq.c b/drivers/cpufreq/maple-cpufreq.c
> index 28d346062166..f9306410a07f 100644
> --- a/drivers/cpufreq/maple-cpufreq.c
> +++ b/drivers/cpufreq/maple-cpufreq.c
> @@ -23,7 +23,7 @@
>  #include <linux/completion.h>
>  #include <linux/mutex.h>
>  #include <linux/time.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>
>  #define DBG(fmt...) pr_debug(fmt)
>
> diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c
> index 4b8ee2014da6..a28716d8fc54 100644
> --- a/drivers/cpufreq/pmac32-cpufreq.c
> +++ b/drivers/cpufreq/pmac32-cpufreq.c
> @@ -23,7 +23,7 @@
>  #include <linux/init.h>
>  #include <linux/device.h>
>  #include <linux/hardirq.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>
>  #include <asm/machdep.h>
>  #include <asm/irq.h>
> diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c
> index ba9c31d98bd6..2cd2b06849a2 100644
> --- a/drivers/cpufreq/pmac64-cpufreq.c
> +++ b/drivers/cpufreq/pmac64-cpufreq.c
> @@ -21,7 +21,7 @@
>  #include <linux/init.h>
>  #include <linux/completion.h>
>  #include <linux/mutex.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>
>  #include <asm/machdep.h>
>  #include <asm/irq.h>
> diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
> index 2f581d2d617d..df165a078d14 100644
> --- a/drivers/cpufreq/qcom-cpufreq-hw.c
> +++ b/drivers/cpufreq/qcom-cpufreq-hw.c
> @@ -11,8 +11,8 @@
>  #include <linux/interrupt.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> -#include <linux/of_address.h>
> -#include <linux/of_platform.h>
> +#include <linux/of.h>
> +#include <linux/platform_device.h>
>  #include <linux/pm_opp.h>
>  #include <linux/pm_qos.h>
>  #include <linux/slab.h>
> diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c
> index c6fdf019dbde..78b875db6b66 100644
> --- a/drivers/cpufreq/spear-cpufreq.c
> +++ b/drivers/cpufreq/spear-cpufreq.c
> @@ -18,7 +18,7 @@
>  #include <linux/err.h>
>  #include <linux/init.h>
>  #include <linux/module.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>  #include <linux/platform_device.h>
>  #include <linux/slab.h>
>  #include <linux/types.h>
> diff --git a/drivers/cpufreq/tegra124-cpufreq.c b/drivers/cpufreq/tegra124-cpufreq.c
> index 7a1ea6fdcab6..312ca5ddc6c4 100644
> --- a/drivers/cpufreq/tegra124-cpufreq.c
> +++ b/drivers/cpufreq/tegra124-cpufreq.c
> @@ -11,7 +11,6 @@
>  #include <linux/init.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> -#include <linux/of_device.h>
>  #include <linux/of.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_opp.h>
> diff --git a/drivers/cpufreq/tegra20-cpufreq.c b/drivers/cpufreq/tegra20-cpufreq.c
> index ab7ac7df9e62..5d1f5f87e46d 100644
> --- a/drivers/cpufreq/tegra20-cpufreq.c
> +++ b/drivers/cpufreq/tegra20-cpufreq.c
> @@ -12,7 +12,7 @@
>  #include <linux/err.h>
>  #include <linux/init.h>
>  #include <linux/module.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_opp.h>
>  #include <linux/types.h>
> diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
> index 65623233ab2f..3ac4a10d4651 100644
> --- a/include/linux/cpufreq.h
> +++ b/include/linux/cpufreq.h
> @@ -15,7 +15,6 @@
>  #include <linux/kobject.h>
>  #include <linux/notifier.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/pm_opp.h>
>  #include <linux/pm_qos.h>
>  #include <linux/spinlock.h>
>
> --
> 2.39.2
>

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 14/19] cpufreq: Adjust includes to remove of_device.h
@ 2023-03-29 15:57     ` Rafael J. Wysocki
  0 siblings, 0 replies; 112+ messages in thread
From: Rafael J. Wysocki @ 2023-03-29 15:57 UTC (permalink / raw)
  To: Rob Herring
  Cc: Nishanth Menon, Huacai Chen, Rafael J. Wysocki, Yangtao Li,
	Viresh Kumar, Lorenzo Pieralisi, Amit Kucheria, Jiaxun Yang,
	linux-mips, linux-tegra, Thierry Reding, sparclinux, linux-riscv,
	Frank Rowand, Viresh Kumar, Bjorn Andersson, Marc Zyngier,
	Samuel Holland, Daniel Lezcano, Russell King, Jernej Skrabec,
	Jonathan Hunter, Chen-Yu Tsai, Andy Gross, Anup Patel, Zhang Rui,
	linux-sunxi, devicetree, A lbert Ou, linux-pm, linux-arm-msm,
	Nicholas Piggin, Rob Herring, linux-mediatek, Paul Walmsley,
	Matthias Brugger, Thomas Gleixner, linux-arm-kernel,
	AngeloGioacchino Del Regno, Stephen Boyd, Greg Kroah-Hartman,
	Amit Daniel Kachhap, linux-kernel, Konrad Dybcio, Palmer Dabbelt,
	Sudeep Holla, linuxppc-dev, David S. Miller, Lukasz Luba

On Wed, Mar 29, 2023 at 5:53 PM Rob Herring <robh@kernel.org> wrote:
>
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h and
> of.h) and drop including of_device.h.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

> ---
>  drivers/cpufreq/cpufreq-dt-platdev.c | 1 -
>  drivers/cpufreq/kirkwood-cpufreq.c   | 2 +-
>  drivers/cpufreq/maple-cpufreq.c      | 2 +-
>  drivers/cpufreq/pmac32-cpufreq.c     | 2 +-
>  drivers/cpufreq/pmac64-cpufreq.c     | 2 +-
>  drivers/cpufreq/qcom-cpufreq-hw.c    | 4 ++--
>  drivers/cpufreq/spear-cpufreq.c      | 2 +-
>  drivers/cpufreq/tegra124-cpufreq.c   | 1 -
>  drivers/cpufreq/tegra20-cpufreq.c    | 2 +-
>  include/linux/cpufreq.h              | 1 -
>  10 files changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
> index e85703651098..f9675e1a8529 100644
> --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> @@ -6,7 +6,6 @@
>
>  #include <linux/err.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/platform_device.h>
>
>  #include "cpufreq-dt.h"
> diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c
> index 70ad8fe1d78b..95588101efbd 100644
> --- a/drivers/cpufreq/kirkwood-cpufreq.c
> +++ b/drivers/cpufreq/kirkwood-cpufreq.c
> @@ -9,7 +9,7 @@
>  #include <linux/module.h>
>  #include <linux/clk.h>
>  #include <linux/cpufreq.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>  #include <linux/platform_device.h>
>  #include <linux/io.h>
>  #include <asm/proc-fns.h>
> diff --git a/drivers/cpufreq/maple-cpufreq.c b/drivers/cpufreq/maple-cpufreq.c
> index 28d346062166..f9306410a07f 100644
> --- a/drivers/cpufreq/maple-cpufreq.c
> +++ b/drivers/cpufreq/maple-cpufreq.c
> @@ -23,7 +23,7 @@
>  #include <linux/completion.h>
>  #include <linux/mutex.h>
>  #include <linux/time.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>
>  #define DBG(fmt...) pr_debug(fmt)
>
> diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c
> index 4b8ee2014da6..a28716d8fc54 100644
> --- a/drivers/cpufreq/pmac32-cpufreq.c
> +++ b/drivers/cpufreq/pmac32-cpufreq.c
> @@ -23,7 +23,7 @@
>  #include <linux/init.h>
>  #include <linux/device.h>
>  #include <linux/hardirq.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>
>  #include <asm/machdep.h>
>  #include <asm/irq.h>
> diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c
> index ba9c31d98bd6..2cd2b06849a2 100644
> --- a/drivers/cpufreq/pmac64-cpufreq.c
> +++ b/drivers/cpufreq/pmac64-cpufreq.c
> @@ -21,7 +21,7 @@
>  #include <linux/init.h>
>  #include <linux/completion.h>
>  #include <linux/mutex.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>
>  #include <asm/machdep.h>
>  #include <asm/irq.h>
> diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
> index 2f581d2d617d..df165a078d14 100644
> --- a/drivers/cpufreq/qcom-cpufreq-hw.c
> +++ b/drivers/cpufreq/qcom-cpufreq-hw.c
> @@ -11,8 +11,8 @@
>  #include <linux/interrupt.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> -#include <linux/of_address.h>
> -#include <linux/of_platform.h>
> +#include <linux/of.h>
> +#include <linux/platform_device.h>
>  #include <linux/pm_opp.h>
>  #include <linux/pm_qos.h>
>  #include <linux/slab.h>
> diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c
> index c6fdf019dbde..78b875db6b66 100644
> --- a/drivers/cpufreq/spear-cpufreq.c
> +++ b/drivers/cpufreq/spear-cpufreq.c
> @@ -18,7 +18,7 @@
>  #include <linux/err.h>
>  #include <linux/init.h>
>  #include <linux/module.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>  #include <linux/platform_device.h>
>  #include <linux/slab.h>
>  #include <linux/types.h>
> diff --git a/drivers/cpufreq/tegra124-cpufreq.c b/drivers/cpufreq/tegra124-cpufreq.c
> index 7a1ea6fdcab6..312ca5ddc6c4 100644
> --- a/drivers/cpufreq/tegra124-cpufreq.c
> +++ b/drivers/cpufreq/tegra124-cpufreq.c
> @@ -11,7 +11,6 @@
>  #include <linux/init.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> -#include <linux/of_device.h>
>  #include <linux/of.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_opp.h>
> diff --git a/drivers/cpufreq/tegra20-cpufreq.c b/drivers/cpufreq/tegra20-cpufreq.c
> index ab7ac7df9e62..5d1f5f87e46d 100644
> --- a/drivers/cpufreq/tegra20-cpufreq.c
> +++ b/drivers/cpufreq/tegra20-cpufreq.c
> @@ -12,7 +12,7 @@
>  #include <linux/err.h>
>  #include <linux/init.h>
>  #include <linux/module.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_opp.h>
>  #include <linux/types.h>
> diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
> index 65623233ab2f..3ac4a10d4651 100644
> --- a/include/linux/cpufreq.h
> +++ b/include/linux/cpufreq.h
> @@ -15,7 +15,6 @@
>  #include <linux/kobject.h>
>  #include <linux/notifier.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/pm_opp.h>
>  #include <linux/pm_qos.h>
>  #include <linux/spinlock.h>
>
> --
> 2.39.2
>

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

* Re: [PATCH 12/19] thermal: cpuidle_cooling: Adjust includes to remove of_device.h
  2023-03-29 15:52   ` Rob Herring
  (?)
@ 2023-03-29 15:59     ` Rafael J. Wysocki
  -1 siblings, 0 replies; 112+ messages in thread
From: Rafael J. Wysocki @ 2023-03-29 15:59 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd, sparclinux, linux-kernel,
	devicetree, linux-arm-kernel, linux-sunxi, linux-riscv, linux-pm,
	linux-mediatek, linuxppc-dev, linux-tegra, linux-arm-msm,
	linux-mips

On Wed, Mar 29, 2023 at 5:53 PM Rob Herring <robh@kernel.org> wrote:
>
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h and
> of.h) and drop including of_device.h.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

> ---
>  drivers/thermal/cpuidle_cooling.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/cpuidle_cooling.c b/drivers/thermal/cpuidle_cooling.c
> index 4f41102e8b16..6f6daead485e 100644
> --- a/drivers/thermal/cpuidle_cooling.c
> +++ b/drivers/thermal/cpuidle_cooling.c
> @@ -7,12 +7,13 @@
>   */
>  #define pr_fmt(fmt) "cpuidle cooling: " fmt
>
> +#include <linux/cpu.h>
>  #include <linux/cpu_cooling.h>
>  #include <linux/cpuidle.h>
>  #include <linux/device.h>
>  #include <linux/err.h>
>  #include <linux/idle_inject.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>  #include <linux/slab.h>
>  #include <linux/thermal.h>
>
>
> --
> 2.39.2
>

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 12/19] thermal: cpuidle_cooling: Adjust includes to remove of_device.h
@ 2023-03-29 15:59     ` Rafael J. Wysocki
  0 siblings, 0 replies; 112+ messages in thread
From: Rafael J. Wysocki @ 2023-03-29 15:59 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd, sparclinux, linux-kernel,
	devicetree, linux-arm-kernel, linux-sunxi, linux-riscv, linux-pm,
	linux-mediatek, linuxppc-dev, linux-tegra, linux-arm-msm,
	linux-mips

On Wed, Mar 29, 2023 at 5:53 PM Rob Herring <robh@kernel.org> wrote:
>
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h and
> of.h) and drop including of_device.h.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

> ---
>  drivers/thermal/cpuidle_cooling.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/cpuidle_cooling.c b/drivers/thermal/cpuidle_cooling.c
> index 4f41102e8b16..6f6daead485e 100644
> --- a/drivers/thermal/cpuidle_cooling.c
> +++ b/drivers/thermal/cpuidle_cooling.c
> @@ -7,12 +7,13 @@
>   */
>  #define pr_fmt(fmt) "cpuidle cooling: " fmt
>
> +#include <linux/cpu.h>
>  #include <linux/cpu_cooling.h>
>  #include <linux/cpuidle.h>
>  #include <linux/device.h>
>  #include <linux/err.h>
>  #include <linux/idle_inject.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>  #include <linux/slab.h>
>  #include <linux/thermal.h>
>
>
> --
> 2.39.2
>

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

* Re: [PATCH 12/19] thermal: cpuidle_cooling: Adjust includes to remove of_device.h
@ 2023-03-29 15:59     ` Rafael J. Wysocki
  0 siblings, 0 replies; 112+ messages in thread
From: Rafael J. Wysocki @ 2023-03-29 15:59 UTC (permalink / raw)
  To: Rob Herring
  Cc: Nishanth Menon, Huacai Chen, Rafael J. Wysocki, Yangtao Li,
	Viresh Kumar, Lorenzo Pieralisi, Amit Kucheria, Jiaxun Yang,
	linux-mips, linux-tegra, Thierry Reding, sparclinux, linux-riscv,
	Frank Rowand, Viresh Kumar, Bjorn Andersson, Marc Zyngier,
	Samuel Holland, Daniel Lezcano, Russell King, Jernej Skrabec,
	Jonathan Hunter, Chen-Yu Tsai, Andy Gross, Anup Patel, Zhang Rui,
	linux-sunxi, devicetree, A lbert Ou, linux-pm, linux-arm-msm,
	Nicholas Piggin, Rob Herring, linux-mediatek, Paul Walmsley,
	Matthias Brugger, Thomas Gleixner, linux-arm-kernel,
	AngeloGioacchino Del Regno, Stephen Boyd, Greg Kroah-Hartman,
	Amit Daniel Kachhap, linux-kernel, Konrad Dybcio, Palmer Dabbelt,
	Sudeep Holla, linuxppc-dev, David S. Miller, Lukasz Luba

On Wed, Mar 29, 2023 at 5:53 PM Rob Herring <robh@kernel.org> wrote:
>
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h and
> of.h) and drop including of_device.h.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

> ---
>  drivers/thermal/cpuidle_cooling.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/cpuidle_cooling.c b/drivers/thermal/cpuidle_cooling.c
> index 4f41102e8b16..6f6daead485e 100644
> --- a/drivers/thermal/cpuidle_cooling.c
> +++ b/drivers/thermal/cpuidle_cooling.c
> @@ -7,12 +7,13 @@
>   */
>  #define pr_fmt(fmt) "cpuidle cooling: " fmt
>
> +#include <linux/cpu.h>
>  #include <linux/cpu_cooling.h>
>  #include <linux/cpuidle.h>
>  #include <linux/device.h>
>  #include <linux/err.h>
>  #include <linux/idle_inject.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>  #include <linux/slab.h>
>  #include <linux/thermal.h>
>
>
> --
> 2.39.2
>

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

* Re: [PATCH 15/19] cpufreq: sun50i: Add explicit include for cpu.h
  2023-03-29 15:52   ` Rob Herring
  (?)
@ 2023-03-29 16:05     ` Jernej Škrabec
  -1 siblings, 0 replies; 112+ messages in thread
From: Jernej Škrabec @ 2023-03-29 16:05 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Samuel Holland, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki, Daniel Lezcano,
	Thomas Gleixner, Amit Daniel Kachhap, Viresh Kumar, Lukasz Luba,
	Amit Kucheria, Zhang Rui, Matthias Brugger,
	AngeloGioacchino Del Regno, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Thierry Reding, Jonathan Hunter, Yangtao Li,
	Lorenzo Pieralisi, Sudeep Holla, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Anup Patel, Huacai Chen, Jiaxun Yang,
	Marc Zyngier, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	Rob Herring
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Dne sreda, 29. marec 2023 ob 17:52:12 CEST je Rob Herring napisal(a):
> Removing the include of cpu.h from of_device.h causes an error:
> 
> drivers/cpufreq/sun50i-cpufreq-nvmem.c:42:19: error: implicit declaration of
> function ‘get_cpu_device’; did you mean ‘get_device’?
> [-Werror=implicit-function-declaration]
> 
> As of_device.h is not otherwise needed, it can be replaced with of.h
> (also implicitly included).
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 15/19] cpufreq: sun50i: Add explicit include for cpu.h
@ 2023-03-29 16:05     ` Jernej Škrabec
  0 siblings, 0 replies; 112+ messages in thread
From: Jernej Škrabec @ 2023-03-29 16:05 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Samuel Holland, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki, Daniel Lezcano,
	Thomas Gleixner, Amit Daniel Kachhap, Viresh Kumar, Lukasz Luba,
	Amit Kucheria, Zhang Rui, Matthias Brugger,
	AngeloGioacchino Del Regno, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Thierry Reding, Jonathan Hunter, Yangtao Li,
	Lorenzo Pieralisi, Sudeep Holla, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Anup Patel, Huacai Chen, Jiaxun Yang,
	Marc Zyngier, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	Rob Herring
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

Dne sreda, 29. marec 2023 ob 17:52:12 CEST je Rob Herring napisal(a):
> Removing the include of cpu.h from of_device.h causes an error:
> 
> drivers/cpufreq/sun50i-cpufreq-nvmem.c:42:19: error: implicit declaration of
> function ‘get_cpu_device’; did you mean ‘get_device’?
> [-Werror=implicit-function-declaration]
> 
> As of_device.h is not otherwise needed, it can be replaced with of.h
> (also implicitly included).
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



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

* Re: [PATCH 15/19] cpufreq: sun50i: Add explicit include for cpu.h
@ 2023-03-29 16:05     ` Jernej Škrabec
  0 siblings, 0 replies; 112+ messages in thread
From: Jernej Škrabec @ 2023-03-29 16:05 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Samuel Holland, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki, Daniel Lezcano,
	Thomas Gleixner, Amit Daniel Kachhap, Viresh Kumar, Lukasz Luba,
	Amit Kucheria, Zhang Rui, Matthias Brugger,
	AngeloGioacchino Del Regno, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Thierry Reding, Jonathan Hunter, Yangtao Li,
	Lorenzo Pieralisi, Sudeep Holla, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Anup Patel, Huacai Chen, Jiaxun Yang,
	Marc Zyngier, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	Rob Herring
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

Dne sreda, 29. marec 2023 ob 17:52:12 CEST je Rob Herring napisal(a):
> Removing the include of cpu.h from of_device.h causes an error:
> 
> drivers/cpufreq/sun50i-cpufreq-nvmem.c:42:19: error: implicit declaration of
> function ‘get_cpu_device’; did you mean ‘get_device’?
> [-Werror=implicit-function-declaration]
> 
> As of_device.h is not otherwise needed, it can be replaced with of.h
> (also implicitly included).
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



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

* Re: [PATCH 10/19] cacheinfo: Adjust includes to remove of_device.h
  2023-03-29 15:52   ` Rob Herring
  (?)
@ 2023-03-29 16:22     ` Greg Kroah-Hartman
  -1 siblings, 0 replies; 112+ messages in thread
From: Greg Kroah-Hartman @ 2023-03-29 16:22 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Rafael J. Wysocki, Daniel Lezcano,
	Thomas Gleixner, Amit Daniel Kachhap, Viresh Kumar, Lukasz Luba,
	Amit Kucheria, Zhang Rui, Matthias Brugger,
	AngeloGioacchino Del Regno, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Thierry Reding, Jonathan Hunter, Yangtao Li,
	Lorenzo Pieralisi, Sudeep Holla, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Anup Patel, Huacai Chen, Jiaxun Yang,
	Marc Zyngier, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

On Wed, Mar 29, 2023 at 10:52:07AM -0500, Rob Herring wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Update the
> includes to use of.h instead of of_device.h.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

* Re: [PATCH 10/19] cacheinfo: Adjust includes to remove of_device.h
@ 2023-03-29 16:22     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 112+ messages in thread
From: Greg Kroah-Hartman @ 2023-03-29 16:22 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Rafael J. Wysocki, Daniel Lezcano,
	Thomas Gleixner, Amit Daniel Kachhap, Viresh Kumar, Lukasz Luba,
	Amit Kucheria, Zhang Rui, Matthias Brugger,
	AngeloGioacchino Del Regno, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Thierry Reding, Jonathan Hunter, Yangtao Li,
	Lorenzo Pieralisi, Sudeep Holla, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Anup Patel, Huacai Chen, Jiaxun Yang,
	Marc Zyngier, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

On Wed, Mar 29, 2023 at 10:52:07AM -0500, Rob Herring wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Update the
> includes to use of.h instead of of_device.h.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 10/19] cacheinfo: Adjust includes to remove of_device.h
@ 2023-03-29 16:22     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 112+ messages in thread
From: Greg Kroah-Hartman @ 2023-03-29 16:22 UTC (permalink / raw)
  To: Rob Herring
  Cc: Nishanth Menon, Huacai Chen, Rafael J. Wysocki, Yangtao Li,
	Viresh Kumar, Lorenzo Pieralisi, Amit Kucheria, Jiaxun Yang,
	linux-mips, linux-tegra, Thierry Reding, sparclinux, linux-riscv,
	Frank Rowand, Viresh Kumar, Bjorn Andersson, Marc Zyngier,
	Samuel Holland, Daniel Lezcano, Russell King, Jernej Skrabec,
	Jonathan Hunter, Chen-Yu Tsai, Andy Gross, Zhang Rui,
	linux-sunxi, devicetree, Albert Ou, linux-pm, linux-arm-msm,
	Nicholas Piggin, Rob Herring, linux-mediatek, Paul Walmsley,
	Matthias Brugger, Thomas Gleixner, linux-arm-kernel,
	AngeloGioacchino Del Regno, Stephen Boyd, Anup Patel,
	Amit Daniel Kachhap, linux-kernel, Konrad Dybcio, Palmer Dabbelt,
	Sudeep Holla, linuxppc-dev, David S. Miller, Lukasz Luba

On Wed, Mar 29, 2023 at 10:52:07AM -0500, Rob Herring wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Update the
> includes to use of.h instead of of_device.h.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

* Re: [PATCH 04/19] of: Move CPU node related functions to their own file
  2023-03-29 15:52   ` Rob Herring
  (?)
@ 2023-03-29 18:14     ` Sudeep Holla
  -1 siblings, 0 replies; 112+ messages in thread
From: Sudeep Holla @ 2023-03-29 18:14 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Sudeep Holla, Frank Rowand,
	Russell King, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman,
	Rafael J. Wysocki, Daniel Lezcano, Thomas Gleixner,
	Amit Daniel Kachhap, Viresh Kumar, Lukasz Luba, Amit Kucheria,
	Zhang Rui, Matthias Brugger, AngeloGioacchino Del Regno,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Thierry Reding, Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd, sparclinux, linux-kernel,
	devicetree, linux-arm-kernel, linux-sunxi, linux-riscv, linux-pm,
	linux-mediatek, linuxppc-dev, linux-tegra, linux-arm-msm,
	linux-mips

On Wed, Mar 29, 2023 at 10:52:01AM -0500, Rob Herring wrote:
> drivers/of/base.c is quite long and we've accumulated a number of CPU
> node functions. Let's move them to a new file, cpu.c, along with the
> lone of_cpu_device_node_get() in of_device.h. Moving the declaration has
> no effect yet as of.h is included by of_device.h. This serves as
> preparation to disentangle the includes in of_device.h and
> of_platform.h.
>

Makes sense to have its own file for CPUs, I am sure there will be more
additions 😉.

FWIW,

Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep

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

* Re: [PATCH 04/19] of: Move CPU node related functions to their own file
@ 2023-03-29 18:14     ` Sudeep Holla
  0 siblings, 0 replies; 112+ messages in thread
From: Sudeep Holla @ 2023-03-29 18:14 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Sudeep Holla, Frank Rowand,
	Russell King, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman,
	Rafael J. Wysocki, Daniel Lezcano, Thomas Gleixner,
	Amit Daniel Kachhap, Viresh Kumar, Lukasz Luba, Amit Kucheria,
	Zhang Rui, Matthias Brugger, AngeloGioacchino Del Regno,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Thierry Reding, Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd, sparclinux, linux-kernel,
	devicetree, linux-arm-kernel, linux-sunxi, linux-riscv, linux-pm,
	linux-mediatek, linuxppc-dev, linux-tegra, linux-arm-msm,
	linux-mips

On Wed, Mar 29, 2023 at 10:52:01AM -0500, Rob Herring wrote:
> drivers/of/base.c is quite long and we've accumulated a number of CPU
> node functions. Let's move them to a new file, cpu.c, along with the
> lone of_cpu_device_node_get() in of_device.h. Moving the declaration has
> no effect yet as of.h is included by of_device.h. This serves as
> preparation to disentangle the includes in of_device.h and
> of_platform.h.
>

Makes sense to have its own file for CPUs, I am sure there will be more
additions 😉.

FWIW,

Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 04/19] of: Move CPU node related functions to their own file
@ 2023-03-29 18:14     ` Sudeep Holla
  0 siblings, 0 replies; 112+ messages in thread
From: Sudeep Holla @ 2023-03-29 18:14 UTC (permalink / raw)
  To: Rob Herring
  Cc: Nishanth Menon, Huacai Chen, Rafael J. Wysocki, Yangtao Li,
	Viresh Kumar, Lorenzo Pieralisi, Amit Kucheria, Jiaxun Yang,
	linux-mips, linux-tegra, Thierry Reding, sparclinux, linux-riscv,
	Frank Rowand, Viresh Kumar, Bjorn Andersson, Marc Zyngier,
	Samuel Holland, Daniel Lezcano, Russell King, Jernej Skrabec,
	Jonathan Hunter, Chen-Yu Tsai, Andy Gross, Anup Patel, Zhang Rui,
	linux-sunxi, devicetree, A lbert Ou, linux-pm, linux-arm-msm,
	Nicholas Piggin, Rob Herring, linux-mediatek, Paul Walmsley,
	Matthias Brugger, Thomas Gleixner, linux-arm-kernel,
	AngeloGioacchino Del Regno, Stephen Boyd, Greg Kroah-Hartman,
	Amit Daniel Kachhap, linux-kernel, Konrad Dybcio, Palmer Dabbelt,
	Sudeep Holla, linuxppc-dev, David S. Miller, Lukasz Luba

On Wed, Mar 29, 2023 at 10:52:01AM -0500, Rob Herring wrote:
> drivers/of/base.c is quite long and we've accumulated a number of CPU
> node functions. Let's move them to a new file, cpu.c, along with the
> lone of_cpu_device_node_get() in of_device.h. Moving the declaration has
> no effect yet as of.h is included by of_device.h. This serves as
> preparation to disentangle the includes in of_device.h and
> of_platform.h.
>

Makes sense to have its own file for CPUs, I am sure there will be more
additions 😉.

FWIW,

Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep

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

* Re: [PATCH 10/19] cacheinfo: Adjust includes to remove of_device.h
  2023-03-29 15:52   ` Rob Herring
  (?)
@ 2023-03-29 18:15     ` Sudeep Holla
  -1 siblings, 0 replies; 112+ messages in thread
From: Sudeep Holla @ 2023-03-29 18:15 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Sudeep Holla, Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman,
	Rafael J. Wysocki, Daniel Lezcano, Thomas Gleixner,
	Amit Daniel Kachhap, Viresh Kumar, Lukasz Luba, Amit Kucheria,
	Zhang Rui, Matthias Brugger, AngeloGioacchino Del Regno,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Thierry Reding, Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd, sparclinux, linux-kernel,
	devicetree, linux-arm-kernel, linux-sunxi, linux-riscv, linux-pm,
	linux-mediatek, linuxppc-dev, linux-tegra, linux-arm-msm,
	linux-mips

On Wed, Mar 29, 2023 at 10:52:07AM -0500, Rob Herring wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Update the
> includes to use of.h instead of of_device.h.
>

Acked-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep

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

* Re: [PATCH 10/19] cacheinfo: Adjust includes to remove of_device.h
@ 2023-03-29 18:15     ` Sudeep Holla
  0 siblings, 0 replies; 112+ messages in thread
From: Sudeep Holla @ 2023-03-29 18:15 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Sudeep Holla, Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman,
	Rafael J. Wysocki, Daniel Lezcano, Thomas Gleixner,
	Amit Daniel Kachhap, Viresh Kumar, Lukasz Luba, Amit Kucheria,
	Zhang Rui, Matthias Brugger, AngeloGioacchino Del Regno,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Thierry Reding, Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd, sparclinux, linux-kernel,
	devicetree, linux-arm-kernel, linux-sunxi, linux-riscv, linux-pm,
	linux-mediatek, linuxppc-dev, linux-tegra, linux-arm-msm,
	linux-mips

On Wed, Mar 29, 2023 at 10:52:07AM -0500, Rob Herring wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Update the
> includes to use of.h instead of of_device.h.
>

Acked-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 10/19] cacheinfo: Adjust includes to remove of_device.h
@ 2023-03-29 18:15     ` Sudeep Holla
  0 siblings, 0 replies; 112+ messages in thread
From: Sudeep Holla @ 2023-03-29 18:15 UTC (permalink / raw)
  To: Rob Herring
  Cc: Nishanth Menon, Huacai Chen, Rafael J. Wysocki, Yangtao Li,
	Viresh Kumar, Lorenzo Pieralisi, Amit Kucheria, Jiaxun Yang,
	linux-mips, linux-tegra, Thierry Reding, sparclinux, linux-riscv,
	Frank Rowand, Viresh Kumar, Bjorn Andersson, Marc Zyngier,
	Samuel Holland, Daniel Lezcano, Russell King, Jernej Skrabec,
	Jonathan Hunter, Chen-Yu Tsai, Andy Gross, Anup Patel, Zhang Rui,
	linux-sunxi, devicetree, A lbert Ou, linux-pm, linux-arm-msm,
	Nicholas Piggin, Rob Herring, linux-mediatek, Paul Walmsley,
	Matthias Brugger, Thomas Gleixner, linux-arm-kernel,
	AngeloGioacchino Del Regno, Stephen Boyd, Greg Kroah-Hartman,
	Amit Daniel Kachhap, linux-kernel, Konrad Dybcio, Palmer Dabbelt,
	Sudeep Holla, linuxppc-dev, David S. Miller, Lukasz Luba

On Wed, Mar 29, 2023 at 10:52:07AM -0500, Rob Herring wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Update the
> includes to use of.h instead of of_device.h.
>

Acked-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep

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

* Re: [PATCH 16/19] cpuidle: Adjust includes to remove of_device.h
  2023-03-29 15:52   ` Rob Herring
  (?)
@ 2023-03-29 18:17     ` Sudeep Holla
  -1 siblings, 0 replies; 112+ messages in thread
From: Sudeep Holla @ 2023-03-29 18:17 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Sudeep Holla, Greg Kroah-Hartman,
	Rafael J. Wysocki, Daniel Lezcano, Thomas Gleixner,
	Amit Daniel Kachhap, Viresh Kumar, Lukasz Luba, Amit Kucheria,
	Zhang Rui, Matthias Brugger, AngeloGioacchino Del Regno,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Thierry Reding, Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd, sparclinux, linux-kernel,
	devicetree, linux-arm-kernel, linux-sunxi, linux-riscv, linux-pm,
	linux-mediatek, linuxppc-dev, linux-tegra, linux-arm-msm,
	linux-mips

On Wed, Mar 29, 2023 at 10:52:13AM -0500, Rob Herring wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h,
> cpuhotplug.h, of.h, and of_platform.h) and drop including of_device.h.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---
>  drivers/cpuidle/cpuidle-psci.c      | 1 -
>  drivers/cpuidle/cpuidle-qcom-spm.c  | 3 +--
>  drivers/cpuidle/cpuidle-riscv-sbi.c | 2 +-
>  drivers/cpuidle/dt_idle_states.c    | 1 -
>  4 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
> index 6de027f9f6f5..bf68920d038a 100644
> --- a/drivers/cpuidle/cpuidle-psci.c
> +++ b/drivers/cpuidle/cpuidle-psci.c
> @@ -16,7 +16,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/platform_device.h>
>  #include <linux/psci.h>
>  #include <linux/pm_domain.h>

Acked-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep

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

* Re: [PATCH 16/19] cpuidle: Adjust includes to remove of_device.h
@ 2023-03-29 18:17     ` Sudeep Holla
  0 siblings, 0 replies; 112+ messages in thread
From: Sudeep Holla @ 2023-03-29 18:17 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Sudeep Holla, Greg Kroah-Hartman,
	Rafael J. Wysocki, Daniel Lezcano, Thomas Gleixner,
	Amit Daniel Kachhap, Viresh Kumar, Lukasz Luba, Amit Kucheria,
	Zhang Rui, Matthias Brugger, AngeloGioacchino Del Regno,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Thierry Reding, Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd, sparclinux, linux-kernel,
	devicetree, linux-arm-kernel, linux-sunxi, linux-riscv, linux-pm,
	linux-mediatek, linuxppc-dev, linux-tegra, linux-arm-msm,
	linux-mips

On Wed, Mar 29, 2023 at 10:52:13AM -0500, Rob Herring wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h,
> cpuhotplug.h, of.h, and of_platform.h) and drop including of_device.h.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---
>  drivers/cpuidle/cpuidle-psci.c      | 1 -
>  drivers/cpuidle/cpuidle-qcom-spm.c  | 3 +--
>  drivers/cpuidle/cpuidle-riscv-sbi.c | 2 +-
>  drivers/cpuidle/dt_idle_states.c    | 1 -
>  4 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
> index 6de027f9f6f5..bf68920d038a 100644
> --- a/drivers/cpuidle/cpuidle-psci.c
> +++ b/drivers/cpuidle/cpuidle-psci.c
> @@ -16,7 +16,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/platform_device.h>
>  #include <linux/psci.h>
>  #include <linux/pm_domain.h>

Acked-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 16/19] cpuidle: Adjust includes to remove of_device.h
@ 2023-03-29 18:17     ` Sudeep Holla
  0 siblings, 0 replies; 112+ messages in thread
From: Sudeep Holla @ 2023-03-29 18:17 UTC (permalink / raw)
  To: Rob Herring
  Cc: Nishanth Menon, Huacai Chen, Rafael J. Wysocki, Yangtao Li,
	Viresh Kumar, Lorenzo Pieralisi, Amit Kucheria, Jiaxun Yang,
	linux-mips, linux-tegra, Thierry Reding, sparclinux, linux-riscv,
	Frank Rowand, Viresh Kumar, Bjorn Andersson, Marc Zyngier,
	Samuel Holland, Daniel Lezcano, Russell King, Jernej Skrabec,
	Jonathan Hunter, Chen-Yu Tsai, Andy Gross, Anup Patel, Zhang Rui,
	linux-sunxi, devicetree, A lbert Ou, linux-pm, linux-arm-msm,
	Nicholas Piggin, Rob Herring, linux-mediatek, Paul Walmsley,
	Matthias Brugger, Thomas Gleixner, linux-arm-kernel,
	AngeloGioacchino Del Regno, Stephen Boyd, Greg Kroah-Hartman,
	Amit Daniel Kachhap, linux-kernel, Konrad Dybcio, Palmer Dabbelt,
	Sudeep Holla, linuxppc-dev, David S. Miller, Lukasz Luba

On Wed, Mar 29, 2023 at 10:52:13AM -0500, Rob Herring wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h,
> cpuhotplug.h, of.h, and of_platform.h) and drop including of_device.h.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---
>  drivers/cpuidle/cpuidle-psci.c      | 1 -
>  drivers/cpuidle/cpuidle-qcom-spm.c  | 3 +--
>  drivers/cpuidle/cpuidle-riscv-sbi.c | 2 +-
>  drivers/cpuidle/dt_idle_states.c    | 1 -
>  4 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
> index 6de027f9f6f5..bf68920d038a 100644
> --- a/drivers/cpuidle/cpuidle-psci.c
> +++ b/drivers/cpuidle/cpuidle-psci.c
> @@ -16,7 +16,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/platform_device.h>
>  #include <linux/psci.h>
>  #include <linux/pm_domain.h>

Acked-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep

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

* Re: [PATCH 14/19] cpufreq: Adjust includes to remove of_device.h
  2023-03-29 15:52   ` Rob Herring
                     ` (2 preceding siblings ...)
  (?)
@ 2023-03-29 20:51   ` kernel test robot
  -1 siblings, 0 replies; 112+ messages in thread
From: kernel test robot @ 2023-03-29 20:51 UTC (permalink / raw)
  To: Rob Herring; +Cc: oe-kbuild-all

Hi Rob,

I love your patch! Yet something to improve:

[auto build test ERROR on fe15c26ee26efa11741a7b632e9f23b01aca4cc6]

url:    https://github.com/intel-lab-lkp/linux/commits/Rob-Herring/of-Make-devtree_lock-declaration-private/20230329-235635
base:   fe15c26ee26efa11741a7b632e9f23b01aca4cc6
patch link:    https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-14-581e2605fe47%40kernel.org
patch subject: [PATCH 14/19] cpufreq: Adjust includes to remove of_device.h
config: xtensa-randconfig-r033-20230329 (https://download.01.org/0day-ci/archive/20230330/202303300425.6JdMZrX7-lkp@intel.com/config)
compiler: xtensa-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/2d8d18f806b57611002876b9921aae0d041bbe63
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Rob-Herring/of-Make-devtree_lock-declaration-private/20230329-235635
        git checkout 2d8d18f806b57611002876b9921aae0d041bbe63
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=xtensa olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=xtensa SHELL=/bin/bash drivers/tty/serial/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303300425.6JdMZrX7-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/tty/serial/samsung_tty.c: In function 's3c24xx_get_driver_data':
>> drivers/tty/serial/samsung_tty.c:2034:24: error: implicit declaration of function 'of_device_get_match_data'; did you mean 'device_get_match_data'? [-Werror=implicit-function-declaration]
    2034 |                 return of_device_get_match_data(&pdev->dev);
         |                        ^~~~~~~~~~~~~~~~~~~~~~~~
         |                        device_get_match_data
   drivers/tty/serial/samsung_tty.c:2034:24: warning: returning 'int' from a function with return type 'const struct s3c24xx_serial_drv_data *' makes pointer from integer without a cast [-Wint-conversion]
    2034 |                 return of_device_get_match_data(&pdev->dev);
         |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +2034 drivers/tty/serial/samsung_tty.c

b497549a035c2a drivers/serial/samsung.c         Ben Dooks           2008-07-03  2029  
97a6cfe8115b04 drivers/tty/serial/samsung_tty.c Krzysztof Kozlowski 2022-03-08  2030  static inline const struct s3c24xx_serial_drv_data *
695b847b247cff drivers/tty/serial/samsung_tty.c Krzysztof Kozlowski 2020-06-17  2031  s3c24xx_get_driver_data(struct platform_device *pdev)
26c919e1d3f4df drivers/tty/serial/samsung.c     Thomas Abraham      2011-11-06  2032  {
f25fbd5b1ef377 drivers/tty/serial/samsung_tty.c Krzysztof Kozlowski 2022-03-08  2033  	if (dev_of_node(&pdev->dev))
f25fbd5b1ef377 drivers/tty/serial/samsung_tty.c Krzysztof Kozlowski 2022-03-08 @2034  		return of_device_get_match_data(&pdev->dev);
9fe0d41ffd39cb drivers/tty/serial/samsung_tty.c Greg Kroah-Hartman  2019-12-10  2035  
26c919e1d3f4df drivers/tty/serial/samsung.c     Thomas Abraham      2011-11-06  2036  	return (struct s3c24xx_serial_drv_data *)
26c919e1d3f4df drivers/tty/serial/samsung.c     Thomas Abraham      2011-11-06  2037  			platform_get_device_id(pdev)->driver_data;
26c919e1d3f4df drivers/tty/serial/samsung.c     Thomas Abraham      2011-11-06  2038  }
26c919e1d3f4df drivers/tty/serial/samsung.c     Thomas Abraham      2011-11-06  2039  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

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

* Re: [PATCH 14/19] cpufreq: Adjust includes to remove of_device.h
  2023-03-29 15:52   ` Rob Herring
  (?)
@ 2023-03-30  3:54     ` Viresh Kumar
  -1 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2023-03-30  3:54 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Lukasz Luba, Amit Kucheria, Zhang Rui, Matthias Brugger,
	AngeloGioacchino Del Regno, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Thierry Reding, Jonathan Hunter, Yangtao Li,
	Lorenzo Pieralisi, Sudeep Holla, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Anup Patel, Huacai Chen, Jiaxun Yang,
	Marc Zyngier, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

On 29-03-23, 10:52, Rob Herring wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h and
> of.h) and drop including of_device.h.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---
>  drivers/cpufreq/cpufreq-dt-platdev.c | 1 -
>  drivers/cpufreq/kirkwood-cpufreq.c   | 2 +-
>  drivers/cpufreq/maple-cpufreq.c      | 2 +-
>  drivers/cpufreq/pmac32-cpufreq.c     | 2 +-
>  drivers/cpufreq/pmac64-cpufreq.c     | 2 +-
>  drivers/cpufreq/qcom-cpufreq-hw.c    | 4 ++--
>  drivers/cpufreq/spear-cpufreq.c      | 2 +-
>  drivers/cpufreq/tegra124-cpufreq.c   | 1 -
>  drivers/cpufreq/tegra20-cpufreq.c    | 2 +-
>  include/linux/cpufreq.h              | 1 -
>  10 files changed, 8 insertions(+), 11 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

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

* Re: [PATCH 14/19] cpufreq: Adjust includes to remove of_device.h
@ 2023-03-30  3:54     ` Viresh Kumar
  0 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2023-03-30  3:54 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Lukasz Luba, Amit Kucheria, Zhang Rui, Matthias Brugger,
	AngeloGioacchino Del Regno, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Thierry Reding, Jonathan Hunter, Yangtao Li,
	Lorenzo Pieralisi, Sudeep Holla, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Anup Patel, Huacai Chen, Jiaxun Yang,
	Marc Zyngier, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

On 29-03-23, 10:52, Rob Herring wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h and
> of.h) and drop including of_device.h.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---
>  drivers/cpufreq/cpufreq-dt-platdev.c | 1 -
>  drivers/cpufreq/kirkwood-cpufreq.c   | 2 +-
>  drivers/cpufreq/maple-cpufreq.c      | 2 +-
>  drivers/cpufreq/pmac32-cpufreq.c     | 2 +-
>  drivers/cpufreq/pmac64-cpufreq.c     | 2 +-
>  drivers/cpufreq/qcom-cpufreq-hw.c    | 4 ++--
>  drivers/cpufreq/spear-cpufreq.c      | 2 +-
>  drivers/cpufreq/tegra124-cpufreq.c   | 1 -
>  drivers/cpufreq/tegra20-cpufreq.c    | 2 +-
>  include/linux/cpufreq.h              | 1 -
>  10 files changed, 8 insertions(+), 11 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 14/19] cpufreq: Adjust includes to remove of_device.h
@ 2023-03-30  3:54     ` Viresh Kumar
  0 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2023-03-30  3:54 UTC (permalink / raw)
  To: Rob Herring
  Cc: Nishanth Menon, Huacai Chen, Rafael J. Wysocki, Yangtao Li,
	Viresh Kumar, Lorenzo Pieralisi, Amit Kucheria, Jiaxun Yang,
	linux-mips, linux-tegra, Thierry Reding, sparclinux, linux-riscv,
	Frank Rowand, Bjorn Andersson, Marc Zyngier, Samuel Holland,
	Daniel Lezcano, Russell King, Jernej Skrabec, Jonathan Hunter,
	Chen-Yu Tsai, Andy Gross, Anup Patel, Zhang Rui, linux-sunxi,
	devicetree, Albert Ou, linux-

On 29-03-23, 10:52, Rob Herring wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h and
> of.h) and drop including of_device.h.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---
>  drivers/cpufreq/cpufreq-dt-platdev.c | 1 -
>  drivers/cpufreq/kirkwood-cpufreq.c   | 2 +-
>  drivers/cpufreq/maple-cpufreq.c      | 2 +-
>  drivers/cpufreq/pmac32-cpufreq.c     | 2 +-
>  drivers/cpufreq/pmac64-cpufreq.c     | 2 +-
>  drivers/cpufreq/qcom-cpufreq-hw.c    | 4 ++--
>  drivers/cpufreq/spear-cpufreq.c      | 2 +-
>  drivers/cpufreq/tegra124-cpufreq.c   | 1 -
>  drivers/cpufreq/tegra20-cpufreq.c    | 2 +-
>  include/linux/cpufreq.h              | 1 -
>  10 files changed, 8 insertions(+), 11 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

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

* Re: [PATCH 15/19] cpufreq: sun50i: Add explicit include for cpu.h
  2023-03-29 15:52   ` Rob Herring
  (?)
@ 2023-03-30  3:54     ` Viresh Kumar
  -1 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2023-03-30  3:54 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Lukasz Luba, Amit Kucheria, Zhang Rui, Matthias Brugger,
	AngeloGioacchino Del Regno, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Thierry Reding, Jonathan Hunter, Yangtao Li,
	Lorenzo Pieralisi, Sudeep Holla, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Anup Patel, Huacai Chen, Jiaxun Yang,
	Marc Zyngier, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

On 29-03-23, 10:52, Rob Herring wrote:
> Removing the include of cpu.h from of_device.h causes an error:
> 
> drivers/cpufreq/sun50i-cpufreq-nvmem.c:42:19: error: implicit declaration of function ‘get_cpu_device’; did you mean ‘get_device’? [-Werror=implicit-function-declaration]
> 
> As of_device.h is not otherwise needed, it can be replaced with of.h
> (also implicitly included).
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---
>  drivers/cpufreq/sun50i-cpufreq-nvmem.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/sun50i-cpufreq-nvmem.c b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
> index 1583a370da39..4321d7bbe769 100644
> --- a/drivers/cpufreq/sun50i-cpufreq-nvmem.c
> +++ b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
> @@ -10,9 +10,10 @@
>  
>  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>  
> +#include <linux/cpu.h>
>  #include <linux/module.h>
>  #include <linux/nvmem-consumer.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_opp.h>
>  #include <linux/slab.h>

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

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

* Re: [PATCH 15/19] cpufreq: sun50i: Add explicit include for cpu.h
@ 2023-03-30  3:54     ` Viresh Kumar
  0 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2023-03-30  3:54 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Lukasz Luba, Amit Kucheria, Zhang Rui, Matthias Brugger,
	AngeloGioacchino Del Regno, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Thierry Reding, Jonathan Hunter, Yangtao Li,
	Lorenzo Pieralisi, Sudeep Holla, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Anup Patel, Huacai Chen, Jiaxun Yang,
	Marc Zyngier, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

On 29-03-23, 10:52, Rob Herring wrote:
> Removing the include of cpu.h from of_device.h causes an error:
> 
> drivers/cpufreq/sun50i-cpufreq-nvmem.c:42:19: error: implicit declaration of function ‘get_cpu_device’; did you mean ‘get_device’? [-Werror=implicit-function-declaration]
> 
> As of_device.h is not otherwise needed, it can be replaced with of.h
> (also implicitly included).
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---
>  drivers/cpufreq/sun50i-cpufreq-nvmem.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/sun50i-cpufreq-nvmem.c b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
> index 1583a370da39..4321d7bbe769 100644
> --- a/drivers/cpufreq/sun50i-cpufreq-nvmem.c
> +++ b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
> @@ -10,9 +10,10 @@
>  
>  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>  
> +#include <linux/cpu.h>
>  #include <linux/module.h>
>  #include <linux/nvmem-consumer.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_opp.h>
>  #include <linux/slab.h>

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 15/19] cpufreq: sun50i: Add explicit include for cpu.h
@ 2023-03-30  3:54     ` Viresh Kumar
  0 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2023-03-30  3:54 UTC (permalink / raw)
  To: Rob Herring
  Cc: Nishanth Menon, Huacai Chen, Rafael J. Wysocki, Yangtao Li,
	Viresh Kumar, Lorenzo Pieralisi, Amit Kucheria, Jiaxun Yang,
	linux-mips, linux-tegra, Thierry Reding, sparclinux, linux-riscv,
	Frank Rowand, Bjorn Andersson, Marc Zyngier, Samuel Holland,
	Daniel Lezcano, Russell King, Jernej Skrabec, Jonathan Hunter,
	Chen-Yu Tsai, Andy Gross, Anup Patel, Zhang Rui, linux-sunxi,
	devicetree, Albert Ou, linux-

On 29-03-23, 10:52, Rob Herring wrote:
> Removing the include of cpu.h from of_device.h causes an error:
> 
> drivers/cpufreq/sun50i-cpufreq-nvmem.c:42:19: error: implicit declaration of function ‘get_cpu_device’; did you mean ‘get_device’? [-Werror=implicit-function-declaration]
> 
> As of_device.h is not otherwise needed, it can be replaced with of.h
> (also implicitly included).
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---
>  drivers/cpufreq/sun50i-cpufreq-nvmem.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/sun50i-cpufreq-nvmem.c b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
> index 1583a370da39..4321d7bbe769 100644
> --- a/drivers/cpufreq/sun50i-cpufreq-nvmem.c
> +++ b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
> @@ -10,9 +10,10 @@
>  
>  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>  
> +#include <linux/cpu.h>
>  #include <linux/module.h>
>  #include <linux/nvmem-consumer.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_opp.h>
>  #include <linux/slab.h>

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

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

* Re: [PATCH 18/19] OPP: Adjust includes to remove of_device.h
  2023-03-29 15:52   ` Rob Herring
  (?)
@ 2023-03-30  3:54     ` Viresh Kumar
  -1 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2023-03-30  3:54 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Lukasz Luba, Amit Kucheria, Zhang Rui, Matthias Brugger,
	AngeloGioacchino Del Regno, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Thierry Reding, Jonathan Hunter, Yangtao Li,
	Lorenzo Pieralisi, Sudeep Holla, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Anup Patel, Huacai Chen, Jiaxun Yang,
	Marc Zyngier, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

On 29-03-23, 10:52, Rob Herring wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h and
> of.h) and drop including of_device.h.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---
>  drivers/opp/of.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/opp/of.c b/drivers/opp/of.c
> index e55c6095adf0..63b126c6215e 100644
> --- a/drivers/opp/of.c
> +++ b/drivers/opp/of.c
> @@ -13,7 +13,7 @@
>  #include <linux/cpu.h>
>  #include <linux/errno.h>
>  #include <linux/device.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>  #include <linux/pm_domain.h>
>  #include <linux/slab.h>
>  #include <linux/export.h>

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

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

* Re: [PATCH 18/19] OPP: Adjust includes to remove of_device.h
@ 2023-03-30  3:54     ` Viresh Kumar
  0 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2023-03-30  3:54 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Lukasz Luba, Amit Kucheria, Zhang Rui, Matthias Brugger,
	AngeloGioacchino Del Regno, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Thierry Reding, Jonathan Hunter, Yangtao Li,
	Lorenzo Pieralisi, Sudeep Holla, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Anup Patel, Huacai Chen, Jiaxun Yang,
	Marc Zyngier, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

On 29-03-23, 10:52, Rob Herring wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h and
> of.h) and drop including of_device.h.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---
>  drivers/opp/of.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/opp/of.c b/drivers/opp/of.c
> index e55c6095adf0..63b126c6215e 100644
> --- a/drivers/opp/of.c
> +++ b/drivers/opp/of.c
> @@ -13,7 +13,7 @@
>  #include <linux/cpu.h>
>  #include <linux/errno.h>
>  #include <linux/device.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>  #include <linux/pm_domain.h>
>  #include <linux/slab.h>
>  #include <linux/export.h>

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 18/19] OPP: Adjust includes to remove of_device.h
@ 2023-03-30  3:54     ` Viresh Kumar
  0 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2023-03-30  3:54 UTC (permalink / raw)
  To: Rob Herring
  Cc: Nishanth Menon, Huacai Chen, Rafael J. Wysocki, Yangtao Li,
	Viresh Kumar, Lorenzo Pieralisi, Amit Kucheria, Jiaxun Yang,
	linux-mips, linux-tegra, Thierry Reding, sparclinux, linux-riscv,
	Frank Rowand, Bjorn Andersson, Marc Zyngier, Samuel Holland,
	Daniel Lezcano, Russell King, Jernej Skrabec, Jonathan Hunter,
	Chen-Yu Tsai, Andy Gross, Anup Patel, Zhang Rui, linux-sunxi,
	devicetree, Albert Ou, linux-

On 29-03-23, 10:52, Rob Herring wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h and
> of.h) and drop including of_device.h.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---
>  drivers/opp/of.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/opp/of.c b/drivers/opp/of.c
> index e55c6095adf0..63b126c6215e 100644
> --- a/drivers/opp/of.c
> +++ b/drivers/opp/of.c
> @@ -13,7 +13,7 @@
>  #include <linux/cpu.h>
>  #include <linux/errno.h>
>  #include <linux/device.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
>  #include <linux/pm_domain.h>
>  #include <linux/slab.h>
>  #include <linux/export.h>

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

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

* Re: [PATCH 16/19] cpuidle: Adjust includes to remove of_device.h
  2023-03-29 15:52   ` Rob Herring
  (?)
@ 2023-03-30  4:02     ` Anup Patel
  -1 siblings, 0 replies; 112+ messages in thread
From: Anup Patel @ 2023-03-30  4:02 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Huacai Chen,
	Jiaxun Yang, Marc Zyngier, Viresh Kumar, Nishanth Menon,
	Stephen Boyd, sparclinux, linux-kernel, devicetree,
	linux-arm-kernel, linux-sunxi, linux-riscv, linux-pm,
	linux-mediatek, linuxppc-dev, linux-tegra, linux-arm-msm,
	linux-mips

On Wed, Mar 29, 2023 at 9:22 PM Rob Herring <robh@kernel.org> wrote:
>
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h,
> cpuhotplug.h, of.h, and of_platform.h) and drop including of_device.h.
>
> Signed-off-by: Rob Herring <robh@kernel.org>

For cpuidle-riscv-sbi.c
Acked-by: Anup Patel <anup@brainfault.org>

Regards,
Anup

> ---
> Please ack and I will take the series via the DT tree.
> ---
>  drivers/cpuidle/cpuidle-psci.c      | 1 -
>  drivers/cpuidle/cpuidle-qcom-spm.c  | 3 +--
>  drivers/cpuidle/cpuidle-riscv-sbi.c | 2 +-
>  drivers/cpuidle/dt_idle_states.c    | 1 -
>  4 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
> index 6de027f9f6f5..bf68920d038a 100644
> --- a/drivers/cpuidle/cpuidle-psci.c
> +++ b/drivers/cpuidle/cpuidle-psci.c
> @@ -16,7 +16,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/platform_device.h>
>  #include <linux/psci.h>
>  #include <linux/pm_domain.h>
> diff --git a/drivers/cpuidle/cpuidle-qcom-spm.c b/drivers/cpuidle/cpuidle-qcom-spm.c
> index c6e2e91bb4c3..1fc9968eae19 100644
> --- a/drivers/cpuidle/cpuidle-qcom-spm.c
> +++ b/drivers/cpuidle/cpuidle-qcom-spm.c
> @@ -11,8 +11,7 @@
>  #include <linux/io.h>
>  #include <linux/slab.h>
>  #include <linux/of.h>
> -#include <linux/of_address.h>
> -#include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/err.h>
>  #include <linux/platform_device.h>
>  #include <linux/cpuidle.h>
> diff --git a/drivers/cpuidle/cpuidle-riscv-sbi.c b/drivers/cpuidle/cpuidle-riscv-sbi.c
> index be383f4b6855..ae0b838a0634 100644
> --- a/drivers/cpuidle/cpuidle-riscv-sbi.c
> +++ b/drivers/cpuidle/cpuidle-riscv-sbi.c
> @@ -8,6 +8,7 @@
>
>  #define pr_fmt(fmt) "cpuidle-riscv-sbi: " fmt
>
> +#include <linux/cpuhotplug.h>
>  #include <linux/cpuidle.h>
>  #include <linux/cpumask.h>
>  #include <linux/cpu_pm.h>
> @@ -15,7 +16,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/slab.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_domain.h>
> diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c
> index 02aa0b39af9d..12fec92a85fd 100644
> --- a/drivers/cpuidle/dt_idle_states.c
> +++ b/drivers/cpuidle/dt_idle_states.c
> @@ -14,7 +14,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>
>  #include "dt_idle_states.h"
>
>
> --
> 2.39.2
>

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

* Re: [PATCH 16/19] cpuidle: Adjust includes to remove of_device.h
@ 2023-03-30  4:02     ` Anup Patel
  0 siblings, 0 replies; 112+ messages in thread
From: Anup Patel @ 2023-03-30  4:02 UTC (permalink / raw)
  To: Rob Herring
  Cc: David S. Miller, Rob Herring, Frank Rowand, Russell King,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman, Rafael J. Wysocki,
	Daniel Lezcano, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Huacai Chen,
	Jiaxun Yang, Marc Zyngier, Viresh Kumar, Nishanth Menon,
	Stephen Boyd, sparclinux, linux-kernel, devicetree,
	linux-arm-kernel, linux-sunxi, linux-riscv, linux-pm,
	linux-mediatek, linuxppc-dev, linux-tegra, linux-arm-msm,
	linux-mips

On Wed, Mar 29, 2023 at 9:22 PM Rob Herring <robh@kernel.org> wrote:
>
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h,
> cpuhotplug.h, of.h, and of_platform.h) and drop including of_device.h.
>
> Signed-off-by: Rob Herring <robh@kernel.org>

For cpuidle-riscv-sbi.c
Acked-by: Anup Patel <anup@brainfault.org>

Regards,
Anup

> ---
> Please ack and I will take the series via the DT tree.
> ---
>  drivers/cpuidle/cpuidle-psci.c      | 1 -
>  drivers/cpuidle/cpuidle-qcom-spm.c  | 3 +--
>  drivers/cpuidle/cpuidle-riscv-sbi.c | 2 +-
>  drivers/cpuidle/dt_idle_states.c    | 1 -
>  4 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
> index 6de027f9f6f5..bf68920d038a 100644
> --- a/drivers/cpuidle/cpuidle-psci.c
> +++ b/drivers/cpuidle/cpuidle-psci.c
> @@ -16,7 +16,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/platform_device.h>
>  #include <linux/psci.h>
>  #include <linux/pm_domain.h>
> diff --git a/drivers/cpuidle/cpuidle-qcom-spm.c b/drivers/cpuidle/cpuidle-qcom-spm.c
> index c6e2e91bb4c3..1fc9968eae19 100644
> --- a/drivers/cpuidle/cpuidle-qcom-spm.c
> +++ b/drivers/cpuidle/cpuidle-qcom-spm.c
> @@ -11,8 +11,7 @@
>  #include <linux/io.h>
>  #include <linux/slab.h>
>  #include <linux/of.h>
> -#include <linux/of_address.h>
> -#include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/err.h>
>  #include <linux/platform_device.h>
>  #include <linux/cpuidle.h>
> diff --git a/drivers/cpuidle/cpuidle-riscv-sbi.c b/drivers/cpuidle/cpuidle-riscv-sbi.c
> index be383f4b6855..ae0b838a0634 100644
> --- a/drivers/cpuidle/cpuidle-riscv-sbi.c
> +++ b/drivers/cpuidle/cpuidle-riscv-sbi.c
> @@ -8,6 +8,7 @@
>
>  #define pr_fmt(fmt) "cpuidle-riscv-sbi: " fmt
>
> +#include <linux/cpuhotplug.h>
>  #include <linux/cpuidle.h>
>  #include <linux/cpumask.h>
>  #include <linux/cpu_pm.h>
> @@ -15,7 +16,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/slab.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_domain.h>
> diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c
> index 02aa0b39af9d..12fec92a85fd 100644
> --- a/drivers/cpuidle/dt_idle_states.c
> +++ b/drivers/cpuidle/dt_idle_states.c
> @@ -14,7 +14,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>
>  #include "dt_idle_states.h"
>
>
> --
> 2.39.2
>

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 16/19] cpuidle: Adjust includes to remove of_device.h
@ 2023-03-30  4:02     ` Anup Patel
  0 siblings, 0 replies; 112+ messages in thread
From: Anup Patel @ 2023-03-30  4:02 UTC (permalink / raw)
  To: Rob Herring
  Cc: Nishanth Menon, Huacai Chen, Rafael J. Wysocki, Yangtao Li,
	Viresh Kumar, Lorenzo Pieralisi, Amit Kucheria, Jiaxun Yang,
	linux-mips, linux-tegra, Thierry Reding, sparclinux, linux-riscv,
	Frank Rowand, Viresh Kumar, Bjorn Andersson, Marc Zyngier,
	Samuel Holland, Daniel Lezcano, Russell King, Jernej Skrabec,
	Jonathan Hunter, Chen-Yu Tsai, Andy Gross, Zhang Rui,
	linux-sunxi, devicetree, Albert Ou, linux-pm, linux-arm-msm,
	Nicholas Piggin, Rob Herring, linux-mediatek, Paul Walmsley,
	Matthias Brugger, Thomas Gleixner, linux-arm-kernel,
	AngeloGioacchino Del Regno, Stephen Boyd, Greg Kroah-Hartman,
	Amit Daniel Kachhap, linux-kernel, Konrad Dybcio, Palmer Dabbelt,
	Sudeep Holla, linuxppc-dev, David S. Miller, Lukasz Luba

On Wed, Mar 29, 2023 at 9:22 PM Rob Herring <robh@kernel.org> wrote:
>
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h,
> cpuhotplug.h, of.h, and of_platform.h) and drop including of_device.h.
>
> Signed-off-by: Rob Herring <robh@kernel.org>

For cpuidle-riscv-sbi.c
Acked-by: Anup Patel <anup@brainfault.org>

Regards,
Anup

> ---
> Please ack and I will take the series via the DT tree.
> ---
>  drivers/cpuidle/cpuidle-psci.c      | 1 -
>  drivers/cpuidle/cpuidle-qcom-spm.c  | 3 +--
>  drivers/cpuidle/cpuidle-riscv-sbi.c | 2 +-
>  drivers/cpuidle/dt_idle_states.c    | 1 -
>  4 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
> index 6de027f9f6f5..bf68920d038a 100644
> --- a/drivers/cpuidle/cpuidle-psci.c
> +++ b/drivers/cpuidle/cpuidle-psci.c
> @@ -16,7 +16,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/platform_device.h>
>  #include <linux/psci.h>
>  #include <linux/pm_domain.h>
> diff --git a/drivers/cpuidle/cpuidle-qcom-spm.c b/drivers/cpuidle/cpuidle-qcom-spm.c
> index c6e2e91bb4c3..1fc9968eae19 100644
> --- a/drivers/cpuidle/cpuidle-qcom-spm.c
> +++ b/drivers/cpuidle/cpuidle-qcom-spm.c
> @@ -11,8 +11,7 @@
>  #include <linux/io.h>
>  #include <linux/slab.h>
>  #include <linux/of.h>
> -#include <linux/of_address.h>
> -#include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/err.h>
>  #include <linux/platform_device.h>
>  #include <linux/cpuidle.h>
> diff --git a/drivers/cpuidle/cpuidle-riscv-sbi.c b/drivers/cpuidle/cpuidle-riscv-sbi.c
> index be383f4b6855..ae0b838a0634 100644
> --- a/drivers/cpuidle/cpuidle-riscv-sbi.c
> +++ b/drivers/cpuidle/cpuidle-riscv-sbi.c
> @@ -8,6 +8,7 @@
>
>  #define pr_fmt(fmt) "cpuidle-riscv-sbi: " fmt
>
> +#include <linux/cpuhotplug.h>
>  #include <linux/cpuidle.h>
>  #include <linux/cpumask.h>
>  #include <linux/cpu_pm.h>
> @@ -15,7 +16,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <linux/slab.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_domain.h>
> diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c
> index 02aa0b39af9d..12fec92a85fd 100644
> --- a/drivers/cpuidle/dt_idle_states.c
> +++ b/drivers/cpuidle/dt_idle_states.c
> @@ -14,7 +14,6 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>
>  #include "dt_idle_states.h"
>
>
> --
> 2.39.2
>

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

* Re: [PATCH 11/19] clocksource: ingenic: Add explicit include for cpuhotplug.h
  2023-03-29 15:52   ` Rob Herring
  (?)
@ 2023-04-01 19:22     ` Daniel Lezcano
  -1 siblings, 0 replies; 112+ messages in thread
From: Daniel Lezcano @ 2023-04-01 19:22 UTC (permalink / raw)
  To: Rob Herring, David S. Miller, Rob Herring, Frank Rowand,
	Russell King, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman,
	Rafael J. Wysocki, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

On 29/03/2023 17:52, Rob Herring wrote:
> Removing include of cpu.h from of_device.h (included by of_platform.h)
> causes an error in ingenic-timer:
> 
> drivers/clocksource/ingenic-timer.c: In function ‘ingenic_tcu_init’:
> drivers/clocksource/ingenic-timer.c:338:15: error: implicit declaration of function ‘cpuhp_setup_state’
> 
> The of_platform.h header is not necessary either, so it and of_address.h
> can be dropped.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---

Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* Re: [PATCH 11/19] clocksource: ingenic: Add explicit include for cpuhotplug.h
@ 2023-04-01 19:22     ` Daniel Lezcano
  0 siblings, 0 replies; 112+ messages in thread
From: Daniel Lezcano @ 2023-04-01 19:22 UTC (permalink / raw)
  To: Rob Herring, David S. Miller, Rob Herring, Frank Rowand,
	Russell King, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman,
	Rafael J. Wysocki, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

On 29/03/2023 17:52, Rob Herring wrote:
> Removing include of cpu.h from of_device.h (included by of_platform.h)
> causes an error in ingenic-timer:
> 
> drivers/clocksource/ingenic-timer.c: In function ‘ingenic_tcu_init’:
> drivers/clocksource/ingenic-timer.c:338:15: error: implicit declaration of function ‘cpuhp_setup_state’
> 
> The of_platform.h header is not necessary either, so it and of_address.h
> can be dropped.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---

Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 11/19] clocksource: ingenic: Add explicit include for cpuhotplug.h
@ 2023-04-01 19:22     ` Daniel Lezcano
  0 siblings, 0 replies; 112+ messages in thread
From: Daniel Lezcano @ 2023-04-01 19:22 UTC (permalink / raw)
  To: Rob Herring, David S. Miller, Rob Herring, Frank Rowand,
	Russell King, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman,
	Rafael J. Wysocki, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

On 29/03/2023 17:52, Rob Herring wrote:
> Removing include of cpu.h from of_device.h (included by of_platform.h)
> causes an error in ingenic-timer:
> 
> drivers/clocksource/ingenic-timer.c: In function ‘ingenic_tcu_init’:
> drivers/clocksource/ingenic-timer.c:338:15: error: implicit declaration of function ‘cpuhp_setup_state’
> 
> The of_platform.h header is not necessary either, so it and of_address.h
> can be dropped.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---

Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* Re: [PATCH 12/19] thermal: cpuidle_cooling: Adjust includes to remove of_device.h
  2023-03-29 15:52   ` Rob Herring
  (?)
@ 2023-04-01 19:22     ` Daniel Lezcano
  -1 siblings, 0 replies; 112+ messages in thread
From: Daniel Lezcano @ 2023-04-01 19:22 UTC (permalink / raw)
  To: Rob Herring, David S. Miller, Rob Herring, Frank Rowand,
	Russell King, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman,
	Rafael J. Wysocki, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

On 29/03/2023 17:52, Rob Herring wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h and
> of.h) and drop including of_device.h.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.

Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>

-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* Re: [PATCH 12/19] thermal: cpuidle_cooling: Adjust includes to remove of_device.h
@ 2023-04-01 19:22     ` Daniel Lezcano
  0 siblings, 0 replies; 112+ messages in thread
From: Daniel Lezcano @ 2023-04-01 19:22 UTC (permalink / raw)
  To: Rob Herring, David S. Miller, Rob Herring, Frank Rowand,
	Russell King, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman,
	Rafael J. Wysocki, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

On 29/03/2023 17:52, Rob Herring wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h and
> of.h) and drop including of_device.h.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.

Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>

-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 12/19] thermal: cpuidle_cooling: Adjust includes to remove of_device.h
@ 2023-04-01 19:22     ` Daniel Lezcano
  0 siblings, 0 replies; 112+ messages in thread
From: Daniel Lezcano @ 2023-04-01 19:22 UTC (permalink / raw)
  To: Rob Herring, David S. Miller, Rob Herring, Frank Rowand,
	Russell King, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Greg Kroah-Hartman,
	Rafael J. Wysocki, Thomas Gleixner, Amit Daniel Kachhap,
	Viresh Kumar, Lukasz Luba, Amit Kucheria, Zhang Rui,
	Matthias Brugger, AngeloGioacchino Del Regno, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Thierry Reding,
	Jonathan Hunter, Yangtao Li, Lorenzo Pieralisi, Sudeep Holla,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Anup Patel,
	Huacai Chen, Jiaxun Yang, Marc Zyngier, Viresh Kumar,
	Nishanth Menon, Stephen Boyd
  Cc: devicetree, linux-pm, linux-arm-msm, linux-kernel, linux-mips,
	linux-tegra, linux-mediatek, sparclinux, linux-riscv,
	linuxppc-dev, linux-sunxi, linux-arm-kernel

On 29/03/2023 17:52, Rob Herring wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h and
> of.h) and drop including of_device.h.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.

Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>

-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* Re: [PATCH 08/19] riscv: Add explicit include for cpu.h
  2023-03-29 15:52   ` Rob Herring
  (?)
@ 2023-04-29 18:24     ` Palmer Dabbelt
  -1 siblings, 0 replies; 112+ messages in thread
From: Palmer Dabbelt @ 2023-04-29 18:24 UTC (permalink / raw)
  To: robh
  Cc: davem, robh+dt, frowand.list, linux, wens, jernej.skrabec,
	samuel, Paul Walmsley, aou, Greg KH, rafael, daniel.lezcano,
	tglx, amit.kachhap, viresh.kumar, lukasz.luba, amitk, rui.zhang,
	matthias.bgg, angelogioacchino.delregno, mpe, npiggin,
	christophe.leroy, thierry.reding, jonathanh, tiny.windzz,
	lpieralisi, sudeep.holla, agross, andersson, konrad.dybcio, anup,
	chenhuacai, jiaxun.yang, Marc Zyngier, vireshk, nm, sboyd,
	sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

On Wed, 29 Mar 2023 08:52:05 PDT (-0700), robh@kernel.org wrote:
> Removing the include of cpu.h from of_device.h (included by
> of_platform.h) causes an error in setup.c:
>
> arch/riscv/kernel/setup.c:313:22: error: arithmetic on a pointer to an incomplete type 'typeof(struct cpu)' (aka 'struct cpu')
>
> The of_platform.h header is not necessary either, so it can be dropped.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---
>  arch/riscv/kernel/setup.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
> index 376d2827e736..dcfa4b6fa4b1 100644
> --- a/arch/riscv/kernel/setup.c
> +++ b/arch/riscv/kernel/setup.c
> @@ -8,6 +8,7 @@
>   *  Nick Kossifidis <mick@ics.forth.gr>
>   */
>
> +#include <linux/cpu.h>
>  #include <linux/init.h>
>  #include <linux/mm.h>
>  #include <linux/memblock.h>
> @@ -15,7 +16,6 @@
>  #include <linux/console.h>
>  #include <linux/screen_info.h>
>  #include <linux/of_fdt.h>
> -#include <linux/of_platform.h>
>  #include <linux/sched/task.h>
>  #include <linux/smp.h>
>  #include <linux/efi.h>

Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>

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

* Re: [PATCH 08/19] riscv: Add explicit include for cpu.h
@ 2023-04-29 18:24     ` Palmer Dabbelt
  0 siblings, 0 replies; 112+ messages in thread
From: Palmer Dabbelt @ 2023-04-29 18:24 UTC (permalink / raw)
  To: robh
  Cc: davem, robh+dt, frowand.list, linux, wens, jernej.skrabec,
	samuel, Paul Walmsley, aou, Greg KH, rafael, daniel.lezcano,
	tglx, amit.kachhap, viresh.kumar, lukasz.luba, amitk, rui.zhang,
	matthias.bgg, angelogioacchino.delregno, mpe, npiggin,
	christophe.leroy, thierry.reding, jonathanh, tiny.windzz,
	lpieralisi, sudeep.holla, agross, andersson, konrad.dybcio, anup,
	chenhuacai, jiaxun.yang, Marc Zyngier, vireshk, nm, sboyd,
	sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

On Wed, 29 Mar 2023 08:52:05 PDT (-0700), robh@kernel.org wrote:
> Removing the include of cpu.h from of_device.h (included by
> of_platform.h) causes an error in setup.c:
>
> arch/riscv/kernel/setup.c:313:22: error: arithmetic on a pointer to an incomplete type 'typeof(struct cpu)' (aka 'struct cpu')
>
> The of_platform.h header is not necessary either, so it can be dropped.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---
>  arch/riscv/kernel/setup.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
> index 376d2827e736..dcfa4b6fa4b1 100644
> --- a/arch/riscv/kernel/setup.c
> +++ b/arch/riscv/kernel/setup.c
> @@ -8,6 +8,7 @@
>   *  Nick Kossifidis <mick@ics.forth.gr>
>   */
>
> +#include <linux/cpu.h>
>  #include <linux/init.h>
>  #include <linux/mm.h>
>  #include <linux/memblock.h>
> @@ -15,7 +16,6 @@
>  #include <linux/console.h>
>  #include <linux/screen_info.h>
>  #include <linux/of_fdt.h>
> -#include <linux/of_platform.h>
>  #include <linux/sched/task.h>
>  #include <linux/smp.h>
>  #include <linux/efi.h>

Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 08/19] riscv: Add explicit include for cpu.h
@ 2023-04-29 18:24     ` Palmer Dabbelt
  0 siblings, 0 replies; 112+ messages in thread
From: Palmer Dabbelt @ 2023-04-29 18:24 UTC (permalink / raw)
  To: robh
  Cc: nm, chenhuacai, rafael, tiny.windzz, viresh.kumar, lpieralisi,
	amitk, jiaxun.yang, linux-mips, linux-tegra, thierry.reding,
	sparclinux, linux-riscv, frowand.list, vireshk, andersson,
	Marc Zyngier, samuel, daniel.lezcano, linux, jernej.skrabec,
	jonathanh, wens, agross, anup, rui.zhang, linux-sunxi,
	devicetree, aou, linux-pm, linux-arm-msm, npiggin, robh+dt,
	linux-mediatek, Paul Walmsley, matthias.bgg, tglx,
	linux-arm-kernel, angelogioacchino.delregno, sboyd

On Wed, 29 Mar 2023 08:52:05 PDT (-0700), robh@kernel.org wrote:
> Removing the include of cpu.h from of_device.h (included by
> of_platform.h) causes an error in setup.c:
>
> arch/riscv/kernel/setup.c:313:22: error: arithmetic on a pointer to an incomplete type 'typeof(struct cpu)' (aka 'struct cpu')
>
> The of_platform.h header is not necessary either, so it can be dropped.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---
>  arch/riscv/kernel/setup.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
> index 376d2827e736..dcfa4b6fa4b1 100644
> --- a/arch/riscv/kernel/setup.c
> +++ b/arch/riscv/kernel/setup.c
> @@ -8,6 +8,7 @@
>   *  Nick Kossifidis <mick@ics.forth.gr>
>   */
>
> +#include <linux/cpu.h>
>  #include <linux/init.h>
>  #include <linux/mm.h>
>  #include <linux/memblock.h>
> @@ -15,7 +16,6 @@
>  #include <linux/console.h>
>  #include <linux/screen_info.h>
>  #include <linux/of_fdt.h>
> -#include <linux/of_platform.h>
>  #include <linux/sched/task.h>
>  #include <linux/smp.h>
>  #include <linux/efi.h>

Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>

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

* Re: [PATCH 09/19] riscv: cacheinfo: Adjust includes to remove of_device.h
  2023-03-29 15:52   ` Rob Herring
  (?)
@ 2023-04-29 18:24     ` Palmer Dabbelt
  -1 siblings, 0 replies; 112+ messages in thread
From: Palmer Dabbelt @ 2023-04-29 18:24 UTC (permalink / raw)
  To: robh
  Cc: davem, robh+dt, frowand.list, linux, wens, jernej.skrabec,
	samuel, Paul Walmsley, aou, Greg KH, rafael, daniel.lezcano,
	tglx, amit.kachhap, viresh.kumar, lukasz.luba, amitk, rui.zhang,
	matthias.bgg, angelogioacchino.delregno, mpe, npiggin,
	christophe.leroy, thierry.reding, jonathanh, tiny.windzz,
	lpieralisi, sudeep.holla, agross, andersson, konrad.dybcio, anup,
	chenhuacai, jiaxun.yang, Marc Zyngier, vireshk, nm, sboyd,
	sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

On Wed, 29 Mar 2023 08:52:06 PDT (-0700), robh@kernel.org wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h and
> of.h) and drop including of_device.h.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---
>  arch/riscv/kernel/cacheinfo.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c
> index 3a13113f1b29..e3829d2de5d9 100644
> --- a/arch/riscv/kernel/cacheinfo.c
> +++ b/arch/riscv/kernel/cacheinfo.c
> @@ -5,7 +5,6 @@
>
>  #include <linux/cpu.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <asm/cacheinfo.h>
>
>  static struct riscv_cacheinfo_ops *rv_cache_ops;

Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>

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

* Re: [PATCH 09/19] riscv: cacheinfo: Adjust includes to remove of_device.h
@ 2023-04-29 18:24     ` Palmer Dabbelt
  0 siblings, 0 replies; 112+ messages in thread
From: Palmer Dabbelt @ 2023-04-29 18:24 UTC (permalink / raw)
  To: robh
  Cc: davem, robh+dt, frowand.list, linux, wens, jernej.skrabec,
	samuel, Paul Walmsley, aou, Greg KH, rafael, daniel.lezcano,
	tglx, amit.kachhap, viresh.kumar, lukasz.luba, amitk, rui.zhang,
	matthias.bgg, angelogioacchino.delregno, mpe, npiggin,
	christophe.leroy, thierry.reding, jonathanh, tiny.windzz,
	lpieralisi, sudeep.holla, agross, andersson, konrad.dybcio, anup,
	chenhuacai, jiaxun.yang, Marc Zyngier, vireshk, nm, sboyd,
	sparclinux, linux-kernel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-riscv, linux-pm, linux-mediatek, linuxppc-dev,
	linux-tegra, linux-arm-msm, linux-mips

On Wed, 29 Mar 2023 08:52:06 PDT (-0700), robh@kernel.org wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h and
> of.h) and drop including of_device.h.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---
>  arch/riscv/kernel/cacheinfo.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c
> index 3a13113f1b29..e3829d2de5d9 100644
> --- a/arch/riscv/kernel/cacheinfo.c
> +++ b/arch/riscv/kernel/cacheinfo.c
> @@ -5,7 +5,6 @@
>
>  #include <linux/cpu.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <asm/cacheinfo.h>
>
>  static struct riscv_cacheinfo_ops *rv_cache_ops;

Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 09/19] riscv: cacheinfo: Adjust includes to remove of_device.h
@ 2023-04-29 18:24     ` Palmer Dabbelt
  0 siblings, 0 replies; 112+ messages in thread
From: Palmer Dabbelt @ 2023-04-29 18:24 UTC (permalink / raw)
  To: robh
  Cc: nm, chenhuacai, rafael, tiny.windzz, viresh.kumar, lpieralisi,
	amitk, jiaxun.yang, linux-mips, linux-tegra, thierry.reding,
	sparclinux, linux-riscv, frowand.list, vireshk, andersson,
	Marc Zyngier, samuel, daniel.lezcano, linux, jernej.skrabec,
	jonathanh, wens, agross, anup, rui.zhang, linux-sunxi,
	devicetree, aou, linux-pm, linux-arm-msm, npiggin, robh+dt,
	linux-mediatek, Paul Walmsley, matthias.bgg, tglx,
	linux-arm-kernel, angelogioacchino.delregno, sboyd

On Wed, 29 Mar 2023 08:52:06 PDT (-0700), robh@kernel.org wrote:
> Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
> implicitly including other includes, and is no longer needed. Adjust the
> include files with what was implicitly included by of_device.h (cpu.h and
> of.h) and drop including of_device.h.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Please ack and I will take the series via the DT tree.
> ---
>  arch/riscv/kernel/cacheinfo.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c
> index 3a13113f1b29..e3829d2de5d9 100644
> --- a/arch/riscv/kernel/cacheinfo.c
> +++ b/arch/riscv/kernel/cacheinfo.c
> @@ -5,7 +5,6 @@
>
>  #include <linux/cpu.h>
>  #include <linux/of.h>
> -#include <linux/of_device.h>
>  #include <asm/cacheinfo.h>
>
>  static struct riscv_cacheinfo_ops *rv_cache_ops;

Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>

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

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

Thread overview: 112+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-29 15:51 [PATCH 00/19] DT header disentangling, part 1 Rob Herring
2023-03-29 15:51 ` Rob Herring
2023-03-29 15:51 ` Rob Herring
2023-03-29 15:51 ` [PATCH 01/19] of: Make devtree_lock declaration private Rob Herring
2023-03-29 15:51   ` Rob Herring
2023-03-29 15:51   ` Rob Herring
2023-03-29 15:51 ` [PATCH 02/19] of: Move of_device_(add|register|unregister) to of_platform.h Rob Herring
2023-03-29 15:51   ` Rob Herring
2023-03-29 15:51   ` Rob Herring
2023-03-29 15:52 ` [PATCH 03/19] of: Move of_device_get_match_data() declaration Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52 ` [PATCH 04/19] of: Move CPU node related functions to their own file Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 18:14   ` Sudeep Holla
2023-03-29 18:14     ` Sudeep Holla
2023-03-29 18:14     ` Sudeep Holla
2023-03-29 15:52 ` [PATCH 05/19] of: Drop unnecessary includes in headers Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52 ` [PATCH 06/19] ARM: sunxi: Drop of_device.h include Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:56   ` Chen-Yu Tsai
2023-03-29 15:56     ` Chen-Yu Tsai
2023-03-29 15:56     ` Chen-Yu Tsai
2023-03-29 15:52 ` [PATCH 07/19] ARM: cpuidle: " Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52 ` [PATCH 08/19] riscv: Add explicit include for cpu.h Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-04-29 18:24   ` Palmer Dabbelt
2023-04-29 18:24     ` Palmer Dabbelt
2023-04-29 18:24     ` Palmer Dabbelt
2023-03-29 15:52 ` [PATCH 09/19] riscv: cacheinfo: Adjust includes to remove of_device.h Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-04-29 18:24   ` Palmer Dabbelt
2023-04-29 18:24     ` Palmer Dabbelt
2023-04-29 18:24     ` Palmer Dabbelt
2023-03-29 15:52 ` [PATCH 10/19] " Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 16:22   ` Greg Kroah-Hartman
2023-03-29 16:22     ` Greg Kroah-Hartman
2023-03-29 16:22     ` Greg Kroah-Hartman
2023-03-29 18:15   ` Sudeep Holla
2023-03-29 18:15     ` Sudeep Holla
2023-03-29 18:15     ` Sudeep Holla
2023-03-29 15:52 ` [PATCH 11/19] clocksource: ingenic: Add explicit include for cpuhotplug.h Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-04-01 19:22   ` Daniel Lezcano
2023-04-01 19:22     ` Daniel Lezcano
2023-04-01 19:22     ` Daniel Lezcano
2023-03-29 15:52 ` [PATCH 12/19] thermal: cpuidle_cooling: Adjust includes to remove of_device.h Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:59   ` Rafael J. Wysocki
2023-03-29 15:59     ` Rafael J. Wysocki
2023-03-29 15:59     ` Rafael J. Wysocki
2023-04-01 19:22   ` Daniel Lezcano
2023-04-01 19:22     ` Daniel Lezcano
2023-04-01 19:22     ` Daniel Lezcano
2023-03-29 15:52 ` [PATCH 13/19] soc: mediatek: mtk-svs: Add explicit include for cpu.h Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52 ` [PATCH 14/19] cpufreq: Adjust includes to remove of_device.h Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:57   ` Rafael J. Wysocki
2023-03-29 15:57     ` Rafael J. Wysocki
2023-03-29 15:57     ` Rafael J. Wysocki
2023-03-29 20:51   ` kernel test robot
2023-03-30  3:54   ` Viresh Kumar
2023-03-30  3:54     ` Viresh Kumar
2023-03-30  3:54     ` Viresh Kumar
2023-03-29 15:52 ` [PATCH 15/19] cpufreq: sun50i: Add explicit include for cpu.h Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 16:05   ` Jernej Škrabec
2023-03-29 16:05     ` Jernej Škrabec
2023-03-29 16:05     ` Jernej Škrabec
2023-03-30  3:54   ` Viresh Kumar
2023-03-30  3:54     ` Viresh Kumar
2023-03-30  3:54     ` Viresh Kumar
2023-03-29 15:52 ` [PATCH 16/19] cpuidle: Adjust includes to remove of_device.h Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:57   ` Rafael J. Wysocki
2023-03-29 15:57     ` Rafael J. Wysocki
2023-03-29 15:57     ` Rafael J. Wysocki
2023-03-29 18:17   ` Sudeep Holla
2023-03-29 18:17     ` Sudeep Holla
2023-03-29 18:17     ` Sudeep Holla
2023-03-30  4:02   ` Anup Patel
2023-03-30  4:02     ` Anup Patel
2023-03-30  4:02     ` Anup Patel
2023-03-29 15:52 ` [PATCH 17/19] irqchip: loongson-eiointc: Add explicit include for cpuhotplug.h Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52 ` [PATCH 18/19] OPP: Adjust includes to remove of_device.h Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-30  3:54   ` Viresh Kumar
2023-03-30  3:54     ` Viresh Kumar
2023-03-30  3:54     ` Viresh Kumar
2023-03-29 15:52 ` [PATCH 19/19] of: Drop cpu.h include from of_device.h Rob Herring
2023-03-29 15:52   ` Rob Herring
2023-03-29 15:52   ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.