From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932406AbbJPOge (ORCPT ); Fri, 16 Oct 2015 10:36:34 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:37386 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753471AbbJPOgc (ORCPT ); Fri, 16 Oct 2015 10:36:32 -0400 Date: Fri, 16 Oct 2015 16:36:30 +0200 From: Michal Hocko To: "Kirill A. Shutemov" Cc: Vladimir Davydov , Andrew Morton , Johannes Weiner , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] memcg: simplify and inline __mem_cgroup_from_kmem Message-ID: <20151016143629.GE19597@dhcp22.suse.cz> References: <9be67d8528d316ce90d78980bce9ed76b00ffd22.1443996201.git.vdavydov@virtuozzo.com> <517ab1701f4b53be8bfd6691a1499598efb358e7.1443996201.git.vdavydov@virtuozzo.com> <20151016131726.GA602@node.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20151016131726.GA602@node.shutemov.name> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 > #include > #include > +#include > #include > #include > > -- > 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: email@kvack.org -- Michal Hocko SUSE Labs