* [PATCH] mm: break circular include from linux/mmzone.h
@ 2013-02-05 4:15 ` liguang
0 siblings, 0 replies; 10+ messages in thread
From: liguang @ 2013-02-05 4:15 UTC (permalink / raw)
To: linux-mm, linux-kernel, akpm; +Cc: liguang
linux/mmzone.h included linux/memory_hotplug.h,
and linux/memory_hotplug.h also included
linux/mmzone.h, so there's a bad cirlular.
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>
---
drivers/hwmon/coretemp.c | 2 ++
drivers/hwmon/via-cputemp.c | 2 ++
include/linux/mmzone.h | 1 -
kernel/cpu.c | 1 +
kernel/smp.c | 1 +
lib/show_mem.c | 1 +
mm/memory_hotplug.c | 1 +
mm/nobootmem.c | 1 +
mm/sparse.c | 1 +
9 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index d64923d..9a90a3b 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -36,6 +36,8 @@
#include <linux/cpu.h>
#include <linux/smp.h>
#include <linux/moduleparam.h>
+#include <linux/notifier.h>
+
#include <asm/msr.h>
#include <asm/processor.h>
#include <asm/cpu_device_id.h>
diff --git a/drivers/hwmon/via-cputemp.c b/drivers/hwmon/via-cputemp.c
index 76f157b..2aab52f 100644
--- a/drivers/hwmon/via-cputemp.c
+++ b/drivers/hwmon/via-cputemp.c
@@ -35,6 +35,8 @@
#include <linux/list.h>
#include <linux/platform_device.h>
#include <linux/cpu.h>
+#include <linux/notifier.h>
+
#include <asm/msr.h>
#include <asm/processor.h>
#include <asm/cpu_device_id.h>
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 73b64a3..9ca72f4 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -758,7 +758,6 @@ typedef struct pglist_data {
__pgdat->node_start_pfn + __pgdat->node_spanned_pages;\
})
-#include <linux/memory_hotplug.h>
extern struct mutex zonelists_mutex;
void build_all_zonelists(pg_data_t *pgdat, struct zone *zone);
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 3046a50..e6e53e6 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -19,6 +19,7 @@
#include <linux/mutex.h>
#include <linux/gfp.h>
#include <linux/suspend.h>
+#include <linux/memory_hotplug.h>
#include "smpboot.h"
diff --git a/kernel/smp.c b/kernel/smp.c
index 29dd40a..6f4d485 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -12,6 +12,7 @@
#include <linux/gfp.h>
#include <linux/smp.h>
#include <linux/cpu.h>
+#include <linux/notifier.h>
#include "smpboot.h"
diff --git a/lib/show_mem.c b/lib/show_mem.c
index 4407f8c..7c90021 100644
--- a/lib/show_mem.c
+++ b/lib/show_mem.c
@@ -6,6 +6,7 @@
*/
#include <linux/mm.h>
+#include <linux/memory_hotplug.h>
#include <linux/nmi.h>
#include <linux/quicklist.h>
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index d04ed87..5a73123 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -29,6 +29,7 @@
#include <linux/suspend.h>
#include <linux/mm_inline.h>
#include <linux/firmware-map.h>
+#include <linux/notifier.h>
#include <asm/tlbflush.h>
diff --git a/mm/nobootmem.c b/mm/nobootmem.c
index b8294fc..36c1547 100644
--- a/mm/nobootmem.c
+++ b/mm/nobootmem.c
@@ -16,6 +16,7 @@
#include <linux/kmemleak.h>
#include <linux/range.h>
#include <linux/memblock.h>
+#include <linux/memory_hotplug.h>
#include <asm/bug.h>
#include <asm/io.h>
diff --git a/mm/sparse.c b/mm/sparse.c
index 6b5fb76..1b407d5 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -13,6 +13,7 @@
#include <asm/dma.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
+#include <linux/memory_hotplug.h>
/*
* Permanent SPARSEMEM data:
--
1.7.2.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] mm: break circular include from linux/mmzone.h
@ 2013-02-05 4:15 ` liguang
0 siblings, 0 replies; 10+ messages in thread
From: liguang @ 2013-02-05 4:15 UTC (permalink / raw)
To: linux-mm, linux-kernel, akpm; +Cc: liguang
linux/mmzone.h included linux/memory_hotplug.h,
and linux/memory_hotplug.h also included
linux/mmzone.h, so there's a bad cirlular.
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>
---
drivers/hwmon/coretemp.c | 2 ++
drivers/hwmon/via-cputemp.c | 2 ++
include/linux/mmzone.h | 1 -
kernel/cpu.c | 1 +
kernel/smp.c | 1 +
lib/show_mem.c | 1 +
mm/memory_hotplug.c | 1 +
mm/nobootmem.c | 1 +
mm/sparse.c | 1 +
9 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index d64923d..9a90a3b 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -36,6 +36,8 @@
#include <linux/cpu.h>
#include <linux/smp.h>
#include <linux/moduleparam.h>
+#include <linux/notifier.h>
+
#include <asm/msr.h>
#include <asm/processor.h>
#include <asm/cpu_device_id.h>
diff --git a/drivers/hwmon/via-cputemp.c b/drivers/hwmon/via-cputemp.c
index 76f157b..2aab52f 100644
--- a/drivers/hwmon/via-cputemp.c
+++ b/drivers/hwmon/via-cputemp.c
@@ -35,6 +35,8 @@
#include <linux/list.h>
#include <linux/platform_device.h>
#include <linux/cpu.h>
+#include <linux/notifier.h>
+
#include <asm/msr.h>
#include <asm/processor.h>
#include <asm/cpu_device_id.h>
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 73b64a3..9ca72f4 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -758,7 +758,6 @@ typedef struct pglist_data {
__pgdat->node_start_pfn + __pgdat->node_spanned_pages;\
})
-#include <linux/memory_hotplug.h>
extern struct mutex zonelists_mutex;
void build_all_zonelists(pg_data_t *pgdat, struct zone *zone);
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 3046a50..e6e53e6 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -19,6 +19,7 @@
#include <linux/mutex.h>
#include <linux/gfp.h>
#include <linux/suspend.h>
+#include <linux/memory_hotplug.h>
#include "smpboot.h"
diff --git a/kernel/smp.c b/kernel/smp.c
index 29dd40a..6f4d485 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -12,6 +12,7 @@
#include <linux/gfp.h>
#include <linux/smp.h>
#include <linux/cpu.h>
+#include <linux/notifier.h>
#include "smpboot.h"
diff --git a/lib/show_mem.c b/lib/show_mem.c
index 4407f8c..7c90021 100644
--- a/lib/show_mem.c
+++ b/lib/show_mem.c
@@ -6,6 +6,7 @@
*/
#include <linux/mm.h>
+#include <linux/memory_hotplug.h>
#include <linux/nmi.h>
#include <linux/quicklist.h>
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index d04ed87..5a73123 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -29,6 +29,7 @@
#include <linux/suspend.h>
#include <linux/mm_inline.h>
#include <linux/firmware-map.h>
+#include <linux/notifier.h>
#include <asm/tlbflush.h>
diff --git a/mm/nobootmem.c b/mm/nobootmem.c
index b8294fc..36c1547 100644
--- a/mm/nobootmem.c
+++ b/mm/nobootmem.c
@@ -16,6 +16,7 @@
#include <linux/kmemleak.h>
#include <linux/range.h>
#include <linux/memblock.h>
+#include <linux/memory_hotplug.h>
#include <asm/bug.h>
#include <asm/io.h>
diff --git a/mm/sparse.c b/mm/sparse.c
index 6b5fb76..1b407d5 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -13,6 +13,7 @@
#include <asm/dma.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
+#include <linux/memory_hotplug.h>
/*
* Permanent SPARSEMEM data:
--
1.7.2.5
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] mm: break circular include from linux/mmzone.h
2013-02-05 4:15 ` liguang
@ 2013-02-05 5:20 ` David Rientjes
-1 siblings, 0 replies; 10+ messages in thread
From: David Rientjes @ 2013-02-05 5:20 UTC (permalink / raw)
To: liguang; +Cc: linux-mm, linux-kernel, akpm
On Tue, 5 Feb 2013, liguang wrote:
> linux/mmzone.h included linux/memory_hotplug.h,
> and linux/memory_hotplug.h also included
> linux/mmzone.h, so there's a bad cirlular.
>
And both of these are protected by _LINUX_MMZONE_H and
__LINUX_MEMORY_HOTPLUG_H, respectively, so what's the problem?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm: break circular include from linux/mmzone.h
@ 2013-02-05 5:20 ` David Rientjes
0 siblings, 0 replies; 10+ messages in thread
From: David Rientjes @ 2013-02-05 5:20 UTC (permalink / raw)
To: liguang; +Cc: linux-mm, linux-kernel, akpm
On Tue, 5 Feb 2013, liguang wrote:
> linux/mmzone.h included linux/memory_hotplug.h,
> and linux/memory_hotplug.h also included
> linux/mmzone.h, so there's a bad cirlular.
>
And both of these are protected by _LINUX_MMZONE_H and
__LINUX_MEMORY_HOTPLUG_H, respectively, so what's the problem?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm: break circular include from linux/mmzone.h
2013-02-05 5:20 ` David Rientjes
@ 2013-02-05 5:56 ` li guang
-1 siblings, 0 replies; 10+ messages in thread
From: li guang @ 2013-02-05 5:56 UTC (permalink / raw)
To: David Rientjes; +Cc: linux-mm, linux-kernel, akpm
在 2013-02-04一的 21:20 -0800,David Rientjes写道:
> On Tue, 5 Feb 2013, liguang wrote:
>
> > linux/mmzone.h included linux/memory_hotplug.h,
> > and linux/memory_hotplug.h also included
> > linux/mmzone.h, so there's a bad cirlular.
> >
>
> And both of these are protected by _LINUX_MMZONE_H and
> __LINUX_MEMORY_HOTPLUG_H, respectively, so what's the problem?
obviously, It's a logical error,
and It has no more effect other than
combination of these 2 header files.
so, why don't we separate them?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm: break circular include from linux/mmzone.h
@ 2013-02-05 5:56 ` li guang
0 siblings, 0 replies; 10+ messages in thread
From: li guang @ 2013-02-05 5:56 UTC (permalink / raw)
To: David Rientjes; +Cc: linux-mm, linux-kernel, akpm
在 2013-02-04一的 21:20 -0800,David Rientjes写道:
> On Tue, 5 Feb 2013, liguang wrote:
>
> > linux/mmzone.h included linux/memory_hotplug.h,
> > and linux/memory_hotplug.h also included
> > linux/mmzone.h, so there's a bad cirlular.
> >
>
> And both of these are protected by _LINUX_MMZONE_H and
> __LINUX_MEMORY_HOTPLUG_H, respectively, so what's the problem?
obviously, It's a logical error,
and It has no more effect other than
combination of these 2 header files.
so, why don't we separate them?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm: break circular include from linux/mmzone.h
2013-02-05 5:56 ` li guang
@ 2013-02-05 21:18 ` Andrew Morton
-1 siblings, 0 replies; 10+ messages in thread
From: Andrew Morton @ 2013-02-05 21:18 UTC (permalink / raw)
To: li guang; +Cc: David Rientjes, linux-mm, linux-kernel
On Tue, 05 Feb 2013 13:56:36 +0800
li guang <lig.fnst@cn.fujitsu.com> wrote:
> ___ 2013-02-04______ 21:20 -0800___David Rientjes_________
> > On Tue, 5 Feb 2013, liguang wrote:
> >
> > > linux/mmzone.h included linux/memory_hotplug.h,
> > > and linux/memory_hotplug.h also included
> > > linux/mmzone.h, so there's a bad cirlular.
> > >
> >
> > And both of these are protected by _LINUX_MMZONE_H and
> > __LINUX_MEMORY_HOTPLUG_H, respectively, so what's the problem?
>
> obviously, It's a logical error,
> and It has no more effect other than
> combination of these 2 header files.
> so, why don't we separate them?
>
Yup, flattening the hierarchy is nice. And having headers doing mutual
inclusion like this is Just Weird.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm: break circular include from linux/mmzone.h
@ 2013-02-05 21:18 ` Andrew Morton
0 siblings, 0 replies; 10+ messages in thread
From: Andrew Morton @ 2013-02-05 21:18 UTC (permalink / raw)
To: li guang; +Cc: David Rientjes, linux-mm, linux-kernel
On Tue, 05 Feb 2013 13:56:36 +0800
li guang <lig.fnst@cn.fujitsu.com> wrote:
> ___ 2013-02-04______ 21:20 -0800___David Rientjes_________
> > On Tue, 5 Feb 2013, liguang wrote:
> >
> > > linux/mmzone.h included linux/memory_hotplug.h,
> > > and linux/memory_hotplug.h also included
> > > linux/mmzone.h, so there's a bad cirlular.
> > >
> >
> > And both of these are protected by _LINUX_MMZONE_H and
> > __LINUX_MEMORY_HOTPLUG_H, respectively, so what's the problem?
>
> obviously, It's a logical error,
> and It has no more effect other than
> combination of these 2 header files.
> so, why don't we separate them?
>
Yup, flattening the hierarchy is nice. And having headers doing mutual
inclusion like this is Just Weird.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [patch] mm: break circular include from linux/mmzone.h fix fix fix fix
2013-02-05 4:15 ` liguang
@ 2013-02-06 18:15 ` David Rientjes
-1 siblings, 0 replies; 10+ messages in thread
From: David Rientjes @ 2013-02-06 18:15 UTC (permalink / raw)
To: Andrew Morton; +Cc: liguang, linux-mm, linux-kernel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1338 bytes --]
kernel/jump_label.c: In function ‘jump_label_module_notify’:
kernel/jump_label.c:393:2: error: implicit declaration of function ‘notifier_from_errno’ [-Werror=implicit-function-declaration]
kernel/jump_label.c: At top level:
kernel/jump_label.c:396:8: error: variable ‘jump_label_module_nb’ has initializer but incomplete type
kernel/jump_label.c:397:2: error: unknown field ‘notifier_call’ specified in initializer
kernel/jump_label.c:397:2: warning: excess elements in struct initializer [enabled by default]
kernel/jump_label.c:397:2: warning: (near initialization for ‘jump_label_module_nb’) [enabled by default]
kernel/jump_label.c:398:2: error: unknown field ‘priority’ specified in initializer
kernel/jump_label.c:398:2: warning: excess elements in struct initializer [enabled by default]
kernel/jump_label.c:398:2: warning: (near initialization for ‘jump_label_module_nb’) [enabled by default]
Signed-off-by: David Rientjes <rientjes@google.com>
---
kernel/jump_label.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/jump_label.c b/kernel/jump_label.c
index 60f48fa..012219d 100644
--- a/kernel/jump_label.c
+++ b/kernel/jump_label.c
@@ -13,6 +13,7 @@
#include <linux/sort.h>
#include <linux/err.h>
#include <linux/static_key.h>
+#include <linux/notifier.h>
#ifdef HAVE_JUMP_LABEL
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [patch] mm: break circular include from linux/mmzone.h fix fix fix fix
@ 2013-02-06 18:15 ` David Rientjes
0 siblings, 0 replies; 10+ messages in thread
From: David Rientjes @ 2013-02-06 18:15 UTC (permalink / raw)
To: Andrew Morton; +Cc: liguang, linux-mm, linux-kernel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1338 bytes --]
kernel/jump_label.c: In function a??jump_label_module_notifya??:
kernel/jump_label.c:393:2: error: implicit declaration of function a??notifier_from_errnoa?? [-Werror=implicit-function-declaration]
kernel/jump_label.c: At top level:
kernel/jump_label.c:396:8: error: variable a??jump_label_module_nba?? has initializer but incomplete type
kernel/jump_label.c:397:2: error: unknown field a??notifier_calla?? specified in initializer
kernel/jump_label.c:397:2: warning: excess elements in struct initializer [enabled by default]
kernel/jump_label.c:397:2: warning: (near initialization for a??jump_label_module_nba??) [enabled by default]
kernel/jump_label.c:398:2: error: unknown field a??prioritya?? specified in initializer
kernel/jump_label.c:398:2: warning: excess elements in struct initializer [enabled by default]
kernel/jump_label.c:398:2: warning: (near initialization for a??jump_label_module_nba??) [enabled by default]
Signed-off-by: David Rientjes <rientjes@google.com>
---
kernel/jump_label.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/jump_label.c b/kernel/jump_label.c
index 60f48fa..012219d 100644
--- a/kernel/jump_label.c
+++ b/kernel/jump_label.c
@@ -13,6 +13,7 @@
#include <linux/sort.h>
#include <linux/err.h>
#include <linux/static_key.h>
+#include <linux/notifier.h>
#ifdef HAVE_JUMP_LABEL
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-02-06 18:15 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-05 4:15 [PATCH] mm: break circular include from linux/mmzone.h liguang
2013-02-05 4:15 ` liguang
2013-02-05 5:20 ` David Rientjes
2013-02-05 5:20 ` David Rientjes
2013-02-05 5:56 ` li guang
2013-02-05 5:56 ` li guang
2013-02-05 21:18 ` Andrew Morton
2013-02-05 21:18 ` Andrew Morton
2013-02-06 18:15 ` [patch] mm: break circular include from linux/mmzone.h fix fix fix fix David Rientjes
2013-02-06 18:15 ` David Rientjes
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.