soc.lore.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings
@ 2023-05-16 15:30 Arnd Bergmann
  2023-05-16 15:30 ` [PATCH 01/13] ARM: davinci: fix davinci_cpufreq_init() declaration Arnd Bergmann
                   ` (13 more replies)
  0 siblings, 14 replies; 32+ messages in thread
From: Arnd Bergmann @ 2023-05-16 15:30 UTC (permalink / raw)
  To: soc
  Cc: Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, linux-omap, linux-clk, linux-usb

From: Arnd Bergmann <arnd@arndb.de>

This is part of a longer series of patches to address all -Wmissing-prototype
warnings. I would like to take these through the soc tree directly, but
if anyone wants to first apply a patch to their platform specific tree,
I'll drop that one. See the Link below for more background.

     Arnd

Link: https://people.kernel.org/arnd/missing-prototype-warnings-in-the-kernel

Arnd Bergmann (13):
  ARM: davinci: fix davinci_cpufreq_init() declaration
  ARM: ep93xx: fix missing-prototype warnings
  ARM: highbank: add missing include
  ARM: imx: add missing include
  ARM: imx: remove unused mx25_revision()
  ARM: lpc32xx: add missing include
  ARM: omap1: add missing include
  ARM: omap2: fix missing tick_broadcast() prototype
  ARM: orion5x: fix d2net gpio initialization
  ARM: pxa: fix missing-prototypes warnings
  ARM: sa1100: address missing prototype warnings
  ARM: spear: include "pl080.h" for pl080_get_signal() prototype
  ARM: versatile: mark mmc_status() static

 arch/arm/common/sa1111.c                      |  2 +-
 arch/arm/mach-davinci/common.c                |  1 +
 arch/arm/mach-davinci/common.h                |  6 ---
 arch/arm/mach-ep93xx/timer-ep93xx.c           |  3 +-
 arch/arm/mach-highbank/pm.c                   |  2 +
 arch/arm/mach-imx/Makefile                    |  2 +-
 arch/arm/mach-imx/cpu-imx25.c                 | 50 -------------------
 arch/arm/mach-imx/pm-imx25.c                  |  1 +
 arch/arm/mach-lpc32xx/serial.c                |  1 +
 arch/arm/mach-omap1/serial.c                  |  1 +
 arch/arm/mach-omap2/board-generic.c           |  1 +
 arch/arm/mach-orion5x/board-dt.c              |  3 ++
 arch/arm/mach-orion5x/common.h                |  6 +++
 arch/arm/mach-pxa/generic.h                   | 15 ------
 arch/arm/mach-pxa/mfp-pxa2xx.c                |  1 +
 arch/arm/mach-pxa/pxa25x.c                    |  1 +
 arch/arm/mach-pxa/pxa27x.c                    |  3 ++
 arch/arm/mach-pxa/reset.c                     |  1 +
 arch/arm/mach-pxa/spitz_pm.c                  |  2 +-
 arch/arm/mach-sa1100/assabet.c                |  2 +-
 arch/arm/mach-sa1100/pm.c                     |  2 +
 arch/arm/mach-spear/pl080.c                   |  1 +
 arch/arm/mach-versatile/versatile.c           |  2 +-
 drivers/clk/pxa/clk-pxa25x.c                  |  2 +
 drivers/clk/pxa/clk-pxa27x.c                  |  3 +-
 drivers/hwmon/max1111.c                       |  1 +
 drivers/usb/gadget/udc/pxa27x_udc.c           |  6 ---
 drivers/usb/host/ohci-pxa27x.c                |  7 +--
 include/linux/platform_data/asoc-pxa.h        |  1 +
 include/linux/platform_data/davinci-cpufreq.h |  6 +++
 include/linux/platform_data/pxa2xx_udc.h      |  6 +++
 include/linux/soc/pxa/smemc.h                 | 16 ++++++
 sound/arm/pxa2xx-ac97-lib.c                   |  2 -
 33 files changed, 67 insertions(+), 92 deletions(-)
 delete mode 100644 arch/arm/mach-imx/cpu-imx25.c

-- 
2.39.2

Cc: Russell King <linux@armlinux.org.uk>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Gregory Clement <gregory.clement@bootlin.com>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Viresh Kumar <vireshk@kernel.org>
Cc: Shiraz Hashim <shiraz.linux.kernel@gmail.com>
Cc: soc@kernel.org
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Cc: linux-clk@vger.kernel.org
Cc: linux-usb@vger.kernel.org

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

* [PATCH 01/13] ARM: davinci: fix davinci_cpufreq_init() declaration
  2023-05-16 15:30 [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings Arnd Bergmann
@ 2023-05-16 15:30 ` Arnd Bergmann
  2023-05-16 15:41   ` Bartosz Golaszewski
  2023-05-16 15:30 ` [PATCH 02/13] ARM: ep93xx: fix missing-prototype warnings Arnd Bergmann
                   ` (12 subsequent siblings)
  13 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2023-05-16 15:30 UTC (permalink / raw)
  To: soc
  Cc: Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, linux-omap, linux-clk, linux-usb

From: Arnd Bergmann <arnd@arndb.de>

The davinci_cpufreq_init() declaration is only seen by its caller
but not the definition:

drivers/cpufreq/davinci-cpufreq.c:153:12: error: no previous prototype for 'davinci_cpufreq_init'

Move it into the platform_data header that is already used an
interface between the two places.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-davinci/common.c                | 1 +
 arch/arm/mach-davinci/common.h                | 6 ------
 include/linux/platform_data/davinci-cpufreq.h | 6 ++++++
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-davinci/common.c b/arch/arm/mach-davinci/common.c
index c1ce6b2a8d48..7bc7018688de 100644
--- a/arch/arm/mach-davinci/common.c
+++ b/arch/arm/mach-davinci/common.c
@@ -11,6 +11,7 @@
 #include <linux/etherdevice.h>
 #include <linux/davinci_emac.h>
 #include <linux/dma-mapping.h>
+#include <linux/platform_data/davinci-cpufreq.h>
 
 #include <asm/tlb.h>
 #include <asm/mach/map.h>
diff --git a/arch/arm/mach-davinci/common.h b/arch/arm/mach-davinci/common.h
index b2a96cdf88da..010ba1df27b3 100644
--- a/arch/arm/mach-davinci/common.h
+++ b/arch/arm/mach-davinci/common.h
@@ -55,12 +55,6 @@ extern void davinci_common_init(const struct davinci_soc_info *soc_info);
 extern void davinci_init_ide(void);
 void davinci_init_late(void);
 
-#ifdef CONFIG_CPU_FREQ
-int davinci_cpufreq_init(void);
-#else
-static inline int davinci_cpufreq_init(void) { return 0; }
-#endif
-
 #ifdef CONFIG_SUSPEND
 int davinci_pm_init(void);
 #else
diff --git a/include/linux/platform_data/davinci-cpufreq.h b/include/linux/platform_data/davinci-cpufreq.h
index bc208c64e3d7..1ef91c36f609 100644
--- a/include/linux/platform_data/davinci-cpufreq.h
+++ b/include/linux/platform_data/davinci-cpufreq.h
@@ -16,4 +16,10 @@ struct davinci_cpufreq_config {
 	int (*init)(void);
 };
 
+#ifdef CONFIG_CPU_FREQ
+int davinci_cpufreq_init(void);
+#else
+static inline int davinci_cpufreq_init(void) { return 0; }
+#endif
+
 #endif /* _MACH_DAVINCI_CPUFREQ_H */
-- 
2.39.2


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

* [PATCH 02/13] ARM: ep93xx: fix missing-prototype warnings
  2023-05-16 15:30 [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings Arnd Bergmann
  2023-05-16 15:30 ` [PATCH 01/13] ARM: davinci: fix davinci_cpufreq_init() declaration Arnd Bergmann
@ 2023-05-16 15:30 ` Arnd Bergmann
  2023-05-16 15:51   ` Alexander Sverdlin
  2023-05-16 15:30 ` [PATCH 03/13] ARM: highbank: add missing include Arnd Bergmann
                   ` (11 subsequent siblings)
  13 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2023-05-16 15:30 UTC (permalink / raw)
  To: soc
  Cc: Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, linux-omap, linux-clk, linux-usb

From: Arnd Bergmann <arnd@arndb.de>

ep93xx_clocksource_read() is only called from the file it is declared in,
while ep93xx_timer_init() is declared in a header that is not included here.

arch/arm/mach-ep93xx/timer-ep93xx.c:120:13: error: no previous prototype for 'ep93xx_timer_init'
arch/arm/mach-ep93xx/timer-ep93xx.c:63:5: error: no previous prototype for 'ep93xx_clocksource_read'

Fixes: 000bc17817bf ("ARM: ep93xx: switch to GENERIC_CLOCKEVENTS")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-ep93xx/timer-ep93xx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-ep93xx/timer-ep93xx.c b/arch/arm/mach-ep93xx/timer-ep93xx.c
index dd4b164d1831..a9efa7bc2fa1 100644
--- a/arch/arm/mach-ep93xx/timer-ep93xx.c
+++ b/arch/arm/mach-ep93xx/timer-ep93xx.c
@@ -9,6 +9,7 @@
 #include <linux/io.h>
 #include <asm/mach/time.h>
 #include "soc.h"
+#include "platform.h"
 
 /*************************************************************************
  * Timer handling for EP93xx
@@ -60,7 +61,7 @@ static u64 notrace ep93xx_read_sched_clock(void)
 	return ret;
 }
 
-u64 ep93xx_clocksource_read(struct clocksource *c)
+static u64 ep93xx_clocksource_read(struct clocksource *c)
 {
 	u64 ret;
 
-- 
2.39.2


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

* [PATCH 03/13] ARM: highbank: add missing include
  2023-05-16 15:30 [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings Arnd Bergmann
  2023-05-16 15:30 ` [PATCH 01/13] ARM: davinci: fix davinci_cpufreq_init() declaration Arnd Bergmann
  2023-05-16 15:30 ` [PATCH 02/13] ARM: ep93xx: fix missing-prototype warnings Arnd Bergmann
@ 2023-05-16 15:30 ` Arnd Bergmann
  2023-05-16 15:58   ` Andre Przywara
  2023-05-16 15:31 ` [PATCH 04/13] ARM: imx: " Arnd Bergmann
                   ` (10 subsequent siblings)
  13 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2023-05-16 15:30 UTC (permalink / raw)
  To: soc
  Cc: Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, linux-omap, linux-clk, linux-usb

From: Arnd Bergmann <arnd@arndb.de>

highbank_pm_init() is declared in core.h this is not included in the
file that defines it.

arch/arm/mach-highbank/pm.c:43:13: error: no previous prototype for 'highbank_pm_init'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-highbank/pm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-highbank/pm.c b/arch/arm/mach-highbank/pm.c
index 561941baeda9..3fdbdb83113b 100644
--- a/arch/arm/mach-highbank/pm.c
+++ b/arch/arm/mach-highbank/pm.c
@@ -12,6 +12,8 @@
 
 #include <uapi/linux/psci.h>
 
+#include "core.h"
+
 #define HIGHBANK_SUSPEND_PARAM \
 	((0 << PSCI_0_2_POWER_STATE_ID_SHIFT) | \
 	 (1 << PSCI_0_2_POWER_STATE_AFFL_SHIFT) | \
-- 
2.39.2


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

* [PATCH 04/13] ARM: imx: add missing include
  2023-05-16 15:30 [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings Arnd Bergmann
                   ` (2 preceding siblings ...)
  2023-05-16 15:30 ` [PATCH 03/13] ARM: highbank: add missing include Arnd Bergmann
@ 2023-05-16 15:31 ` Arnd Bergmann
  2023-05-16 15:31 ` [PATCH 05/13] ARM: imx: remove unused mx25_revision() Arnd Bergmann
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 32+ messages in thread
From: Arnd Bergmann @ 2023-05-16 15:31 UTC (permalink / raw)
  To: soc
  Cc: Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, linux-omap, linux-clk, linux-usb

From: Arnd Bergmann <arnd@arndb.de>

imx25_pm_init() is declared in common.h but this is not included
before its definition:

arch/arm/mach-imx/pm-imx25.c:31:13: error: no previous prototype for 'imx25_pm_init'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-imx/pm-imx25.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-imx/pm-imx25.c b/arch/arm/mach-imx/pm-imx25.c
index f253e5019465..0c574e8607fd 100644
--- a/arch/arm/mach-imx/pm-imx25.c
+++ b/arch/arm/mach-imx/pm-imx25.c
@@ -6,6 +6,7 @@
 #include <linux/kernel.h>
 #include <linux/suspend.h>
 #include <linux/io.h>
+#include "common.h"
 
 static int imx25_suspend_enter(suspend_state_t state)
 {
-- 
2.39.2


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

* [PATCH 05/13] ARM: imx: remove unused mx25_revision()
  2023-05-16 15:30 [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings Arnd Bergmann
                   ` (3 preceding siblings ...)
  2023-05-16 15:31 ` [PATCH 04/13] ARM: imx: " Arnd Bergmann
@ 2023-05-16 15:31 ` Arnd Bergmann
  2023-05-16 23:34   ` Fabio Estevam
  2023-05-16 15:31 ` [PATCH 06/13] ARM: lpc32xx: add missing include Arnd Bergmann
                   ` (8 subsequent siblings)
  13 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2023-05-16 15:31 UTC (permalink / raw)
  To: soc
  Cc: Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, linux-omap, linux-clk, linux-usb

From: Arnd Bergmann <arnd@arndb.de>

This function has no prototype and no callers:

arm/mach-imx/cpu-imx25.c:43:5: error: no previous prototype for 'mx25_revision' [-Werror=missing-prototypes]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-imx/Makefile    |  2 +-
 arch/arm/mach-imx/cpu-imx25.c | 50 -----------------------------------
 2 files changed, 1 insertion(+), 51 deletions(-)
 delete mode 100644 arch/arm/mach-imx/cpu-imx25.c

diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 5c650bf40e02..35a99888f54a 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-y := cpu.o system.o irq-common.o
 
-obj-$(CONFIG_SOC_IMX25) += cpu-imx25.o mach-imx25.o pm-imx25.o
+obj-$(CONFIG_SOC_IMX25) += mach-imx25.o pm-imx25.o
 
 obj-$(CONFIG_SOC_IMX27) += cpu-imx27.o pm-imx27.o mach-imx27.o
 
diff --git a/arch/arm/mach-imx/cpu-imx25.c b/arch/arm/mach-imx/cpu-imx25.c
deleted file mode 100644
index cc86977d0a34..000000000000
--- a/arch/arm/mach-imx/cpu-imx25.c
+++ /dev/null
@@ -1,50 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- * MX25 CPU type detection
- *
- * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
- * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved
- */
-#include <linux/module.h>
-#include <linux/io.h>
-#include <linux/of.h>
-#include <linux/of_address.h>
-
-#include "iim.h"
-#include "hardware.h"
-
-static int mx25_cpu_rev = -1;
-
-static int mx25_read_cpu_rev(void)
-{
-	u32 rev;
-	void __iomem *iim_base;
-	struct device_node *np;
-
-	np = of_find_compatible_node(NULL, NULL, "fsl,imx25-iim");
-	iim_base = of_iomap(np, 0);
-	of_node_put(np);
-	BUG_ON(!iim_base);
-	rev = readl(iim_base + MXC_IIMSREV);
-	iounmap(iim_base);
-
-	switch (rev) {
-	case 0x00:
-		return IMX_CHIP_REVISION_1_0;
-	case 0x01:
-		return IMX_CHIP_REVISION_1_1;
-	case 0x02:
-		return IMX_CHIP_REVISION_1_2;
-	default:
-		return IMX_CHIP_REVISION_UNKNOWN;
-	}
-}
-
-int mx25_revision(void)
-{
-	if (mx25_cpu_rev == -1)
-		mx25_cpu_rev = mx25_read_cpu_rev();
-
-	return mx25_cpu_rev;
-}
-EXPORT_SYMBOL(mx25_revision);
-- 
2.39.2


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

* [PATCH 06/13] ARM: lpc32xx: add missing include
  2023-05-16 15:30 [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings Arnd Bergmann
                   ` (4 preceding siblings ...)
  2023-05-16 15:31 ` [PATCH 05/13] ARM: imx: remove unused mx25_revision() Arnd Bergmann
@ 2023-05-16 15:31 ` Arnd Bergmann
  2023-05-23 20:17   ` Vladimir Zapolskiy
  2023-05-16 15:31 ` [PATCH 07/13] ARM: omap1: " Arnd Bergmann
                   ` (7 subsequent siblings)
  13 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2023-05-16 15:31 UTC (permalink / raw)
  To: soc
  Cc: Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, linux-omap, linux-clk, linux-usb

From: Arnd Bergmann <arnd@arndb.de>

lpc32xx_loopback_set() is defined in linux/soc/nxp/lpc32xx-misc.h but
this is not included before the function definition.

arch/arm/mach-lpc32xx/serial.c:63:6: error: no previous prototype for 'lpc32xx_loopback_set'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-lpc32xx/serial.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-lpc32xx/serial.c b/arch/arm/mach-lpc32xx/serial.c
index 3e765c4bf986..3b1203db81b2 100644
--- a/arch/arm/mach-lpc32xx/serial.c
+++ b/arch/arm/mach-lpc32xx/serial.c
@@ -15,6 +15,7 @@
 #include <linux/serial_8250.h>
 #include <linux/clk.h>
 #include <linux/io.h>
+#include <linux/soc/nxp/lpc32xx-misc.h>
 
 #include "lpc32xx.h"
 #include "common.h"
-- 
2.39.2


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

* [PATCH 07/13] ARM: omap1: add missing include
  2023-05-16 15:30 [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings Arnd Bergmann
                   ` (5 preceding siblings ...)
  2023-05-16 15:31 ` [PATCH 06/13] ARM: lpc32xx: add missing include Arnd Bergmann
@ 2023-05-16 15:31 ` Arnd Bergmann
  2023-05-16 23:18   ` Aaro Koskinen
  2023-05-16 15:31 ` [PATCH 08/13] ARM: omap2: fix missing tick_broadcast() prototype Arnd Bergmann
                   ` (6 subsequent siblings)
  13 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2023-05-16 15:31 UTC (permalink / raw)
  To: soc
  Cc: Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, linux-omap, linux-clk, linux-usb

From: Arnd Bergmann <arnd@arndb.de>

The omap_serial_wakeup_init() declaration is not visible where it is
defined, so make sure "common.h" is included here, avoiding:

arch/arm/mach-omap1/serial.c:221:12: error: no previous prototype for 'omap_serial_wakeup_init' [-Werror=missing-prototypes]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap1/serial.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c
index 96f59110d649..f25b94c86aec 100644
--- a/arch/arm/mach-omap1/serial.c
+++ b/arch/arm/mach-omap1/serial.c
@@ -19,6 +19,7 @@
 
 #include <asm/mach-types.h>
 
+#include "common.h"
 #include "serial.h"
 #include "mux.h"
 #include "pm.h"
-- 
2.39.2


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

* [PATCH 08/13] ARM: omap2: fix missing tick_broadcast() prototype
  2023-05-16 15:30 [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings Arnd Bergmann
                   ` (6 preceding siblings ...)
  2023-05-16 15:31 ` [PATCH 07/13] ARM: omap1: " Arnd Bergmann
@ 2023-05-16 15:31 ` Arnd Bergmann
  2023-05-16 23:20   ` Aaro Koskinen
  2023-05-16 15:31 ` [PATCH 09/13] ARM: orion5x: fix d2net gpio initialization Arnd Bergmann
                   ` (5 subsequent siblings)
  13 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2023-05-16 15:31 UTC (permalink / raw)
  To: soc
  Cc: Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, linux-omap, linux-clk, linux-usb

From: Arnd Bergmann <arnd@arndb.de>

omap2 contains a hack to define tick_broadcast() on non-SMP
configurations in place of the normal SMP definition. This one
causes a warning because of a missing prototype:

arch/arm/mach-omap2/board-generic.c:44:6: error: no previous prototype for 'tick_broadcast'

Make sure to always include the header with the declaration.

Fixes: d86ad463d670 ("ARM: OMAP2+: Fix regression for using local timer on non-SMP SoCs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/board-generic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 853409b341a3..7aa41841edd4 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -13,6 +13,7 @@
 #include <linux/of_platform.h>
 #include <linux/irqdomain.h>
 #include <linux/clocksource.h>
+#include <linux/clockchips.h>
 
 #include <asm/setup.h>
 #include <asm/mach/arch.h>
-- 
2.39.2


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

* [PATCH 09/13] ARM: orion5x: fix d2net gpio initialization
  2023-05-16 15:30 [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings Arnd Bergmann
                   ` (7 preceding siblings ...)
  2023-05-16 15:31 ` [PATCH 08/13] ARM: omap2: fix missing tick_broadcast() prototype Arnd Bergmann
@ 2023-05-16 15:31 ` Arnd Bergmann
  2023-05-16 16:17   ` Andrew Lunn
  2023-05-16 15:31 ` [PATCH 10/13] ARM: pxa: fix missing-prototypes warnings Arnd Bergmann
                   ` (4 subsequent siblings)
  13 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2023-05-16 15:31 UTC (permalink / raw)
  To: soc
  Cc: Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, linux-omap, linux-clk, linux-usb,
	stable

From: Arnd Bergmann <arnd@arndb.de>

The DT version of this board has a custom file with the gpio
device. However, it does nothing because the d2net_init()
has no caller or prototype:

arch/arm/mach-orion5x/board-d2net.c:101:13: error: no previous prototype for 'd2net_init'

Call it from the board-dt file as intended.

Fixes: 94b0bd366e36 ("ARM: orion5x: convert d2net to Device Tree")
Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-orion5x/board-dt.c | 3 +++
 arch/arm/mach-orion5x/common.h   | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/arch/arm/mach-orion5x/board-dt.c b/arch/arm/mach-orion5x/board-dt.c
index e3736ffc8347..be47492c6640 100644
--- a/arch/arm/mach-orion5x/board-dt.c
+++ b/arch/arm/mach-orion5x/board-dt.c
@@ -60,6 +60,9 @@ static void __init orion5x_dt_init(void)
 	if (of_machine_is_compatible("maxtor,shared-storage-2"))
 		mss2_init();
 
+	if (of_machine_is_compatible("lacie,d2-network"))
+		d2net_init();
+
 	of_platform_default_populate(NULL, orion5x_auxdata_lookup, NULL);
 }
 
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h
index f2e0577bf50f..8df70e23aa82 100644
--- a/arch/arm/mach-orion5x/common.h
+++ b/arch/arm/mach-orion5x/common.h
@@ -73,6 +73,12 @@ extern void mss2_init(void);
 static inline void mss2_init(void) {}
 #endif
 
+#ifdef CONFIG_MACH_D2NET_DT
+void d2net_init(void);
+#else
+static inline void d2net_init(void) {}
+#endif
+
 /*****************************************************************************
  * Helpers to access Orion registers
  ****************************************************************************/
-- 
2.39.2


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

* [PATCH 10/13] ARM: pxa: fix missing-prototypes warnings
  2023-05-16 15:30 [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings Arnd Bergmann
                   ` (8 preceding siblings ...)
  2023-05-16 15:31 ` [PATCH 09/13] ARM: orion5x: fix d2net gpio initialization Arnd Bergmann
@ 2023-05-16 15:31 ` Arnd Bergmann
  2023-05-18 20:10   ` Stephen Boyd
  2023-05-28 11:46   ` Greg Kroah-Hartman
  2023-05-16 15:31 ` [PATCH 11/13] ARM: sa1100: address missing prototype warnings Arnd Bergmann
                   ` (3 subsequent siblings)
  13 siblings, 2 replies; 32+ messages in thread
From: Arnd Bergmann @ 2023-05-16 15:31 UTC (permalink / raw)
  To: soc
  Cc: Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, linux-omap, linux-clk, linux-usb

From: Arnd Bergmann <arnd@arndb.de>

The PXA platform has a number of configurations that end up with
a warning like these when building with W=1:

drivers/hwmon/max1111.c:83:5: error: no previous prototype for 'max1111_read_channel' [-Werror=missing-prototypes]
arch/arm/mach-pxa/reset.c:86:6: error: no previous prototype for 'pxa_restart' [-Werror=missing-prototypes]
arch/arm/mach-pxa/mfp-pxa2xx.c:254:5: error: no previous prototype for 'keypad_set_wake' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa25x.c:70:14: error: no previous prototype for 'pxa25x_get_clk_frequency_khz' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa25x.c:325:12: error: no previous prototype for 'pxa25x_clocks_init' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa27x.c:74:14: error: no previous prototype for 'pxa27x_get_clk_frequency_khz' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa27x.c:102:6: error: no previous prototype for 'pxa27x_is_ppll_disabled' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa27x.c:470:12: error: no previous prototype for 'pxa27x_clocks_init' [-Werror=missing-prototypes]
arch/arm/mach-pxa/pxa27x.c:44:6: error: no previous prototype for 'pxa27x_clear_otgph' [-Werror=missing-prototypes]
arch/arm/mach-pxa/pxa27x.c:58:6: error: no previous prototype for 'pxa27x_configure_ac97reset' [-Werror=missing-prototypes]
arch/arm/mach-pxa/spitz_pm.c:170:15: error: no previous prototype for 'spitzpm_read_devdata' [-Werror=missing-prototypes]

The problem is that there is a declaration for each of these, but
it's only seen by the caller and not the callee. Moving these
into appropriate header files ensures that both use the same
calling conventions and it avoids the warnings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-pxa/generic.h              | 15 ---------------
 arch/arm/mach-pxa/mfp-pxa2xx.c           |  1 +
 arch/arm/mach-pxa/pxa25x.c               |  1 +
 arch/arm/mach-pxa/pxa27x.c               |  3 +++
 arch/arm/mach-pxa/reset.c                |  1 +
 arch/arm/mach-pxa/spitz_pm.c             |  2 +-
 drivers/clk/pxa/clk-pxa25x.c             |  2 ++
 drivers/clk/pxa/clk-pxa27x.c             |  3 ++-
 drivers/hwmon/max1111.c                  |  1 +
 drivers/usb/gadget/udc/pxa27x_udc.c      |  6 ------
 drivers/usb/host/ohci-pxa27x.c           |  7 +------
 include/linux/platform_data/asoc-pxa.h   |  1 +
 include/linux/platform_data/pxa2xx_udc.h |  6 ++++++
 include/linux/soc/pxa/smemc.h            | 16 ++++++++++++++++
 sound/arm/pxa2xx-ac97-lib.c              |  2 --
 15 files changed, 36 insertions(+), 31 deletions(-)

diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h
index 7bb1499de4c5..c9c2c46ecead 100644
--- a/arch/arm/mach-pxa/generic.h
+++ b/arch/arm/mach-pxa/generic.h
@@ -27,7 +27,6 @@ extern void __init pxa25x_map_io(void);
 extern void __init pxa26x_init_irq(void);
 
 #define pxa27x_handle_irq ichp_handle_irq
-extern unsigned	pxa27x_get_clk_frequency_khz(int);
 extern void __init pxa27x_init_irq(void);
 extern void __init pxa27x_map_io(void);
 
@@ -52,18 +51,4 @@ extern void pxa2xx_clear_reset_status(unsigned int);
 static inline void pxa2xx_clear_reset_status(unsigned int mask) {}
 #endif
 
-/*
- * Once fully converted to the clock framework, all these functions should be
- * removed, and replaced with a clk_get(NULL, "core").
- */
-#ifdef CONFIG_PXA25x
-extern unsigned pxa25x_get_clk_frequency_khz(int);
-#else
-#define pxa25x_get_clk_frequency_khz(x)		(0)
-#endif
-
-#ifdef CONFIG_PXA27x
-#else
-#define pxa27x_get_clk_frequency_khz(x)		(0)
-#endif
 
diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c
index b556452dfcf9..f5a3d890f682 100644
--- a/arch/arm/mach-pxa/mfp-pxa2xx.c
+++ b/arch/arm/mach-pxa/mfp-pxa2xx.c
@@ -20,6 +20,7 @@
 
 #include "pxa2xx-regs.h"
 #include "mfp-pxa2xx.h"
+#include "mfp-pxa27x.h"
 
 #include "generic.h"
 
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index 802babff6c91..d6c6aaeb02ad 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -27,6 +27,7 @@
 #include <linux/irqchip.h>
 #include <linux/platform_data/mmp_dma.h>
 #include <linux/soc/pxa/cpu.h>
+#include <linux/soc/pxa/smemc.h>
 
 #include <asm/mach/map.h>
 #include <asm/suspend.h>
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index bc47552b763c..7e7aaeff95b2 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -24,6 +24,7 @@
 #include <linux/platform_data/i2c-pxa.h>
 #include <linux/platform_data/mmp_dma.h>
 #include <linux/soc/pxa/cpu.h>
+#include <linux/soc/pxa/smemc.h>
 
 #include <asm/mach/map.h>
 #include <asm/irq.h>
@@ -31,7 +32,9 @@
 #include "irqs.h"
 #include "pxa27x.h"
 #include "reset.h"
+#include <linux/platform_data/pxa2xx_udc.h>
 #include <linux/platform_data/usb-ohci-pxa27x.h>
+#include <linux/platform_data/asoc-pxa.h>
 #include "pm.h"
 #include "addr-map.h"
 #include "smemc.h"
diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c
index f0be90573ad3..27293549f8ad 100644
--- a/arch/arm/mach-pxa/reset.c
+++ b/arch/arm/mach-pxa/reset.c
@@ -10,6 +10,7 @@
 #include "regs-ost.h"
 #include "reset.h"
 #include "smemc.h"
+#include "generic.h"
 
 static void do_hw_reset(void);
 
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c
index 4001fa589a2b..9571f2b5b118 100644
--- a/arch/arm/mach-pxa/spitz_pm.c
+++ b/arch/arm/mach-pxa/spitz_pm.c
@@ -167,7 +167,7 @@ static bool spitz_charger_wakeup(void)
 		gpio_get_value(SPITZ_GPIO_SYNC);
 }
 
-unsigned long spitzpm_read_devdata(int type)
+static unsigned long spitzpm_read_devdata(int type)
 {
 	switch (type) {
 	case SHARPSL_STATUS_ACIN:
diff --git a/drivers/clk/pxa/clk-pxa25x.c b/drivers/clk/pxa/clk-pxa25x.c
index 93d5907b8530..0a4da519d704 100644
--- a/drivers/clk/pxa/clk-pxa25x.c
+++ b/drivers/clk/pxa/clk-pxa25x.c
@@ -11,10 +11,12 @@
  */
 #include <linux/clk-provider.h>
 #include <linux/clk.h>
+#include <linux/clk/pxa.h>
 #include <linux/clkdev.h>
 #include <linux/io.h>
 #include <linux/of.h>
 #include <linux/soc/pxa/smemc.h>
+#include <linux/soc/pxa/cpu.h>
 
 #include <dt-bindings/clock/pxa-clock.h>
 #include "clk-pxa.h"
diff --git a/drivers/clk/pxa/clk-pxa27x.c b/drivers/clk/pxa/clk-pxa27x.c
index 116c6ac666e3..2bea89874ec1 100644
--- a/drivers/clk/pxa/clk-pxa27x.c
+++ b/drivers/clk/pxa/clk-pxa27x.c
@@ -12,6 +12,7 @@
 #include <linux/clkdev.h>
 #include <linux/of.h>
 #include <linux/soc/pxa/smemc.h>
+#include <linux/clk/pxa.h>
 
 #include <dt-bindings/clock/pxa-clock.h>
 #include "clk-pxa.h"
@@ -99,7 +100,7 @@ unsigned int pxa27x_get_clk_frequency_khz(int info)
 	return (unsigned int)clks[0] / KHz;
 }
 
-bool pxa27x_is_ppll_disabled(void)
+static bool pxa27x_is_ppll_disabled(void)
 {
 	unsigned long ccsr = readl(clk_regs + CCSR);
 
diff --git a/drivers/hwmon/max1111.c b/drivers/hwmon/max1111.c
index 4c5487aeb3cf..5cc08c720b52 100644
--- a/drivers/hwmon/max1111.c
+++ b/drivers/hwmon/max1111.c
@@ -80,6 +80,7 @@ static int max1111_read(struct device *dev, int channel)
 #ifdef CONFIG_SHARPSL_PM
 static struct max1111_data *the_max1111;
 
+int max1111_read_channel(int channel);
 int max1111_read_channel(int channel)
 {
 	if (!the_max1111 || !the_max1111->spi)
diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
index 160c7bd1024e..af1707a8829b 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -2472,12 +2472,6 @@ static void pxa_udc_shutdown(struct platform_device *_dev)
 		udc_disable(udc);
 }
 
-#ifdef CONFIG_PXA27x
-extern void pxa27x_clear_otgph(void);
-#else
-#define pxa27x_clear_otgph()   do {} while (0)
-#endif
-
 #ifdef CONFIG_PM
 /**
  * pxa_udc_suspend - Suspend udc device
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
index 0bc7e96bcc93..dcac2938789a 100644
--- a/drivers/usb/host/ohci-pxa27x.c
+++ b/drivers/usb/host/ohci-pxa27x.c
@@ -29,6 +29,7 @@
 #include <linux/of_platform.h>
 #include <linux/of_gpio.h>
 #include <linux/platform_data/usb-ohci-pxa27x.h>
+#include <linux/platform_data/pxa2xx_udc.h>
 #include <linux/platform_device.h>
 #include <linux/regulator/consumer.h>
 #include <linux/signal.h>
@@ -263,12 +264,6 @@ static inline void pxa27x_reset_hc(struct pxa27x_ohci *pxa_ohci)
 	__raw_writel(uhchr & ~UHCHR_FHR, pxa_ohci->mmio_base + UHCHR);
 }
 
-#ifdef CONFIG_PXA27x
-extern void pxa27x_clear_otgph(void);
-#else
-#define pxa27x_clear_otgph()	do {} while (0)
-#endif
-
 static int pxa27x_start_hc(struct pxa27x_ohci *pxa_ohci, struct device *dev)
 {
 	int retval;
diff --git a/include/linux/platform_data/asoc-pxa.h b/include/linux/platform_data/asoc-pxa.h
index 327454cd8246..7b5b9e20fbf5 100644
--- a/include/linux/platform_data/asoc-pxa.h
+++ b/include/linux/platform_data/asoc-pxa.h
@@ -27,5 +27,6 @@ typedef struct {
 } pxa2xx_audio_ops_t;
 
 extern void pxa_set_ac97_info(pxa2xx_audio_ops_t *ops);
+extern void pxa27x_configure_ac97reset(int reset_gpio, bool to_gpio);
 
 #endif
diff --git a/include/linux/platform_data/pxa2xx_udc.h b/include/linux/platform_data/pxa2xx_udc.h
index 102d47c53d6d..996a73e8fb80 100644
--- a/include/linux/platform_data/pxa2xx_udc.h
+++ b/include/linux/platform_data/pxa2xx_udc.h
@@ -25,4 +25,10 @@ struct pxa2xx_udc_platform_data {
 	int	gpio_pullup;			/* high == pullup activated */
 };
 
+#ifdef CONFIG_PXA27x
+extern void pxa27x_clear_otgph(void);
+#else
+#define pxa27x_clear_otgph()	do {} while (0)
+#endif
+
 #endif
diff --git a/include/linux/soc/pxa/smemc.h b/include/linux/soc/pxa/smemc.h
index f1ffea236c15..4feb1dded3ec 100644
--- a/include/linux/soc/pxa/smemc.h
+++ b/include/linux/soc/pxa/smemc.h
@@ -10,4 +10,20 @@ int pxa2xx_smemc_get_sdram_rows(void);
 unsigned int pxa3xx_smemc_get_memclkdiv(void);
 void __iomem *pxa_smemc_get_mdrefr(void);
 
+/*
+ * Once fully converted to the clock framework, all these functions should be
+ * removed, and replaced with a clk_get(NULL, "core").
+ */
+#ifdef CONFIG_PXA25x
+extern unsigned pxa25x_get_clk_frequency_khz(int);
+#else
+#define pxa25x_get_clk_frequency_khz(x)		(0)
+#endif
+
+#ifdef CONFIG_PXA27x
+extern unsigned pxa27x_get_clk_frequency_khz(int);
+#else
+#define pxa27x_get_clk_frequency_khz(x)		(0)
+#endif
+
 #endif
diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c
index 2ca33fd5a575..a03a3291de84 100644
--- a/sound/arm/pxa2xx-ac97-lib.c
+++ b/sound/arm/pxa2xx-ac97-lib.c
@@ -33,8 +33,6 @@ static struct clk *ac97conf_clk;
 static int reset_gpio;
 static void __iomem *ac97_reg_base;
 
-extern void pxa27x_configure_ac97reset(int reset_gpio, bool to_gpio);
-
 /*
  * Beware PXA27x bugs:
  *
-- 
2.39.2


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

* [PATCH 11/13] ARM: sa1100: address missing prototype warnings
  2023-05-16 15:30 [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings Arnd Bergmann
                   ` (9 preceding siblings ...)
  2023-05-16 15:31 ` [PATCH 10/13] ARM: pxa: fix missing-prototypes warnings Arnd Bergmann
@ 2023-05-16 15:31 ` Arnd Bergmann
  2023-05-16 15:31 ` [PATCH 12/13] ARM: spear: include "pl080.h" for pl080_get_signal() prototype Arnd Bergmann
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 32+ messages in thread
From: Arnd Bergmann @ 2023-05-16 15:31 UTC (permalink / raw)
  To: soc
  Cc: Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, linux-omap, linux-clk, linux-usb

From: Arnd Bergmann <arnd@arndb.de>

There are three warnings for mach-sa1100 when building with W=1:

arch/arm/common/sa1111.c:699:1: error: no previous prototype for 'sa1111_configure_smc' [-Werror=missing-prototypes]
  699 | sa1111_configure_smc(struct sa1111 *sachip, int sdram, unsigned int drac,
      | ^~~~~~~~~~~~~~~~~~~~
arch/arm/mach-sa1100/assabet.c:718:13: error: no previous prototype for 'assabet_init_irq' [-Werror=missing-prototypes]
  718 | void __init assabet_init_irq(void)
      |             ^~~~~~~~~~~~~~~~
arch/arm/mach-sa1100/pm.c:126:12: error: no previous prototype for 'sa11x0_pm_init' [-Werror=missing-prototypes]
  126 | int __init sa11x0_pm_init(void)
      |            ^~~~~~~~~~~~~~

The first two are only used locally and can be 'static', while
the last one needs to include the right header.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/common/sa1111.c       | 2 +-
 arch/arm/mach-sa1100/assabet.c | 2 +-
 arch/arm/mach-sa1100/pm.c      | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index aad6ba236f0f..77c83ba81715 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -695,7 +695,7 @@ static u32 sa1111_dma_mask[] = {
 /*
  * Configure the SA1111 shared memory controller.
  */
-void
+static void
 sa1111_configure_smc(struct sa1111 *sachip, int sdram, unsigned int drac,
 		     unsigned int cas_latency)
 {
diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c
index 0c32b08a3a9c..08dcdd8ceb6d 100644
--- a/arch/arm/mach-sa1100/assabet.c
+++ b/arch/arm/mach-sa1100/assabet.c
@@ -715,7 +715,7 @@ static void __init assabet_map_io(void)
 	sa1100_register_uart(2, 3);
 }
 
-void __init assabet_init_irq(void)
+static void __init assabet_init_irq(void)
 {
 	u32 def_val;
 
diff --git a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c
index cd900a7b5248..c94ebe1c9091 100644
--- a/arch/arm/mach-sa1100/pm.c
+++ b/arch/arm/mach-sa1100/pm.c
@@ -37,6 +37,8 @@
 #include <asm/suspend.h>
 #include <asm/mach/time.h>
 
+#include "generic.h"
+
 extern int sa1100_finish_suspend(unsigned long);
 
 #define SAVE(x)		sleep_save[SLEEP_SAVE_##x] = x
-- 
2.39.2


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

* [PATCH 12/13] ARM: spear: include "pl080.h" for pl080_get_signal() prototype
  2023-05-16 15:30 [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings Arnd Bergmann
                   ` (10 preceding siblings ...)
  2023-05-16 15:31 ` [PATCH 11/13] ARM: sa1100: address missing prototype warnings Arnd Bergmann
@ 2023-05-16 15:31 ` Arnd Bergmann
  2023-05-17  4:34   ` Viresh Kumar
  2023-05-16 15:31 ` [PATCH 13/13] ARM: versatile: mark mmc_status() static Arnd Bergmann
  2023-05-26 11:50 ` [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings patchwork-bot+linux-soc
  13 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2023-05-16 15:31 UTC (permalink / raw)
  To: soc
  Cc: Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, linux-omap, linux-clk, linux-usb

From: Arnd Bergmann <arnd@arndb.de>

pl080_get_signal() and pl080_put_signal() are declared in pl080.h
and defined in pl080.c, but this file is missing an include
of the header:

arch/arm/mach-spear/pl080.c:27:5: error: no previous prototype for 'pl080_get_signal'
arch/arm/mach-spear/pl080.c:62:6: error: no previous prototype for 'pl080_put_signal'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-spear/pl080.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-spear/pl080.c b/arch/arm/mach-spear/pl080.c
index d6b8627d2544..47243a8153d0 100644
--- a/arch/arm/mach-spear/pl080.c
+++ b/arch/arm/mach-spear/pl080.c
@@ -16,6 +16,7 @@
 #include <linux/spinlock_types.h>
 #include "spear.h"
 #include "misc_regs.h"
+#include "pl080.h"
 
 static spinlock_t lock = __SPIN_LOCK_UNLOCKED(x);
 
-- 
2.39.2


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

* [PATCH 13/13] ARM: versatile: mark mmc_status() static
  2023-05-16 15:30 [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings Arnd Bergmann
                   ` (11 preceding siblings ...)
  2023-05-16 15:31 ` [PATCH 12/13] ARM: spear: include "pl080.h" for pl080_get_signal() prototype Arnd Bergmann
@ 2023-05-16 15:31 ` Arnd Bergmann
  2023-05-26 11:50 ` [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings patchwork-bot+linux-soc
  13 siblings, 0 replies; 32+ messages in thread
From: Arnd Bergmann @ 2023-05-16 15:31 UTC (permalink / raw)
  To: soc
  Cc: Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, linux-omap, linux-clk, linux-usb

From: Arnd Bergmann <arnd@arndb.de>

mmc_status() is only used in the file it is defined in, and
no longer has an 'extern' declaration:

arch/arm/mach-versatile/versatile.c:56:14: error: no previous prototype for 'mmc_status'

Fixes: 16956fed35fe ("ARM: versatile: switch to DT only booting and remove legacy code")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-versatile/versatile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-versatile/versatile.c b/arch/arm/mach-versatile/versatile.c
index 02ba68abe533..7ef03d0c224d 100644
--- a/arch/arm/mach-versatile/versatile.c
+++ b/arch/arm/mach-versatile/versatile.c
@@ -53,7 +53,7 @@
 
 static void __iomem *versatile_sys_base;
 
-unsigned int mmc_status(struct device *dev)
+static unsigned int mmc_status(struct device *dev)
 {
 	struct amba_device *adev = container_of(dev, struct amba_device, dev);
 	u32 mask;
-- 
2.39.2


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

* Re: [PATCH 01/13] ARM: davinci: fix davinci_cpufreq_init() declaration
  2023-05-16 15:30 ` [PATCH 01/13] ARM: davinci: fix davinci_cpufreq_init() declaration Arnd Bergmann
@ 2023-05-16 15:41   ` Bartosz Golaszewski
  0 siblings, 0 replies; 32+ messages in thread
From: Bartosz Golaszewski @ 2023-05-16 15:41 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: soc, Arnd Bergmann, Russell King, Hartley Sweeten,
	Alexander Sverdlin, Andre Przywara, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Vladimir Zapolskiy, Aaro Koskinen, Janusz Krzysztofik,
	Tony Lindgren, Andrew Lunn, Sebastian Hesselbarth,
	Gregory Clement, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Viresh Kumar, Shiraz Hashim, Sudeep Holla, Lorenzo Pieralisi,
	Linus Walleij, Michael Turquette, Stephen Boyd,
	Greg Kroah-Hartman, Alan Stern, linux-arm-kernel, linux-kernel,
	linux-omap, linux-clk, linux-usb

On Tue, May 16, 2023 at 5:31 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> The davinci_cpufreq_init() declaration is only seen by its caller
> but not the definition:
>
> drivers/cpufreq/davinci-cpufreq.c:153:12: error: no previous prototype for 'davinci_cpufreq_init'
>
> Move it into the platform_data header that is already used an
> interface between the two places.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-davinci/common.c                | 1 +
>  arch/arm/mach-davinci/common.h                | 6 ------
>  include/linux/platform_data/davinci-cpufreq.h | 6 ++++++
>  3 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/common.c b/arch/arm/mach-davinci/common.c
> index c1ce6b2a8d48..7bc7018688de 100644
> --- a/arch/arm/mach-davinci/common.c
> +++ b/arch/arm/mach-davinci/common.c
> @@ -11,6 +11,7 @@
>  #include <linux/etherdevice.h>
>  #include <linux/davinci_emac.h>
>  #include <linux/dma-mapping.h>
> +#include <linux/platform_data/davinci-cpufreq.h>
>
>  #include <asm/tlb.h>
>  #include <asm/mach/map.h>
> diff --git a/arch/arm/mach-davinci/common.h b/arch/arm/mach-davinci/common.h
> index b2a96cdf88da..010ba1df27b3 100644
> --- a/arch/arm/mach-davinci/common.h
> +++ b/arch/arm/mach-davinci/common.h
> @@ -55,12 +55,6 @@ extern void davinci_common_init(const struct davinci_soc_info *soc_info);
>  extern void davinci_init_ide(void);
>  void davinci_init_late(void);
>
> -#ifdef CONFIG_CPU_FREQ
> -int davinci_cpufreq_init(void);
> -#else
> -static inline int davinci_cpufreq_init(void) { return 0; }
> -#endif
> -
>  #ifdef CONFIG_SUSPEND
>  int davinci_pm_init(void);
>  #else
> diff --git a/include/linux/platform_data/davinci-cpufreq.h b/include/linux/platform_data/davinci-cpufreq.h
> index bc208c64e3d7..1ef91c36f609 100644
> --- a/include/linux/platform_data/davinci-cpufreq.h
> +++ b/include/linux/platform_data/davinci-cpufreq.h
> @@ -16,4 +16,10 @@ struct davinci_cpufreq_config {
>         int (*init)(void);
>  };
>
> +#ifdef CONFIG_CPU_FREQ
> +int davinci_cpufreq_init(void);
> +#else
> +static inline int davinci_cpufreq_init(void) { return 0; }
> +#endif
> +
>  #endif /* _MACH_DAVINCI_CPUFREQ_H */
> --
> 2.39.2
>

Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

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

* Re: [PATCH 02/13] ARM: ep93xx: fix missing-prototype warnings
  2023-05-16 15:30 ` [PATCH 02/13] ARM: ep93xx: fix missing-prototype warnings Arnd Bergmann
@ 2023-05-16 15:51   ` Alexander Sverdlin
  0 siblings, 0 replies; 32+ messages in thread
From: Alexander Sverdlin @ 2023-05-16 15:51 UTC (permalink / raw)
  To: Arnd Bergmann, soc
  Cc: Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Andre Przywara, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Vladimir Zapolskiy, Aaro Koskinen, Janusz Krzysztofik,
	Tony Lindgren, Andrew Lunn, Sebastian Hesselbarth,
	Gregory Clement, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Viresh Kumar, Shiraz Hashim, Sudeep Holla, Lorenzo Pieralisi,
	Linus Walleij, Michael Turquette, Stephen Boyd,
	Greg Kroah-Hartman, Alan Stern, linux-arm-kernel, linux-kernel,
	linux-omap, linux-clk, linux-usb

Hi Arnd!

On Tue, 2023-05-16 at 17:30 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> ep93xx_clocksource_read() is only called from the file it is declared in,
> while ep93xx_timer_init() is declared in a header that is not included here.
> 
> arch/arm/mach-ep93xx/timer-ep93xx.c:120:13: error: no previous prototype for 'ep93xx_timer_init'
> arch/arm/mach-ep93xx/timer-ep93xx.c:63:5: error: no previous prototype for 'ep93xx_clocksource_read'
> 
> Fixes: 000bc17817bf ("ARM: ep93xx: switch to GENERIC_CLOCKEVENTS")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  arch/arm/mach-ep93xx/timer-ep93xx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-ep93xx/timer-ep93xx.c b/arch/arm/mach-ep93xx/timer-ep93xx.c
> index dd4b164d1831..a9efa7bc2fa1 100644
> --- a/arch/arm/mach-ep93xx/timer-ep93xx.c
> +++ b/arch/arm/mach-ep93xx/timer-ep93xx.c
> @@ -9,6 +9,7 @@
>  #include <linux/io.h>
>  #include <asm/mach/time.h>
>  #include "soc.h"
> +#include "platform.h"
>  
>  /*************************************************************************
>   * Timer handling for EP93xx
> @@ -60,7 +61,7 @@ static u64 notrace ep93xx_read_sched_clock(void)
>         return ret;
>  }
>  
> -u64 ep93xx_clocksource_read(struct clocksource *c)
> +static u64 ep93xx_clocksource_read(struct clocksource *c)
>  {
>         u64 ret;

-- 
Alexander Sverdlin.


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

* Re: [PATCH 03/13] ARM: highbank: add missing include
  2023-05-16 15:30 ` [PATCH 03/13] ARM: highbank: add missing include Arnd Bergmann
@ 2023-05-16 15:58   ` Andre Przywara
  0 siblings, 0 replies; 32+ messages in thread
From: Andre Przywara @ 2023-05-16 15:58 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: soc, Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Vladimir Zapolskiy, Aaro Koskinen, Janusz Krzysztofik,
	Tony Lindgren, Andrew Lunn, Sebastian Hesselbarth,
	Gregory Clement, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Viresh Kumar, Shiraz Hashim, Sudeep Holla, Lorenzo Pieralisi,
	Linus Walleij, Michael Turquette, Stephen Boyd,
	Greg Kroah-Hartman, Alan Stern, linux-arm-kernel, linux-kernel,
	linux-omap, linux-clk, linux-usb

On Tue, 16 May 2023 17:30:59 +0200
Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.de>
> 
> highbank_pm_init() is declared in core.h this is not included in the
> file that defines it.
> 
> arch/arm/mach-highbank/pm.c:43:13: error: no previous prototype for 'highbank_pm_init'
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre

> ---
>  arch/arm/mach-highbank/pm.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/mach-highbank/pm.c b/arch/arm/mach-highbank/pm.c
> index 561941baeda9..3fdbdb83113b 100644
> --- a/arch/arm/mach-highbank/pm.c
> +++ b/arch/arm/mach-highbank/pm.c
> @@ -12,6 +12,8 @@
>  
>  #include <uapi/linux/psci.h>
>  
> +#include "core.h"
> +
>  #define HIGHBANK_SUSPEND_PARAM \
>  	((0 << PSCI_0_2_POWER_STATE_ID_SHIFT) | \
>  	 (1 << PSCI_0_2_POWER_STATE_AFFL_SHIFT) | \


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

* Re: [PATCH 09/13] ARM: orion5x: fix d2net gpio initialization
  2023-05-16 15:31 ` [PATCH 09/13] ARM: orion5x: fix d2net gpio initialization Arnd Bergmann
@ 2023-05-16 16:17   ` Andrew Lunn
  0 siblings, 0 replies; 32+ messages in thread
From: Andrew Lunn @ 2023-05-16 16:17 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: soc, Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Sebastian Hesselbarth,
	Gregory Clement, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Viresh Kumar, Shiraz Hashim, Sudeep Holla, Lorenzo Pieralisi,
	Linus Walleij, Michael Turquette, Stephen Boyd,
	Greg Kroah-Hartman, Alan Stern, linux-arm-kernel, linux-kernel,
	linux-omap, linux-clk, linux-usb, stable

On Tue, May 16, 2023 at 05:31:05PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The DT version of this board has a custom file with the gpio
> device. However, it does nothing because the d2net_init()
> has no caller or prototype:
> 
> arch/arm/mach-orion5x/board-d2net.c:101:13: error: no previous prototype for 'd2net_init'
> 
> Call it from the board-dt file as intended.
> 
> Fixes: 94b0bd366e36 ("ARM: orion5x: convert d2net to Device Tree")
> Cc: stable@vger.kernel.org
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH 07/13] ARM: omap1: add missing include
  2023-05-16 15:31 ` [PATCH 07/13] ARM: omap1: " Arnd Bergmann
@ 2023-05-16 23:18   ` Aaro Koskinen
  2023-05-17  5:58     ` Tony Lindgren
  2023-05-17  5:58     ` Tony Lindgren
  0 siblings, 2 replies; 32+ messages in thread
From: Aaro Koskinen @ 2023-05-16 23:18 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: soc, Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Janusz Krzysztofik,
	Tony Lindgren, Andrew Lunn, Sebastian Hesselbarth,
	Gregory Clement, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Viresh Kumar, Shiraz Hashim, Sudeep Holla, Lorenzo Pieralisi,
	Linus Walleij, Michael Turquette, Stephen Boyd,
	Greg Kroah-Hartman, Alan Stern, linux-arm-kernel, linux-kernel,
	linux-omap, linux-clk, linux-usb

On Tue, May 16, 2023 at 05:31:03PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The omap_serial_wakeup_init() declaration is not visible where it is
> defined, so make sure "common.h" is included here, avoiding:
> 
> arch/arm/mach-omap1/serial.c:221:12: error: no previous prototype for 'omap_serial_wakeup_init' [-Werror=missing-prototypes]
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>

A.

> ---
>  arch/arm/mach-omap1/serial.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c
> index 96f59110d649..f25b94c86aec 100644
> --- a/arch/arm/mach-omap1/serial.c
> +++ b/arch/arm/mach-omap1/serial.c
> @@ -19,6 +19,7 @@
>  
>  #include <asm/mach-types.h>
>  
> +#include "common.h"
>  #include "serial.h"
>  #include "mux.h"
>  #include "pm.h"
> -- 
> 2.39.2
> 

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

* Re: [PATCH 08/13] ARM: omap2: fix missing tick_broadcast() prototype
  2023-05-16 15:31 ` [PATCH 08/13] ARM: omap2: fix missing tick_broadcast() prototype Arnd Bergmann
@ 2023-05-16 23:20   ` Aaro Koskinen
  0 siblings, 0 replies; 32+ messages in thread
From: Aaro Koskinen @ 2023-05-16 23:20 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: soc, Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Janusz Krzysztofik,
	Tony Lindgren, Andrew Lunn, Sebastian Hesselbarth,
	Gregory Clement, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Viresh Kumar, Shiraz Hashim, Sudeep Holla, Lorenzo Pieralisi,
	Linus Walleij, Michael Turquette, Stephen Boyd,
	Greg Kroah-Hartman, Alan Stern, linux-arm-kernel, linux-kernel,
	linux-omap, linux-clk, linux-usb

On Tue, May 16, 2023 at 05:31:04PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> omap2 contains a hack to define tick_broadcast() on non-SMP
> configurations in place of the normal SMP definition. This one
> causes a warning because of a missing prototype:
> 
> arch/arm/mach-omap2/board-generic.c:44:6: error: no previous prototype for 'tick_broadcast'
> 
> Make sure to always include the header with the declaration.
> 
> Fixes: d86ad463d670 ("ARM: OMAP2+: Fix regression for using local timer on non-SMP SoCs")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>

> ---
>  arch/arm/mach-omap2/board-generic.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
> index 853409b341a3..7aa41841edd4 100644
> --- a/arch/arm/mach-omap2/board-generic.c
> +++ b/arch/arm/mach-omap2/board-generic.c
> @@ -13,6 +13,7 @@
>  #include <linux/of_platform.h>
>  #include <linux/irqdomain.h>
>  #include <linux/clocksource.h>
> +#include <linux/clockchips.h>
>  
>  #include <asm/setup.h>
>  #include <asm/mach/arch.h>
> -- 
> 2.39.2
> 

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

* Re: [PATCH 05/13] ARM: imx: remove unused mx25_revision()
  2023-05-16 15:31 ` [PATCH 05/13] ARM: imx: remove unused mx25_revision() Arnd Bergmann
@ 2023-05-16 23:34   ` Fabio Estevam
  2023-05-17  6:39     ` Arnd Bergmann
  0 siblings, 1 reply; 32+ messages in thread
From: Fabio Estevam @ 2023-05-16 23:34 UTC (permalink / raw)
  To: Arnd Bergmann, Martin Kaiser
  Cc: soc, Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, NXP Linux Team,
	Vladimir Zapolskiy, Aaro Koskinen, Janusz Krzysztofik,
	Tony Lindgren, Andrew Lunn, Sebastian Hesselbarth,
	Gregory Clement, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Viresh Kumar, Shiraz Hashim, Sudeep Holla, Lorenzo Pieralisi,
	Linus Walleij, Michael Turquette, Stephen Boyd,
	Greg Kroah-Hartman, Alan Stern, linux-arm-kernel, linux-kernel,
	linux-omap, linux-clk, linux-usb

Hi Arnd,

On Tue, May 16, 2023 at 12:32 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> This function has no prototype and no callers:
>
> arm/mach-imx/cpu-imx25.c:43:5: error: no previous prototype for 'mx25_revision' [-Werror=missing-prototypes]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Martin Kaiser sent a patch adding a user for this function:

https://lore.kernel.org/linux-arm-kernel/20220815190748.102664-2-martin@kaiser.cx/

It would be better to apply Martin's patch instead of removing mx25_revision().

Thanks

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

* Re: [PATCH 12/13] ARM: spear: include "pl080.h" for pl080_get_signal() prototype
  2023-05-16 15:31 ` [PATCH 12/13] ARM: spear: include "pl080.h" for pl080_get_signal() prototype Arnd Bergmann
@ 2023-05-17  4:34   ` Viresh Kumar
  0 siblings, 0 replies; 32+ messages in thread
From: Viresh Kumar @ 2023-05-17  4:34 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: soc, Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, linux-omap, linux-clk, linux-usb

On 16-05-23, 17:31, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> pl080_get_signal() and pl080_put_signal() are declared in pl080.h
> and defined in pl080.c, but this file is missing an include
> of the header:
> 
> arch/arm/mach-spear/pl080.c:27:5: error: no previous prototype for 'pl080_get_signal'
> arch/arm/mach-spear/pl080.c:62:6: error: no previous prototype for 'pl080_put_signal'
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-spear/pl080.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/mach-spear/pl080.c b/arch/arm/mach-spear/pl080.c
> index d6b8627d2544..47243a8153d0 100644
> --- a/arch/arm/mach-spear/pl080.c
> +++ b/arch/arm/mach-spear/pl080.c
> @@ -16,6 +16,7 @@
>  #include <linux/spinlock_types.h>
>  #include "spear.h"
>  #include "misc_regs.h"
> +#include "pl080.h"
>  
>  static spinlock_t lock = __SPIN_LOCK_UNLOCKED(x);

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

-- 
viresh

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

* Re: [PATCH 07/13] ARM: omap1: add missing include
  2023-05-16 23:18   ` Aaro Koskinen
@ 2023-05-17  5:58     ` Tony Lindgren
  2023-05-17  5:58     ` Tony Lindgren
  1 sibling, 0 replies; 32+ messages in thread
From: Tony Lindgren @ 2023-05-17  5:58 UTC (permalink / raw)
  To: Aaro Koskinen
  Cc: Arnd Bergmann, soc, Arnd Bergmann, Russell King,
	Bartosz Golaszewski, Hartley Sweeten, Alexander Sverdlin,
	Andre Przywara, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy,
	Janusz Krzysztofik, Andrew Lunn, Sebastian Hesselbarth,
	Gregory Clement, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Viresh Kumar, Shiraz Hashim, Sudeep Holla, Lorenzo Pieralisi,
	Linus Walleij, Michael Turquette, Stephen Boyd,
	Greg Kroah-Hartman, Alan Stern, linux-arm-kernel, linux-kernel,
	linux-omap, linux-clk, linux-usb

* Aaro Koskinen <aaro.koskinen@iki.fi> [230516 23:18]:
> On Tue, May 16, 2023 at 05:31:03PM +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> > 
> > The omap_serial_wakeup_init() declaration is not visible where it is
> > defined, so make sure "common.h" is included here, avoiding:
> > 
> > arch/arm/mach-omap1/serial.c:221:12: error: no previous prototype for 'omap_serial_wakeup_init' [-Werror=missing-prototypes]
> > 
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>

Acked-by: Tony Lindgren <tony@atomide.com>

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

* Re: [PATCH 07/13] ARM: omap1: add missing include
  2023-05-16 23:18   ` Aaro Koskinen
  2023-05-17  5:58     ` Tony Lindgren
@ 2023-05-17  5:58     ` Tony Lindgren
  1 sibling, 0 replies; 32+ messages in thread
From: Tony Lindgren @ 2023-05-17  5:58 UTC (permalink / raw)
  To: Aaro Koskinen
  Cc: Arnd Bergmann, soc, Arnd Bergmann, Russell King,
	Bartosz Golaszewski, Hartley Sweeten, Alexander Sverdlin,
	Andre Przywara, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy,
	Janusz Krzysztofik, Andrew Lunn, Sebastian Hesselbarth,
	Gregory Clement, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Viresh Kumar, Shiraz Hashim, Sudeep Holla, Lorenzo Pieralisi,
	Linus Walleij, Michael Turquette, Stephen Boyd,
	Greg Kroah-Hartman, Alan Stern, linux-arm-kernel, linux-kernel,
	linux-omap, linux-clk, linux-usb

* Aaro Koskinen <aaro.koskinen@iki.fi> [230516 23:18]:
> On Tue, May 16, 2023 at 05:31:03PM +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> > 
> > The omap_serial_wakeup_init() declaration is not visible where it is
> > defined, so make sure "common.h" is included here, avoiding:
> > 
> > arch/arm/mach-omap1/serial.c:221:12: error: no previous prototype for 'omap_serial_wakeup_init' [-Werror=missing-prototypes]
> > 
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>

Acked-by: Tony Lindgren <tony@atomide.com>

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

* Re: [PATCH 05/13] ARM: imx: remove unused mx25_revision()
  2023-05-16 23:34   ` Fabio Estevam
@ 2023-05-17  6:39     ` Arnd Bergmann
  2023-05-17 15:45       ` Martin Kaiser
  0 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2023-05-17  6:39 UTC (permalink / raw)
  To: Fabio Estevam, Arnd Bergmann, Martin Kaiser
  Cc: soc, Russell King, Bartosz Golaszewski, Hartley Sweeten,
	Alexander Sverdlin, Andre Przywara, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, NXP Linux Team, Vladimir Zapolskiy,
	Aaro Koskinen, Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, Linux-OMAP, linux-clk, linux-usb

On Wed, May 17, 2023, at 01:34, Fabio Estevam wrote:
> On Tue, May 16, 2023 at 12:32 PM Arnd Bergmann <arnd@kernel.org> wrote:
>>
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> This function has no prototype and no callers:
>>
>> arm/mach-imx/cpu-imx25.c:43:5: error: no previous prototype for 'mx25_revision' [-Werror=missing-prototypes]
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Martin Kaiser sent a patch adding a user for this function:
>
> https://lore.kernel.org/linux-arm-kernel/20220815190748.102664-2-martin@kaiser.cx/
>
> It would be better to apply Martin's patch instead of removing mx25_revision().

I think either way is ok to address the warning. If we wanted to do this
properly, the mx{25,27,31,35,5}_revision functions could all be removed
and the logic hooked up to imx_set_soc_revision() in the same way that
they already use mxc_set_cpu_type() for drivers/soc/imx/soc-imx.c.

I'll leave it up to you, if you want to merge Martin's patches or
a replacement for the soc-imx driver through the imx tree for 6.5,
I'll drop my patch from this series, otherwise I'll keep it for now
and we can still do it better at later point.

    Arnd

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

* Re: [PATCH 05/13] ARM: imx: remove unused mx25_revision()
  2023-05-17  6:39     ` Arnd Bergmann
@ 2023-05-17 15:45       ` Martin Kaiser
  2023-07-28 15:59         ` Arnd Bergmann
  0 siblings, 1 reply; 32+ messages in thread
From: Martin Kaiser @ 2023-05-17 15:45 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Fabio Estevam, Arnd Bergmann, soc, Russell King,
	Bartosz Golaszewski, Hartley Sweeten, Alexander Sverdlin,
	Andre Przywara, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, Linux-OMAP, linux-clk, linux-usb

Thus wrote Arnd Bergmann (arnd@arndb.de):

> I think either way is ok to address the warning. If we wanted to do this
> properly, the mx{25,27,31,35,5}_revision functions could all be removed
> and the logic hooked up to imx_set_soc_revision() in the same way that
> they already use mxc_set_cpu_type() for drivers/soc/imx/soc-imx.c.

> I'll leave it up to you, if you want to merge Martin's patches or
> a replacement for the soc-imx driver through the imx tree for 6.5,
> I'll drop my patch from this series, otherwise I'll keep it for now
> and we can still do it better at later point.

I suggest we merge my patches for imx25 first and then clean up all the
older imx families to use the common functions.

I've just rebased the patches against today's linux-next. My understanding
is that they have to go through the clk tree.

Thanks,
Martin

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

* Re: [PATCH 10/13] ARM: pxa: fix missing-prototypes warnings
  2023-05-16 15:31 ` [PATCH 10/13] ARM: pxa: fix missing-prototypes warnings Arnd Bergmann
@ 2023-05-18 20:10   ` Stephen Boyd
  2023-05-28 11:46   ` Greg Kroah-Hartman
  1 sibling, 0 replies; 32+ messages in thread
From: Stephen Boyd @ 2023-05-18 20:10 UTC (permalink / raw)
  To: Arnd Bergmann, soc
  Cc: Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, linux-omap, linux-clk, linux-usb

Quoting Arnd Bergmann (2023-05-16 08:31:06)
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The PXA platform has a number of configurations that end up with
> a warning like these when building with W=1:
> 
> drivers/hwmon/max1111.c:83:5: error: no previous prototype for 'max1111_read_channel' [-Werror=missing-prototypes]
> arch/arm/mach-pxa/reset.c:86:6: error: no previous prototype for 'pxa_restart' [-Werror=missing-prototypes]
> arch/arm/mach-pxa/mfp-pxa2xx.c:254:5: error: no previous prototype for 'keypad_set_wake' [-Werror=missing-prototypes]
> drivers/clk/pxa/clk-pxa25x.c:70:14: error: no previous prototype for 'pxa25x_get_clk_frequency_khz' [-Werror=missing-prototypes]
> drivers/clk/pxa/clk-pxa25x.c:325:12: error: no previous prototype for 'pxa25x_clocks_init' [-Werror=missing-prototypes]
> drivers/clk/pxa/clk-pxa27x.c:74:14: error: no previous prototype for 'pxa27x_get_clk_frequency_khz' [-Werror=missing-prototypes]
> drivers/clk/pxa/clk-pxa27x.c:102:6: error: no previous prototype for 'pxa27x_is_ppll_disabled' [-Werror=missing-prototypes]
> drivers/clk/pxa/clk-pxa27x.c:470:12: error: no previous prototype for 'pxa27x_clocks_init' [-Werror=missing-prototypes]
> arch/arm/mach-pxa/pxa27x.c:44:6: error: no previous prototype for 'pxa27x_clear_otgph' [-Werror=missing-prototypes]
> arch/arm/mach-pxa/pxa27x.c:58:6: error: no previous prototype for 'pxa27x_configure_ac97reset' [-Werror=missing-prototypes]
> arch/arm/mach-pxa/spitz_pm.c:170:15: error: no previous prototype for 'spitzpm_read_devdata' [-Werror=missing-prototypes]
> 
> The problem is that there is a declaration for each of these, but
> it's only seen by the caller and not the callee. Moving these
> into appropriate header files ensures that both use the same
> calling conventions and it avoids the warnings.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

Acked-by: Stephen Boyd <sboyd@kernel.org>

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

* Re: [PATCH 06/13] ARM: lpc32xx: add missing include
  2023-05-16 15:31 ` [PATCH 06/13] ARM: lpc32xx: add missing include Arnd Bergmann
@ 2023-05-23 20:17   ` Vladimir Zapolskiy
  0 siblings, 0 replies; 32+ messages in thread
From: Vladimir Zapolskiy @ 2023-05-23 20:17 UTC (permalink / raw)
  To: Arnd Bergmann, soc
  Cc: Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Aaro Koskinen, Janusz Krzysztofik, Tony Lindgren,
	Andrew Lunn, Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, linux-omap, linux-clk, linux-usb

On 5/16/23 18:31, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> lpc32xx_loopback_set() is defined in linux/soc/nxp/lpc32xx-misc.h but
> this is not included before the function definition.
> 
> arch/arm/mach-lpc32xx/serial.c:63:6: error: no previous prototype for 'lpc32xx_loopback_set'
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   arch/arm/mach-lpc32xx/serial.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/mach-lpc32xx/serial.c b/arch/arm/mach-lpc32xx/serial.c
> index 3e765c4bf986..3b1203db81b2 100644
> --- a/arch/arm/mach-lpc32xx/serial.c
> +++ b/arch/arm/mach-lpc32xx/serial.c
> @@ -15,6 +15,7 @@
>   #include <linux/serial_8250.h>
>   #include <linux/clk.h>
>   #include <linux/io.h>
> +#include <linux/soc/nxp/lpc32xx-misc.h>
>   
>   #include "lpc32xx.h"
>   #include "common.h"

Acked-by: Vladimir Zapolskiy <vz@mleia.com>

If you wish, you may consider to add one more tag:

Fixes: ffba29c9ebd0 ("serial: lpc32xx: allow compile testing")

--
Best wishes,
Vladimir

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

* Re: [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings
  2023-05-16 15:30 [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings Arnd Bergmann
                   ` (12 preceding siblings ...)
  2023-05-16 15:31 ` [PATCH 13/13] ARM: versatile: mark mmc_status() static Arnd Bergmann
@ 2023-05-26 11:50 ` patchwork-bot+linux-soc
  13 siblings, 0 replies; 32+ messages in thread
From: patchwork-bot+linux-soc @ 2023-05-26 11:50 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: soc

Hello:

This series was applied to soc/soc.git (for-next)
by Arnd Bergmann <arnd@arndb.de>:

On Tue, 16 May 2023 17:30:56 +0200 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> This is part of a longer series of patches to address all -Wmissing-prototype
> warnings. I would like to take these through the soc tree directly, but
> if anyone wants to first apply a patch to their platform specific tree,
> I'll drop that one. See the Link below for more background.
> 
> [...]

Here is the summary with links:
  - [01/13] ARM: davinci: fix davinci_cpufreq_init() declaration
    https://git.kernel.org/soc/soc/c/30955b4afc2b
  - [02/13] ARM: ep93xx: fix missing-prototype warnings
    https://git.kernel.org/soc/soc/c/419013740ea1
  - [03/13] ARM: highbank: add missing include
    https://git.kernel.org/soc/soc/c/774f60dd6abc
  - [04/13] ARM: imx: add missing include
    https://git.kernel.org/soc/soc/c/5692520a040b
  - [05/13] ARM: imx: remove unused mx25_revision()
    (no matching commit)
  - [06/13] ARM: lpc32xx: add missing include
    https://git.kernel.org/soc/soc/c/ecd2a5769d09
  - [07/13] ARM: omap1: add missing include
    https://git.kernel.org/soc/soc/c/94c1c0a29bfc
  - [08/13] ARM: omap2: fix missing tick_broadcast() prototype
    https://git.kernel.org/soc/soc/c/861bc1d2886d
  - [09/13] ARM: orion5x: fix d2net gpio initialization
    https://git.kernel.org/soc/soc/c/f8ef12339394
  - [10/13] ARM: pxa: fix missing-prototypes warnings
    https://git.kernel.org/soc/soc/c/a9ae9c526cc2
  - [11/13] ARM: sa1100: address missing prototype warnings
    https://git.kernel.org/soc/soc/c/6475f4bb3fbd
  - [12/13] ARM: spear: include "pl080.h" for pl080_get_signal() prototype
    https://git.kernel.org/soc/soc/c/5e40c79a513b
  - [13/13] ARM: versatile: mark mmc_status() static
    https://git.kernel.org/soc/soc/c/88813f05b834

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

* Re: [PATCH 10/13] ARM: pxa: fix missing-prototypes warnings
  2023-05-16 15:31 ` [PATCH 10/13] ARM: pxa: fix missing-prototypes warnings Arnd Bergmann
  2023-05-18 20:10   ` Stephen Boyd
@ 2023-05-28 11:46   ` Greg Kroah-Hartman
  1 sibling, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2023-05-28 11:46 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: soc, Arnd Bergmann, Russell King, Bartosz Golaszewski,
	Hartley Sweeten, Alexander Sverdlin, Andre Przywara, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Alan Stern, linux-arm-kernel,
	linux-kernel, linux-omap, linux-clk, linux-usb

On Tue, May 16, 2023 at 05:31:06PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The PXA platform has a number of configurations that end up with
> a warning like these when building with W=1:
> 
> drivers/hwmon/max1111.c:83:5: error: no previous prototype for 'max1111_read_channel' [-Werror=missing-prototypes]
> arch/arm/mach-pxa/reset.c:86:6: error: no previous prototype for 'pxa_restart' [-Werror=missing-prototypes]
> arch/arm/mach-pxa/mfp-pxa2xx.c:254:5: error: no previous prototype for 'keypad_set_wake' [-Werror=missing-prototypes]
> drivers/clk/pxa/clk-pxa25x.c:70:14: error: no previous prototype for 'pxa25x_get_clk_frequency_khz' [-Werror=missing-prototypes]
> drivers/clk/pxa/clk-pxa25x.c:325:12: error: no previous prototype for 'pxa25x_clocks_init' [-Werror=missing-prototypes]
> drivers/clk/pxa/clk-pxa27x.c:74:14: error: no previous prototype for 'pxa27x_get_clk_frequency_khz' [-Werror=missing-prototypes]
> drivers/clk/pxa/clk-pxa27x.c:102:6: error: no previous prototype for 'pxa27x_is_ppll_disabled' [-Werror=missing-prototypes]
> drivers/clk/pxa/clk-pxa27x.c:470:12: error: no previous prototype for 'pxa27x_clocks_init' [-Werror=missing-prototypes]
> arch/arm/mach-pxa/pxa27x.c:44:6: error: no previous prototype for 'pxa27x_clear_otgph' [-Werror=missing-prototypes]
> arch/arm/mach-pxa/pxa27x.c:58:6: error: no previous prototype for 'pxa27x_configure_ac97reset' [-Werror=missing-prototypes]
> arch/arm/mach-pxa/spitz_pm.c:170:15: error: no previous prototype for 'spitzpm_read_devdata' [-Werror=missing-prototypes]
> 
> The problem is that there is a declaration for each of these, but
> it's only seen by the caller and not the callee. Moving these
> into appropriate header files ensures that both use the same
> calling conventions and it avoids the warnings.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

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

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

* Re: [PATCH 05/13] ARM: imx: remove unused mx25_revision()
  2023-05-17 15:45       ` Martin Kaiser
@ 2023-07-28 15:59         ` Arnd Bergmann
  2023-07-30 16:26           ` Martin Kaiser
  0 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2023-07-28 15:59 UTC (permalink / raw)
  To: Martin Kaiser
  Cc: Fabio Estevam, Arnd Bergmann, soc, Russell King,
	Bartosz Golaszewski, Hartley Sweeten, Alexander Sverdlin,
	Andre Przywara, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, Linux-OMAP, linux-clk, linux-usb

On Wed, May 17, 2023, at 17:45, Martin Kaiser wrote:
> Thus wrote Arnd Bergmann (arnd@arndb.de):
>
>> I think either way is ok to address the warning. If we wanted to do this
>> properly, the mx{25,27,31,35,5}_revision functions could all be removed
>> and the logic hooked up to imx_set_soc_revision() in the same way that
>> they already use mxc_set_cpu_type() for drivers/soc/imx/soc-imx.c.
>
>> I'll leave it up to you, if you want to merge Martin's patches or
>> a replacement for the soc-imx driver through the imx tree for 6.5,
>> I'll drop my patch from this series, otherwise I'll keep it for now
>> and we can still do it better at later point.
>
> I suggest we merge my patches for imx25 first and then clean up all the
> older imx families to use the common functions.
>
> I've just rebased the patches against today's linux-next. My understanding
> is that they have to go through the clk tree.

This never happened, right? I see that mx25_revision() is still in the
tree without any users, so I can't easily turn on the warning by default
yet. Should I just go ahead and remove it for 5.6, or do you expect to
have your patch ready in time for the merge window?

       Arnd

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

* Re: [PATCH 05/13] ARM: imx: remove unused mx25_revision()
  2023-07-28 15:59         ` Arnd Bergmann
@ 2023-07-30 16:26           ` Martin Kaiser
  0 siblings, 0 replies; 32+ messages in thread
From: Martin Kaiser @ 2023-07-30 16:26 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Fabio Estevam, Arnd Bergmann, soc, Russell King,
	Bartosz Golaszewski, Hartley Sweeten, Alexander Sverdlin,
	Andre Przywara, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	NXP Linux Team, Vladimir Zapolskiy, Aaro Koskinen,
	Janusz Krzysztofik, Tony Lindgren, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Viresh Kumar, Shiraz Hashim,
	Sudeep Holla, Lorenzo Pieralisi, Linus Walleij,
	Michael Turquette, Stephen Boyd, Greg Kroah-Hartman, Alan Stern,
	linux-arm-kernel, linux-kernel, Linux-OMAP, linux-clk, linux-usb

Hi Arnd,

Arnd Bergmann (arnd@arndb.de) wrote:

> >> I'll leave it up to you, if you want to merge Martin's patches or
> >> a replacement for the soc-imx driver through the imx tree for 6.5,
> >> I'll drop my patch from this series, otherwise I'll keep it for now
> >> and we can still do it better at later point.

> > I suggest we merge my patches for imx25 first and then clean up all the
> > older imx families to use the common functions.

> > I've just rebased the patches against today's linux-next. My understanding
> > is that they have to go through the clk tree.

> This never happened, right? I see that mx25_revision() is still in the
> tree without any users, so I can't easily turn on the warning by default
> yet. Should I just go ahead and remove it for 5.6, or do you expect to
> have your patch ready in time for the merge window?

sorry for delaying your series.

So far, there's been no response to my patches from the clk maintainers.
Let me resend the patches one final time. If we don't hear anything back
within a week or so, feel free to remove mx25_revision (and probably all
of arch/arm/mach-imx/cpu-imx25.c) for the 6.6 merge window.

Thanks,
Martin

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

end of thread, other threads:[~2023-07-30 16:26 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-16 15:30 [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings Arnd Bergmann
2023-05-16 15:30 ` [PATCH 01/13] ARM: davinci: fix davinci_cpufreq_init() declaration Arnd Bergmann
2023-05-16 15:41   ` Bartosz Golaszewski
2023-05-16 15:30 ` [PATCH 02/13] ARM: ep93xx: fix missing-prototype warnings Arnd Bergmann
2023-05-16 15:51   ` Alexander Sverdlin
2023-05-16 15:30 ` [PATCH 03/13] ARM: highbank: add missing include Arnd Bergmann
2023-05-16 15:58   ` Andre Przywara
2023-05-16 15:31 ` [PATCH 04/13] ARM: imx: " Arnd Bergmann
2023-05-16 15:31 ` [PATCH 05/13] ARM: imx: remove unused mx25_revision() Arnd Bergmann
2023-05-16 23:34   ` Fabio Estevam
2023-05-17  6:39     ` Arnd Bergmann
2023-05-17 15:45       ` Martin Kaiser
2023-07-28 15:59         ` Arnd Bergmann
2023-07-30 16:26           ` Martin Kaiser
2023-05-16 15:31 ` [PATCH 06/13] ARM: lpc32xx: add missing include Arnd Bergmann
2023-05-23 20:17   ` Vladimir Zapolskiy
2023-05-16 15:31 ` [PATCH 07/13] ARM: omap1: " Arnd Bergmann
2023-05-16 23:18   ` Aaro Koskinen
2023-05-17  5:58     ` Tony Lindgren
2023-05-17  5:58     ` Tony Lindgren
2023-05-16 15:31 ` [PATCH 08/13] ARM: omap2: fix missing tick_broadcast() prototype Arnd Bergmann
2023-05-16 23:20   ` Aaro Koskinen
2023-05-16 15:31 ` [PATCH 09/13] ARM: orion5x: fix d2net gpio initialization Arnd Bergmann
2023-05-16 16:17   ` Andrew Lunn
2023-05-16 15:31 ` [PATCH 10/13] ARM: pxa: fix missing-prototypes warnings Arnd Bergmann
2023-05-18 20:10   ` Stephen Boyd
2023-05-28 11:46   ` Greg Kroah-Hartman
2023-05-16 15:31 ` [PATCH 11/13] ARM: sa1100: address missing prototype warnings Arnd Bergmann
2023-05-16 15:31 ` [PATCH 12/13] ARM: spear: include "pl080.h" for pl080_get_signal() prototype Arnd Bergmann
2023-05-17  4:34   ` Viresh Kumar
2023-05-16 15:31 ` [PATCH 13/13] ARM: versatile: mark mmc_status() static Arnd Bergmann
2023-05-26 11:50 ` [PATCH 00/13] ARM: SoC: address -Wmissing-prototype warnings patchwork-bot+linux-soc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).