* [PATCH] mm: compaction: fix dummy declarations
@ 2016-06-15 21:39 Arnd Bergmann
2016-06-15 21:48 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2016-06-15 21:39 UTC (permalink / raw)
To: Andrew Morton, Minchan Kim
Cc: Arnd Bergmann, Vlastimil Babka, Michal Hocko, Hillf Danton,
Mel Gorman, linux-kernel
We get a build error in several test builds after a recent code rework:
In file included from include/linux/balloon_compaction.h:48:0,
from mm/balloon_compaction.c:11:
include/linux/compaction.h:237:122: error: 'struct node' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
The patch that likely introduced the problem added a forward declaration
for 'struct node' in linux/compaction.h, but only in one of two instances.
This moves the declaration out of the #ifdef so we always get it.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: akpm-current ("mm: migrate: support non-lru movable page migration")
---
include/linux/compaction.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/compaction.h b/include/linux/compaction.h
index c6b47c861cea..8f0297c7e741 100644
--- a/include/linux/compaction.h
+++ b/include/linux/compaction.h
@@ -227,8 +227,9 @@ static inline void wakeup_kcompactd(pg_data_t *pgdat, int order, int classzone_i
#endif /* CONFIG_COMPACTION */
-#if defined(CONFIG_COMPACTION) && defined(CONFIG_SYSFS) && defined(CONFIG_NUMA)
struct node;
+
+#if defined(CONFIG_COMPACTION) && defined(CONFIG_SYSFS) && defined(CONFIG_NUMA)
extern int compaction_register_node(struct node *node);
extern void compaction_unregister_node(struct node *node);
--
2.9.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: compaction: fix dummy declarations
2016-06-15 21:39 [PATCH] mm: compaction: fix dummy declarations Arnd Bergmann
@ 2016-06-15 21:48 ` Andrew Morton
2016-06-15 23:30 ` Minchan Kim
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2016-06-15 21:48 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Minchan Kim, Vlastimil Babka, Michal Hocko, Hillf Danton,
Mel Gorman, linux-kernel
On Wed, 15 Jun 2016 23:39:12 +0200 Arnd Bergmann <arnd@arndb.de> wrote:
> We get a build error in several test builds after a recent code rework:
>
> In file included from include/linux/balloon_compaction.h:48:0,
> from mm/balloon_compaction.c:11:
> include/linux/compaction.h:237:122: error: 'struct node' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
>
> The patch that likely introduced the problem added a forward declaration
> for 'struct node' in linux/compaction.h, but only in one of two instances.
>
> This moves the declaration out of the #ifdef so we always get it.
http://ozlabs.org/~akpm/mmots/broken-out/mm-balloon-use-general-non-lru-movable-page-feature-fix.patch
should fix this. I guess I should do another -mm.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: compaction: fix dummy declarations
2016-06-15 21:48 ` Andrew Morton
@ 2016-06-15 23:30 ` Minchan Kim
2016-06-16 21:54 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Minchan Kim @ 2016-06-15 23:30 UTC (permalink / raw)
To: Andrew Morton
Cc: Arnd Bergmann, Vlastimil Babka, Michal Hocko, Hillf Danton,
Mel Gorman, linux-kernel
Hi Andrew,
On Wed, Jun 15, 2016 at 02:48:25PM -0700, Andrew Morton wrote:
> On Wed, 15 Jun 2016 23:39:12 +0200 Arnd Bergmann <arnd@arndb.de> wrote:
>
> > We get a build error in several test builds after a recent code rework:
> >
> > In file included from include/linux/balloon_compaction.h:48:0,
> > from mm/balloon_compaction.c:11:
> > include/linux/compaction.h:237:122: error: 'struct node' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
> >
> > The patch that likely introduced the problem added a forward declaration
> > for 'struct node' in linux/compaction.h, but only in one of two instances.
> >
> > This moves the declaration out of the #ifdef so we always get it.
>
> http://ozlabs.org/~akpm/mmots/broken-out/mm-balloon-use-general-non-lru-movable-page-feature-fix.patch
> should fix this. I guess I should do another -mm.
>
[1] solves the issues so we can revert your patch with removing remaining
forward declaration in below code snippet.
If I should resend patch with removing remainiang forward declaration part,
please tell me.
Thanks.
compaction.h:
#if defined(CONFIG_COMPACTION) && defined(CONFIG_SYSFS) && defined(CONFIG_NUMA)
struct node; <----- Here
extern int compaction_register_node(struct node *node);
...
#else
...
#endif /* CONFIG_COMPACTION && CONFIG_SYSFS && CONFIG_NUMA */
[1] http://ozlabs.org/~akpm/mmots/broken-out/mm-fix-build-warnings-in-linux-compactionh.patch
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: compaction: fix dummy declarations
2016-06-15 23:30 ` Minchan Kim
@ 2016-06-16 21:54 ` Andrew Morton
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2016-06-16 21:54 UTC (permalink / raw)
To: Minchan Kim
Cc: Arnd Bergmann, Vlastimil Babka, Michal Hocko, Hillf Danton,
Mel Gorman, linux-kernel
On Thu, 16 Jun 2016 08:30:28 +0900 Minchan Kim <minchan@kernel.org> wrote:
> Hi Andrew,
>
> On Wed, Jun 15, 2016 at 02:48:25PM -0700, Andrew Morton wrote:
> > On Wed, 15 Jun 2016 23:39:12 +0200 Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > > We get a build error in several test builds after a recent code rework:
> > >
> > > In file included from include/linux/balloon_compaction.h:48:0,
> > > from mm/balloon_compaction.c:11:
> > > include/linux/compaction.h:237:122: error: 'struct node' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
> > >
> > > The patch that likely introduced the problem added a forward declaration
> > > for 'struct node' in linux/compaction.h, but only in one of two instances.
> > >
> > > This moves the declaration out of the #ifdef so we always get it.
> >
> > http://ozlabs.org/~akpm/mmots/broken-out/mm-balloon-use-general-non-lru-movable-page-feature-fix.patch
> > should fix this. I guess I should do another -mm.
> >
>
> [1] solves the issues so we can revert your patch with removing remaining
> forward declaration in below code snippet.
> If I should resend patch with removing remainiang forward declaration part,
> please tell me.
>
> Thanks.
>
> compaction.h:
>
> #if defined(CONFIG_COMPACTION) && defined(CONFIG_SYSFS) && defined(CONFIG_NUMA)
> struct node; <----- Here
> extern int compaction_register_node(struct node *node);
> ...
> #else
> ...
>
> #endif /* CONFIG_COMPACTION && CONFIG_SYSFS && CONFIG_NUMA */
>
>
> [1] http://ozlabs.org/~akpm/mmots/broken-out/mm-fix-build-warnings-in-linux-compactionh.patch
>
I think I'll retain
mm-balloon-use-general-non-lru-movable-page-feature-fix.patch for
bisectability reasons and I'll revert
mm-balloon-use-general-non-lru-movable-page-feature-fix.patc within
mm-fix-build-warnings-in-linux-compactionh.patch, see how that goes.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-16 21:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-15 21:39 [PATCH] mm: compaction: fix dummy declarations Arnd Bergmann
2016-06-15 21:48 ` Andrew Morton
2016-06-15 23:30 ` Minchan Kim
2016-06-16 21:54 ` Andrew Morton
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).