From patchwork Mon Feb 17 02:57:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 11385013 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1D367924 for ; Mon, 17 Feb 2020 02:58:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D19E22086A for ; Mon, 17 Feb 2020 02:58:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="hrie61hL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D19E22086A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1924F6B0003; Sun, 16 Feb 2020 21:58:03 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 143AF6B0005; Sun, 16 Feb 2020 21:58:03 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 031186B0007; Sun, 16 Feb 2020 21:58:02 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0061.hostedemail.com [216.40.44.61]) by kanga.kvack.org (Postfix) with ESMTP id DF20C6B0003 for ; Sun, 16 Feb 2020 21:58:02 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 961FC2C37 for ; Mon, 17 Feb 2020 02:58:02 +0000 (UTC) X-FDA: 76498109604.10.worm49_2913ac6c96d20 X-Spam-Summary: 2,0,0,42a097b79c589602,d41d8cd98f00b204,rdunlap@infradead.org,:almasrymina@google.com::linux-next@vger.kernel.org:linux-kernel@vger.kernel.org:rientjes@google.com:gthelen@google.com:mike.kravetz@oracle.com:shakeelb@google.com:akpm@linux-foundation.org:sfr@canb.auug.org.au,RULES_HIT:41:152:355:379:800:854:960:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1431:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:1801:2198:2199:2393:2553:2559:2562:2693:2731:2892:3138:3139:3140:3141:3142:3353:3865:3866:3868:3870:3871:3874:4321:4362:4605:5007:6119:6261:6653:7576:7875:7903:9010:9036:9121:9149:10004:10400:11026:11232:11658:11914:12043:12296:12297:12438:12517:12519:12679:12895:13894:14181:14394:14721:21080:21451:21627:30054:30075:30090:30091,0,RBL:198.137.202.133:@infradead.org:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:2 6,LUA_SU X-HE-Tag: worm49_2913ac6c96d20 X-Filterd-Recvd-Size: 4524 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Mon, 17 Feb 2020 02:58:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:References:Cc:To:From: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=fvW9MSMh9kEZIr51sUu4eHoff9LTnk1nQKXSASjslKo=; b=hrie61hLh+edr3TtebFbwpgPl1 nt6PxcIjub0RJAWUPgR3Uiy+7aWx/MwleItEHSIUvlUdgckrPXZ4A9PYpzZ/n7P8ujkG2z6FiagXj JBCpZx3QwznwO/iy6TnGWigigXoKpExoYNgAIVuMOxPFFeEJF+c9h+OHgzZ67RBPKn/Nh4lk622QH xkqDPEEu9KgzKfnDmo+4Gv2C1LxVBiaOIr45fafgZ0bqlEpRiZWWTN0M54kNRjj6LLTZzZZsEWLJS 763KQOfRRVFCyA9lxfCLC4BIGTUnyLmNEofyyS393enIFTEX0y6+2b5sWEWwKJeJwh4brr6HAeDsD ZX45Gccg==; Received: from [2601:1c0:6280:3f0::19c2] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3WbW-0004N6-80; Mon, 17 Feb 2020 02:57:50 +0000 Subject: [PATCH] hugetlb: fix structs From: Randy Dunlap To: Mina Almasry Cc: linux-mm@kvack.org, linux-next@vger.kernel.org, open list , David Rientjes , Greg Thelen , Mike Kravetz , Shakeel Butt , Andrew Morton , Stephen Rothwell References: <7ff9e944-1c6c-f7c1-d812-e12817c7a317@oracle.com> <20200214204544.231482-1-almasrymina@google.com> <5237b9bc-2614-0a3a-afa5-5015f30d28bc@infradead.org> Message-ID: Date: Sun, 16 Feb 2020 18:57:49 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2/16/20 6:48 PM, Randy Dunlap wrote: > On 2/16/20 1:03 PM, Mina Almasry wrote: >> On Sun, Feb 16, 2020 at 12:40 PM Mina Almasry wrote: >>> >> any insight into why I can't reproduce the >> warning? Wrong tree perhaps? >> >> I suspect a forward declaration of struct resv_map and struct >> file_region in hugetlb_cgroup.h would also fix. Yes, adding struct stubs in that header file does remove the build warnings. thanks. === patch follows === From: Randy Dunlap Fix build warnings when CONFIG_HUGETLB is not set/enabled. Fixes these warnings: In file included from ../mm/migrate.c:39:0: ../include/linux/hugetlb_cgroup.h:147:21: warning: ‘struct file_region’ declared inside parameter list will not be visible outside of this definition or declaration struct file_region *rg, ^~~~~~~~~~~ ../include/linux/hugetlb_cgroup.h:146:63: warning: ‘struct resv_map’ declared inside parameter list will not be visible outside of this definition or declaration static inline void hugetlb_cgroup_uncharge_file_region(struct resv_map *resv, ^~~~~~~~ ../include/linux/hugetlb_cgroup.h:234:59: warning: ‘struct resv_map’ declared inside parameter list will not be visible outside of this definition or declaration static inline void hugetlb_cgroup_uncharge_counter(struct resv_map *resv, ^~~~~~~~ Suggested-by: Mina Almasry Signed-off-by: Randy Dunlap --- include/linux/hugetlb_cgroup.h | 3 +++ 1 file changed, 3 insertions(+) --- mmotm-2020-0213-2226.orig/include/linux/hugetlb_cgroup.h +++ mmotm-2020-0213-2226/include/linux/hugetlb_cgroup.h @@ -18,6 +18,9 @@ #include struct hugetlb_cgroup; +struct file_region; +struct resv_map; + /* * Minimum page order trackable by hugetlb cgroup. * At least 4 pages are necessary for all the tracking information.