Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1248820
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/3] memcg: simplify and inline __mem_cgroup_from_kmem |
| Date | 2015-10-16 16:40 +0200 |
| Message-ID | <qkekN-GU-5@gated-at.bofh.it> (permalink) |
| References | <qfZX3-5dG-7@gated-at.bofh.it> <qfZX3-5dG-5@gated-at.bofh.it> <qkd5o-7oE-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri 16-10-15 16:17:26, Kirill A. Shutemov wrote: [...] I've just encountered the same while updating mmotm git tree. Thanks for the fix. All other configs which I am testing are good as well. > virt_to_head_page() is defined in <linux/mm.h> but you don't include it, > and the commit breaks build for me (on v4.3-rc5-mmotm-2015-10-15-15-20). > > CC arch/x86/kernel/asm-offsets.s > In file included from /home/kas/linux/mm/include/linux/swap.h:8:0, > from /home/kas/linux/mm/include/linux/suspend.h:4, > from /home/kas/linux/mm/arch/x86/kernel/asm-offsets.c:12: > /home/kas/linux/mm/include/linux/memcontrol.h: In function ‘mem_cgroup_from_kmem’: > /home/kas/linux/mm/include/linux/memcontrol.h:841:9: error: implicit declaration of function ‘virt_to_head_page’ [-Werror=implicit-function-declaration] > page = virt_to_head_page(ptr); > ^ > /home/kas/linux/mm/include/linux/memcontrol.h:841:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion] > page = virt_to_head_page(ptr); > ^ > In file included from /home/kas/linux/mm/include/linux/suspend.h:8:0, > from /home/kas/linux/mm/arch/x86/kernel/asm-offsets.c:12: > /home/kas/linux/mm/include/linux/mm.h: At top level: > /home/kas/linux/mm/include/linux/mm.h:452:28: error: conflicting types for ‘virt_to_head_page’ > static inline struct page *virt_to_head_page(const void *x) > ^ > In file included from /home/kas/linux/mm/include/linux/swap.h:8:0, > from /home/kas/linux/mm/include/linux/suspend.h:4, > from /home/kas/linux/mm/arch/x86/kernel/asm-offsets.c:12: > /home/kas/linux/mm/include/linux/memcontrol.h:841:9: note: previous implicit declaration of ‘virt_to_head_page’ was here > page = virt_to_head_page(ptr); > ^ > cc1: some warnings being treated as errors > > The patch below fixes it for me (and for allmodconfig on x86-64), but I'm not > sure if it have any side effects on other configurations. > > diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h > index 47677acb4516..e8e52e502c20 100644 > --- a/include/linux/memcontrol.h > +++ b/include/linux/memcontrol.h > @@ -26,6 +26,7 @@ > #include <linux/page_counter.h> > #include <linux/vmpressure.h> > #include <linux/eventfd.h> > +#include <linux/mm.h> > #include <linux/mmzone.h> > #include <linux/writeback.h> > > -- > Kirill A. Shutemov > > -- > 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> -- Michal Hocko SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH 3/3] memcg: simplify and inline __mem_cgroup_from_kmem "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-10-16 15:20 +0200
Re: [PATCH 3/3] memcg: simplify and inline __mem_cgroup_from_kmem Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-10-16 16:00 +0200
Re: [PATCH 3/3] memcg: simplify and inline __mem_cgroup_from_kmem Hugh Dickins <hughd@google.com> - 2015-10-17 00:20 +0200
Re: [PATCH 3/3] memcg: simplify and inline __mem_cgroup_from_kmem Johannes Weiner <hannes@cmpxchg.org> - 2015-10-17 00:30 +0200
Re: [PATCH 3/3] memcg: simplify and inline __mem_cgroup_from_kmem Andrew Morton <akpm@linux-foundation.org> - 2015-10-17 00:30 +0200
Re: [PATCH 3/3] memcg: simplify and inline __mem_cgroup_from_kmem Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-10-17 17:00 +0200
Re: [PATCH 3/3] memcg: simplify and inline __mem_cgroup_from_kmem Michal Hocko <mhocko@kernel.org> - 2015-10-16 16:40 +0200
csiph-web