Skip to contentSkip to conversation

mm: Fix missing #include in <linux/mmdebug.h>

PATCH In review Ben Hutchings 2 participants 3 messages Dec 19, 2015 – Jan 4, 2016

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

PATCH 1/1 mm: Fix missing #include in <linux/mmdebug.h>

The various VM_WARN_ON/VM_BUG_ON macros depend on those defined by <linux/bug.h>. Most users already include those, but not all; for example:

CC arch/arm64/xen/../../arm/xen/grant-table.o
In file included from arch/arm64/include/../../arm/include/asm/xen/page.h:5:0,

                 from arch/arm64/include/asm/xen/page.h:1,
                 from include/xen/page.h:28,
                 from arch/arm64/xen/../../arm/xen/grant-table.c:33:

arch/arm64/include/asm/pgtable.h: In function 'set_pte_at':
arch/arm64/include/asm/pgtable.h:281:3: error: implicit declaration of function 'BUILD_BUG_ON_INVALID' [-Werror=implicit-function-declaration]
VM_WARN_ONCE(!pte_young(pte),

---
 include/linux/mmdebug.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/mmdebug.h +1 -0
index 877ef22..772362a 100644
@@ -1,6 +1,7 @@
 #ifndef LINUX_MM_DEBUG_H
 #define LINUX_MM_DEBUG_H 1
 
+#include <linux/bug.h>
 #include <linux/stringify.h>
 
 struct page;
Acked-by on v1 1/1
#1 lore raw
Quoted 13 lines · Ben Hutchings

The various VM_WARN_ON/VM_BUG_ON macros depend on those defined by <linux/bug.h>. Most users already include those, but not all; for example:

   CC      arch/arm64/xen/../../arm/xen/grant-table.o
In file included from arch/arm64/include/../../arm/include/asm/xen/page.h:5:0,
                  from arch/arm64/include/asm/xen/page.h:1,
                  from include/xen/page.h:28,
                  from arch/arm64/xen/../../arm/xen/grant-table.c:33:
arch/arm64/include/asm/pgtable.h: In function 'set_pte_at':
arch/arm64/include/asm/pgtable.h:281:3: error: implicit declaration of function 'BUILD_BUG_ON_INVALID' [-Werror=implicit-function-declaration]
    VM_WARN_ONCE(!pte_young(pte),
Quoted 1 line
Quoted 10 lines
---
  include/linux/mmdebug.h | 1 +
  1 file changed, 1 insertion(+)
include/linux/mmdebug.h +0 -0
index 877ef22..772362a 100644

include/linux/mmdebug.h line 7

Quoted 7 lines
include/linux/mmdebug.h +1 -0
@@ -1,6 +1,7 @@
  #ifndef LINUX_MM_DEBUG_H
  #define LINUX_MM_DEBUG_H 1
 
+#include <linux/bug.h>
  #include <linux/stringify.h>
 
  struct page;

--
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>

Acked-by on v1 1/1
#2 lore raw
In reply to Ben Hutchings
Quoted 13 lines · Ben Hutchings

The various VM_WARN_ON/VM_BUG_ON macros depend on those defined by <linux/bug.h>. Most users already include those, but not all; for example:

   CC      arch/arm64/xen/../../arm/xen/grant-table.o
In file included from arch/arm64/include/../../arm/include/asm/xen/page.h:5:0,
                  from arch/arm64/include/asm/xen/page.h:1,
                  from include/xen/page.h:28,
                  from arch/arm64/xen/../../arm/xen/grant-table.c:33:
arch/arm64/include/asm/pgtable.h: In function 'set_pte_at':
arch/arm64/include/asm/pgtable.h:281:3: error: implicit declaration of function 'BUILD_BUG_ON_INVALID' [-Werror=implicit-function-declaration]
    VM_WARN_ONCE(!pte_young(pte),
Quoted 1 line
Quoted 17 lines
---
  include/linux/mmdebug.h | 1 +
  1 file changed, 1 insertion(+)
include/linux/mmdebug.h +1 -0
index 877ef22..772362a 100644
@@ -1,6 +1,7 @@
  #ifndef LINUX_MM_DEBUG_H
  #define LINUX_MM_DEBUG_H 1
 
+#include <linux/bug.h>
  #include <linux/stringify.h>
 
  struct page;