* [PATCH] ARM: Kirkwood: fix kirkwood_pm_init() declaration/type
@ 2016-06-09 11:57 Ben Dooks
2016-06-09 13:34 ` Andrew Lunn
2016-06-17 21:04 ` Arnd Bergmann
0 siblings, 2 replies; 3+ messages in thread
From: Ben Dooks @ 2016-06-09 11:57 UTC (permalink / raw)
To: linux-arm-kernel
The kirkwood-pm.c was missing the include of kirkwood-pm.h to
define the kirkwood_pm_init() function. However once this is
included, the types do not match.
Fixup the include, and then the prototype to avoid the following
warning:
arch/arm/mach-mvebu/kirkwood-pm.c:69:12: warning: symbol 'kirkwood_pm_init' was not declared. Should it be static?
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: linux-arm-kernel at lists.infradead.org
---
arch/arm/mach-mvebu/kirkwood-pm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-mvebu/kirkwood-pm.c b/arch/arm/mach-mvebu/kirkwood-pm.c
index cbb816f..1e1f879 100644
--- a/arch/arm/mach-mvebu/kirkwood-pm.c
+++ b/arch/arm/mach-mvebu/kirkwood-pm.c
@@ -18,6 +18,7 @@
#include <linux/suspend.h>
#include <linux/io.h>
#include "kirkwood.h"
+#include "kirkwood-pm.h"
static void __iomem *ddr_operation_base;
static void __iomem *memory_pm_ctrl;
@@ -66,11 +67,10 @@ static const struct platform_suspend_ops kirkwood_suspend_ops = {
.valid = kirkwood_pm_valid_standby,
};
-int __init kirkwood_pm_init(void)
+void __init kirkwood_pm_init(void)
{
ddr_operation_base = ioremap(DDR_OPERATION_BASE, 4);
memory_pm_ctrl = ioremap(MEMORY_PM_CTRL_PHYS, 4);
suspend_set_ops(&kirkwood_suspend_ops);
- return 0;
}
--
2.8.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ARM: Kirkwood: fix kirkwood_pm_init() declaration/type
2016-06-09 11:57 [PATCH] ARM: Kirkwood: fix kirkwood_pm_init() declaration/type Ben Dooks
@ 2016-06-09 13:34 ` Andrew Lunn
2016-06-17 21:04 ` Arnd Bergmann
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2016-06-09 13:34 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jun 09, 2016 at 12:57:12PM +0100, Ben Dooks wrote:
> The kirkwood-pm.c was missing the include of kirkwood-pm.h to
> define the kirkwood_pm_init() function. However once this is
> included, the types do not match.
>
> Fixup the include, and then the prototype to avoid the following
> warning:
>
> arch/arm/mach-mvebu/kirkwood-pm.c:69:12: warning: symbol 'kirkwood_pm_init' was not declared. Should it be static?
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ARM: Kirkwood: fix kirkwood_pm_init() declaration/type
2016-06-09 11:57 [PATCH] ARM: Kirkwood: fix kirkwood_pm_init() declaration/type Ben Dooks
2016-06-09 13:34 ` Andrew Lunn
@ 2016-06-17 21:04 ` Arnd Bergmann
1 sibling, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2016-06-17 21:04 UTC (permalink / raw)
To: linux-arm-kernel
On Thursday, June 9, 2016 12:57:12 PM CEST Ben Dooks wrote:
> The kirkwood-pm.c was missing the include of kirkwood-pm.h to
> define the kirkwood_pm_init() function. However once this is
> included, the types do not match.
>
> Fixup the include, and then the prototype to avoid the following
> warning:
>
> arch/arm/mach-mvebu/kirkwood-pm.c:69:12: warning: symbol 'kirkwood_pm_init' was not declared. Should it be static?
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
You found another bug, when building with CONFIG_PM:
../arch/arm/mach-mvebu/kirkwood-pm.c:70:13: error: redefinition of 'kirkwood_pm_init'
void __init kirkwood_pm_init(void)
^~~~~~~~~~~~~~~~
In file included from ../arch/arm/mach-mvebu/kirkwood-pm.c:21:0:
../arch/arm/mach-mvebu/kirkwood-pm.h:23:20: note: previous definition of 'kirkwood_pm_init' was here
static inline void kirkwood_pm_init(void) {};
I guess we have to make the kirkwood-pm.c file conditional on CONFIG_PM too,
but I'm unsure whether we should do the same for pm.c and pm-board.c.
Would the patch below seem reasonable, or do we actually want to call
mvebu_armada_pm_init() when CONFIG_PM is disabled? Does the machine even
boot without CONFIG_PM?
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index 568863e1513c..6c6497e80a7b 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -6,9 +6,15 @@ CFLAGS_pmsu.o := -march=armv7-a
obj-$(CONFIG_MACH_MVEBU_ANY) += system-controller.o mvebu-soc-id.o
ifeq ($(CONFIG_MACH_MVEBU_V7),y)
-obj-y += cpu-reset.o board-v7.o coherency.o coherency_ll.o pmsu.o pmsu_ll.o pm.o pm-board.o
+obj-y += cpu-reset.o board-v7.o coherency.o coherency_ll.o pmsu.o pmsu_ll.o
+
+obj-$(CONFIG_PM) += pm.o pm-board.o
obj-$(CONFIG_SMP) += platsmp.o headsmp.o platsmp-a9.o headsmp-a9.o
endif
obj-$(CONFIG_MACH_DOVE) += dove.o
-obj-$(CONFIG_MACH_KIRKWOOD) += kirkwood.o kirkwood-pm.o
+
+ifeq ($(CONFIG_MACH_KIRKWOOD),y)
+obj-y += kirkwood.o
+obj-$(CONFIG_PM) += kirkwood-pm.o
+endif
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-17 21:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-09 11:57 [PATCH] ARM: Kirkwood: fix kirkwood_pm_init() declaration/type Ben Dooks
2016-06-09 13:34 ` Andrew Lunn
2016-06-17 21:04 ` Arnd Bergmann
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).