Skip to contentSkip to conversation

ARM: kirkwood: add missing kexec.h include

PATCH New Ian Campbell 3 participants 7 messages Apr 6, 2012 – Apr 10, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: kirkwood: add missing kexec.h include

Fixes build the following error when CONFIG_KEXEC is enabled:
CC arch/arm/mach-kirkwood/board-dt.o
arch/arm/mach-kirkwood/board-dt.c: In function 'kirkwood_dt_init':
arch/arm/mach-kirkwood/board-dt.c:52:2: error: 'kexec_reinit' undeclared (first use in this function) arch/arm/mach-kirkwood/board-dt.c:52:2: note: each undeclared identifier is reported only once for each function it appears in

kexec.h also needs string.h.

---
 arch/arm/mach-kirkwood/board-dt.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-kirkwood/board-dt.c +2 -0
index 1c672d9..5868b71 100644
@@ -14,6 +14,8 @@
 #include <linux/init.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/string.h>
+#include <asm/kexec.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <mach/bridge-regs.h>
Signature · 1 line
1.7.8.3
#1 lore raw

PATCH 1/1 ARM: kirkwood: add missing kexec.h include

Quoted 1 line · Ian Campbell

Fixes build the following error when CONFIG_KEXEC is enabled:

Maybe "the following build error" instead?

Quoted 6 lines

CC arch/arm/mach-kirkwood/board-dt.o
arch/arm/mach-kirkwood/board-dt.c: In function 'kirkwood_dt_init':
arch/arm/mach-kirkwood/board-dt.c:52:2: error: 'kexec_reinit' undeclared (first use in this function) arch/arm/mach-kirkwood/board-dt.c:52:2: note: each undeclared identifier is reported only once for each function it appears in

kexec.h also needs string.h.

Why it doesn't include it?

Quoted 10 lines
---
  arch/arm/mach-kirkwood/board-dt.c |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-kirkwood/board-dt.c +0 -0
index 1c672d9..5868b71 100644

arch/arm/mach-kirkwood/board-dt.c line 21

Quoted 8 lines
arch/arm/mach-kirkwood/board-dt.c +2 -0
@@ -14,6 +14,8 @@
  #include<linux/init.h>
  #include<linux/of.h>
  #include<linux/of_platform.h>
+#include<linux/string.h>
+#include<asm/kexec.h>
  #include<asm/mach/arch.h>
  #include<asm/mach/map.h>
  #include<mach/bridge-regs.h>

WBR, Sergei

#2 lore raw

PATCH 1/1 ARM: kirkwood: add missing kexec.h include

Quoted 4 lines · Sergei Shtylyov
Quoted 1 line · Ian Campbell

Fixes build the following error when CONFIG_KEXEC is enabled:

Maybe "the following build error" instead?

Done.

Quoted 8 lines
Quoted 6 lines

CC arch/arm/mach-kirkwood/board-dt.o
arch/arm/mach-kirkwood/board-dt.c: In function 'kirkwood_dt_init':
arch/arm/mach-kirkwood/board-dt.c:52:2: error: 'kexec_reinit' undeclared (first use in this function) arch/arm/mach-kirkwood/board-dt.c:52:2: note: each undeclared identifier is reported only once for each function it appears in

kexec.h also needs string.h.

Why it doesn't include it?

Not sure, but actually I should be using linux/kexec.h not asm/kexec.h anyway which solves the problem too:

8<------------------------------

Quoted 1 line

From 76ef56286c1ceeceaa4c6c5ba867d9504e175382 Mon Sep 17 00:00:00 2001

From: Ian Campbell <[email protected]>
Date: Fri, 6 Apr 2012 13:27:23 +0100
Subject: [PATCH] ARM: kirkwood: add missing kexec.h include

Fixes build the following build error when CONFIG_KEXEC is enabled:
CC arch/arm/mach-kirkwood/board-dt.o
arch/arm/mach-kirkwood/board-dt.c: In function 'kirkwood_dt_init':
arch/arm/mach-kirkwood/board-dt.c:52:2: error: 'kexec_reinit' undeclared (first use in this function) arch/arm/mach-kirkwood/board-dt.c:52:2: note: each undeclared identifier is reported only once for each function it appears in

[v2, using linux/kexec.h not asm/kexec.h]
---
 arch/arm/mach-kirkwood/board-dt.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-kirkwood/board-dt.c +1 -0
index 1c672d9..f7fe1b9 100644
@@ -14,6 +14,7 @@
 #include <linux/init.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/kexec.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <mach/bridge-regs.h>
Signature · 5 lines
1.7.8.3


-- 
Ian Campbell
#3 lore raw

PATCH 1/1 ARM: kirkwood: add missing kexec.h include

Quoted 5 lines · Ian Campbell
Quoted 3 lines
Quoted 1 line

Fixes build the following error when CONFIG_KEXEC is enabled:

Maybe "the following build error" instead?

Done.

Not quite. Still "fixes build the following...". :-)

Quoted 12 lines
Quoted 8 lines
Quoted 6 lines

CC arch/arm/mach-kirkwood/board-dt.o
arch/arm/mach-kirkwood/board-dt.c: In function 'kirkwood_dt_init':
arch/arm/mach-kirkwood/board-dt.c:52:2: error: 'kexec_reinit' undeclared (first use in this function) arch/arm/mach-kirkwood/board-dt.c:52:2: note: each undeclared identifier is reported only once for each function it appears in

kexec.h also needs string.h.

Why it doesn't include it?

Not sure, but actually I should be using linux/kexec.h not asm/kexec.h anyway which solves the problem too:

Quoted 8 lines

8<------------------------------

From 76ef56286c1ceeceaa4c6c5ba867d9504e175382 Mon Sep 17 00:00:00 2001
From: Ian Campbell<[email protected]>
Date: Fri, 6 Apr 2012 13:27:23 +0100
Subject: [PATCH] ARM: kirkwood: add missing kexec.h include

Fixes build the following build error when CONFIG_KEXEC is enabled:

What I meant was "Fixes the following build error when CONFIG_KEXEC is
enabled:".

Quoted 7 lines

CC arch/arm/mach-kirkwood/board-dt.o
arch/arm/mach-kirkwood/board-dt.c: In function 'kirkwood_dt_init':
arch/arm/mach-kirkwood/board-dt.c:52:2: error: 'kexec_reinit' undeclared (first use in this function) arch/arm/mach-kirkwood/board-dt.c:52:2: note: each undeclared identifier is reported only once for each function it appears in

[v2, using linux/kexec.h not asm/kexec.h]

WBR, Sergei

#4 lore raw

PATCH 1/1 ARM: kirkwood: add missing kexec.h include

Quoted 9 lines · Sergei Shtylyov
Quoted 5 lines · Ian Campbell
Quoted 3 lines
Quoted 1 line

Fixes build the following error when CONFIG_KEXEC is enabled:

Maybe "the following build error" instead?

Done.

Not quite. Still "fixes build the following...". :-)

Duh, yeah, of course.

Lets try again...

8<--------------------------------------------

Quoted 1 line

From e8437c14cb0dc23cc8db30a0f596d0cc8dbd28ef Mon Sep 17 00:00:00 2001

From: Ian Campbell <[email protected]>
Date: Fri, 6 Apr 2012 13:27:23 +0100
Subject: [PATCH] ARM: kirkwood: add missing kexec.h include

Fixes the following build error when CONFIG_KEXEC is enabled:

CC arch/arm/mach-kirkwood/board-dt.o
arch/arm/mach-kirkwood/board-dt.c: In function 'kirkwood_dt_init':
arch/arm/mach-kirkwood/board-dt.c:52:2: error: 'kexec_reinit' undeclared (first use in this function) arch/arm/mach-kirkwood/board-dt.c:52:2: note: each undeclared identifier is reported only once for each function it appears in

[v3, speak actual English in the commit message, thanks Sergei Shtylyov]
[v2, using linux/kexec.h not asm/kexec.h]
---
 arch/arm/mach-kirkwood/board-dt.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-kirkwood/board-dt.c +1 -0
index d3cf5e6..23da042 100644
@@ -14,6 +14,7 @@
 #include <linux/init.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/kexec.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <mach/bridge-regs.h>
Signature · 10 lines
1.7.8.3


-- 
Ian Campbell


Whenever I date a guy, I think, is this the man I want my children
to spend their weekends with?
		-- Rita Rudner
#5 lore raw

PATCH 1/1 ARM: kirkwood: add missing kexec.h include

In reply to Ian Campbell
Quoted 13 lines · Ian Campbell
Quoted 4 lines · Sergei Shtylyov
Quoted 1 line · Ian Campbell

Fixes build the following error when CONFIG_KEXEC is enabled:

Maybe "the following build error" instead?

Done.

Quoted 5 lines
Quoted 4 lines

CC arch/arm/mach-kirkwood/board-dt.o
arch/arm/mach-kirkwood/board-dt.c: In function 'kirkwood_dt_init':
arch/arm/mach-kirkwood/board-dt.c:52:2: error: 'kexec_reinit' undeclared (first use in this function) arch/arm/mach-kirkwood/board-dt.c:52:2: note: each undeclared identifier is reported only once for each function it appears in

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

kexec.h also needs string.h.

Why it doesn't include it?

Not sure, but actually I should be using linux/kexec.h not asm/kexec.h anyway which solves the problem too:

Because you should not be using asm/kexec.h directly but using linux/kexec.h instead, which will include it via this path:

linux/kexec.h -> linux/compat.h -> linux/sem.h -> linux/rcupdate.h
-> linux/cpumask.h -> linux/bitmap.h -> linux/string.h

checkpatch has been nobbled not to complain by default about using asm/%.h includes when linux/%.h includes are also present, which is a backwards step imho.

#6 lore raw

PATCH 1/1 ARM: kirkwood: add missing kexec.h include

Quoted 16 lines · Russell King - ARM Linux
Quoted 15 lines · Ian Campbell
Quoted 4 lines · Sergei Shtylyov
Quoted 1 line · Ian Campbell

Fixes build the following error when CONFIG_KEXEC is enabled:

Maybe "the following build error" instead?

Done.

Quoted 7 lines
Quoted 6 lines

CC arch/arm/mach-kirkwood/board-dt.o
arch/arm/mach-kirkwood/board-dt.c: In function 'kirkwood_dt_init':
arch/arm/mach-kirkwood/board-dt.c:52:2: error: 'kexec_reinit' undeclared (first use in this function) arch/arm/mach-kirkwood/board-dt.c:52:2: note: each undeclared identifier is reported only once for each function it appears in

kexec.h also needs string.h.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Why it doesn't include it?

Not sure, but actually I should be using linux/kexec.h not asm/kexec.h anyway which solves the problem too:

Because you should not be using asm/kexec.h directly but using linux/kexec.h instead,

Agreed.

Quoted 8 lines

which will include it via this path:

linux/kexec.h -> linux/compat.h -> linux/sem.h -> linux/rcupdate.h
-> linux/cpumask.h -> linux/bitmap.h -> linux/string.h

checkpatch has been nobbled not to complain by default about using asm/%.h includes when linux/%.h includes are also present, which is a backwards step imho.

Yes, I'm not sure what the point of that test would be if it isn't complaining about that case...

Signature · 5 lines
Ian Campbell


MS-DOS, you can't live with it, you can live without it.
		-- from Lars Wirzenius' .sig