From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f200.google.com (mail-pf0-f200.google.com [209.85.192.200]) by kanga.kvack.org (Postfix) with ESMTP id B85EB6B007E for ; Thu, 9 Jun 2016 18:27:18 -0400 (EDT) Received: by mail-pf0-f200.google.com with SMTP id s73so82764312pfs.0 for ; Thu, 09 Jun 2016 15:27:18 -0700 (PDT) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org. [140.211.169.12]) by mx.google.com with ESMTPS id e4si9678694pac.55.2016.06.09.15.27.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jun 2016 15:27:17 -0700 (PDT) Date: Thu, 9 Jun 2016 15:27:16 -0700 From: Andrew Morton Subject: Re: [PATCH] mm: fix build warnings in Message-Id: <20160609152716.1093ada2f52bbcc426e6ddb6@linux-foundation.org> In-Reply-To: <5759A1F9.2070302@infradead.org> References: <5759A1F9.2070302@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Randy Dunlap Cc: Linux MM , "linux-next@vger.kernel.org" , Stephen Rothwell , Minchan Kim On Thu, 9 Jun 2016 10:06:01 -0700 Randy Dunlap wrote: > From: Randy Dunlap > > Fix build warnings when struct node is not defined: > > In file included from ../include/linux/balloon_compaction.h:48:0, > from ../mm/balloon_compaction.c:11: > ../include/linux/compaction.h:237:51: warning: 'struct node' declared inside parameter list [enabled by default] > static inline int compaction_register_node(struct node *node) > ../include/linux/compaction.h:237:51: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] > ../include/linux/compaction.h:242:54: warning: 'struct node' declared inside parameter list [enabled by default] > static inline void compaction_unregister_node(struct node *node) > > ... > > --- linux-next-20160609.orig/include/linux/compaction.h > +++ linux-next-20160609/include/linux/compaction.h > @@ -233,6 +233,7 @@ extern int compaction_register_node(stru > extern void compaction_unregister_node(struct node *node); > > #else > +struct node; > > static inline int compaction_register_node(struct node *node) > { Well compaction.h has no #includes at all and obviously depends on its including file(s) to bring in the definitions which it needs. So if we want to keep that (odd) model then we should fix mm-balloon-use-general-non-lru-movable-page-feature.patch thusly: From: Andrew Morton Subject: mm-balloon-use-general-non-lru-movable-page-feature-fix compaction.h requires that the includer first include node.h Reported-by: Randy Dunlap Cc: Gioh Kim Cc: Konstantin Khlebnikov Cc: Minchan Kim Cc: Rafael Aquini Cc: Vlastimil Babka Signed-off-by: Andrew Morton --- a/include/linux/balloon_compaction.h~mm-balloon-use-general-non-lru-movable-page-feature-fix +++ a/include/linux/balloon_compaction.h @@ -45,6 +45,7 @@ #define _LINUX_BALLOON_COMPACTION_H #include #include +#include #include #include #include -- 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: email@kvack.org