Skip to contentSkip to conversation

mm: include linux/pfn.h for PHYS_PFN definition

PATCH In review Arnd Bergmann 2 participants 2 messages Nov 19, 2015

Subsystems (2)
lore
Share & tools
lore

Arnd Bergmann

author maintainer
#0 lore raw

PATCH 1/1 mm: include linux/pfn.h for PHYS_PFN definition

A change to asm-generic/memory_model.h caused a new build error in some configurations:

mach-clps711x/common.c:39:10: error: implicit declaration of function 'PHYS_PFN'
.pfn = __phys_to_pfn(CLPS711X_PHYS_BASE),

This includes the linux/pfn.h header from the same file to avoid the error.

Fixes bf1c6c9895de ("mm: add PHYS_PFN, use it in __phys_to_pfn()")

---
I was listed as 'Cc' on the original patch, but don't see it in my inbox.

I can queue up the fixed version in the asm-generic tree if you like that, otherwise please fold this fixup into the patch, or drop it if we want to avoid the extra #include.

include/asm-generic/memory_model.h +2 -0
index c785a79d9385..5148150cc80b 100644
@@ -1,6 +1,8 @@
 #ifndef __ASM_MEMORY_MODEL_H
 #define __ASM_MEMORY_MODEL_H
 
+#include <linux/pfn.h>
+
 #ifndef __ASSEMBLY__
 
 #if defined(CONFIG_FLATMEM)
#1 lore raw
Quoted 23 lines · Arnd Bergmann

A change to asm-generic/memory_model.h caused a new build error in some configurations:

mach-clps711x/common.c:39:10: error: implicit declaration of function 'PHYS_PFN'
.pfn = __phys_to_pfn(CLPS711X_PHYS_BASE),

This includes the linux/pfn.h header from the same file to avoid the error.

Fixes bf1c6c9895de ("mm: add PHYS_PFN, use it in __phys_to_pfn()")

---
I was listed as 'Cc' on the original patch, but don't see it in my inbox.

I can queue up the fixed version in the asm-generic tree if you like that, otherwise please fold this fixup into the patch, or drop it if we want to avoid the extra #include.

include/asm-generic/memory_model.h +0 -0
index c785a79d9385..5148150cc80b 100644

include/asm-generic/memory_model.h line 5

Quoted 5 lines
include/asm-generic/memory_model.h +2 -0
@@ -1,6 +1,8 @@
 #ifndef __ASM_MEMORY_MODEL_H
 #define __ASM_MEMORY_MODEL_H
 
+#include <linux/pfn.h>
+

For me, it is OK, thanks.

Quoted 4 lines
include/asm-generic/memory_model.h +0 -0
 #ifndef __ASSEMBLY__
 
 #if defined(CONFIG_FLATMEM)
Signature · 9 lines
Chen Gang (陈刚)

Open, share, and attitude like air, water, and life which God blessed

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>