Skip to contentSkip to conversation

soc: samsung: include linux/array_size.h where needed

PATCH Applied Arnd Bergmann 3 participants 3 messages Mar 5, 2025 – Mar 19, 2025 Arm Samsung Exynos

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: samsung: include linux/array_size.h where needed

From: Arnd Bergmann <[email protected]>

This does not necessarily get included through asm/io.h:

drivers/soc/samsung/exynos3250-pmu.c:120:18: error: use of undeclared identifier 'ARRAY_SIZE'
120 | for (i = 0; i < ARRAY_SIZE(exynos3250_list_feed); i++) {
| ^
drivers/soc/samsung/exynos5250-pmu.c:162:18: error: use of undeclared identifier 'ARRAY_SIZE'
162 | for (i = 0; i < ARRAY_SIZE(exynos5_list_both_cnt_feed); i++) {
| ^

---
 drivers/soc/samsung/exynos-asv.c     | 1 +
 drivers/soc/samsung/exynos-chipid.c  | 1 +
 drivers/soc/samsung/exynos-pmu.c     | 1 +
 drivers/soc/samsung/exynos-usi.c     | 1 +
 drivers/soc/samsung/exynos3250-pmu.c | 1 +
 drivers/soc/samsung/exynos5250-pmu.c | 1 +
 drivers/soc/samsung/exynos5420-pmu.c | 1 +
 7 files changed, 7 insertions(+)
drivers/soc/samsung/exynos-asv.c +1 -0
index 97006cc3b946..8e681f519526 100644
@@ -9,6 +9,7 @@
  * Samsung Exynos SoC Adaptive Supply Voltage support
  */
 
+#include <linux/array_size.h>
 #include <linux/cpu.h>
 #include <linux/device.h>
 #include <linux/energy_model.h>
drivers/soc/samsung/exynos-chipid.c +1 -0
index 3f1a654c7e66..deb1d882cd4c 100644
@@ -12,6 +12,7 @@
  * Samsung Exynos SoC Adaptive Supply Voltage and Chip ID support
  */
 
+#include <linux/array_size.h>
 #include <linux/device.h>
 #include <linux/errno.h>
 #include <linux/mfd/syscon.h>
drivers/soc/samsung/exynos-pmu.c +1 -0
index dd5256e5aae1..c40313886a01 100644
@@ -5,6 +5,7 @@
 //
 // Exynos - CPU PMU(Power Management Unit) support
 
+#include <linux/array_size.h>
 #include <linux/arm-smccc.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
drivers/soc/samsung/exynos-usi.c +1 -0
index 173b76720079..c5661ac19f7b 100644
@@ -6,6 +6,7 @@
  * Samsung Exynos USI driver (Universal Serial Interface).
  */
 
+#include <linux/array_size.h>
 #include <linux/clk.h>
 #include <linux/mfd/syscon.h>
 #include <linux/module.h>
drivers/soc/samsung/exynos3250-pmu.c +1 -0
index 30f230ed1769..26c9c6e9f551 100644
@@ -7,6 +7,7 @@
 
 #include <linux/soc/samsung/exynos-regs-pmu.h>
 #include <linux/soc/samsung/exynos-pmu.h>
+#include <linux/array_size.h>
 
 #include "exynos-pmu.h"
 
drivers/soc/samsung/exynos5250-pmu.c +1 -0
index 7a2d50be6b4a..ae693d8d508b 100644
@@ -7,6 +7,7 @@
 
 #include <linux/soc/samsung/exynos-regs-pmu.h>
 #include <linux/soc/samsung/exynos-pmu.h>
+#include <linux/array_size.h>
 
 #include "exynos-pmu.h"
 
drivers/soc/samsung/exynos5420-pmu.c +1 -0
index 6fedcd78cb45..58a2209795f7 100644
@@ -5,6 +5,7 @@
 //
 // Exynos5420 - CPU PMU (Power Management Unit) support
 
+#include <linux/array_size.h>
 #include <linux/pm.h>
 #include <linux/soc/samsung/exynos-regs-pmu.h>
 #include <linux/soc/samsung/exynos-pmu.h>
Signature · 1 line
2.39.5
#1 lore raw
Quoted 10 lines · Arnd Bergmann

This does not necessarily get included through asm/io.h:

drivers/soc/samsung/exynos3250-pmu.c:120:18: error: use of undeclared identifier 'ARRAY_SIZE'
120 | for (i = 0; i < ARRAY_SIZE(exynos3250_list_feed); i++) {
| ^
drivers/soc/samsung/exynos5250-pmu.c:162:18: error: use of undeclared identifier 'ARRAY_SIZE'
162 | for (i = 0; i < ARRAY_SIZE(exynos5_list_both_cnt_feed); i++) {
| ^

[...]

Applied, thanks!

[1/1] soc: samsung: include linux/array_size.h where needed

      https://git.kernel.org/krzk/linux/c/4c57930f68d90e0d52c396d058cfa9ed8447a6c4

Best regards,

Signature · 1 line
Krzysztof Kozlowski <[email protected]>
#2 lore raw
In reply to Arnd Bergmann
This patch was applied to soc/soc.git (for-next) by Krzysztof Kozlowski <[email protected]>:

Hello:

This patch was applied to soc/soc.git (for-next) by Krzysztof Kozlowski <[email protected]>:

Quoted 4 lines · On Wed, 5 Mar 2025 22:14:02 +0100 you wrote:

From: Arnd Bergmann <[email protected]>

This does not necessarily get included through asm/io.h:

Quoted 8 lines

drivers/soc/samsung/exynos3250-pmu.c:120:18: error: use of undeclared identifier 'ARRAY_SIZE'
120 | for (i = 0; i < ARRAY_SIZE(exynos3250_list_feed); i++) {
| ^
drivers/soc/samsung/exynos5250-pmu.c:162:18: error: use of undeclared identifier 'ARRAY_SIZE'
162 | for (i = 0; i < ARRAY_SIZE(exynos5_list_both_cnt_feed); i++) {
| ^

[...]

Here is the summary with links:
- soc: samsung: include linux/array_size.h where needed

    https://git.kernel.org/soc/soc/c/4c57930f68d9

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html