From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7412C433FE for ; Tue, 10 May 2022 17:08:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2E4436B0071; Tue, 10 May 2022 13:08:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 294926B0073; Tue, 10 May 2022 13:08:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 15BD16B0074; Tue, 10 May 2022 13:08:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 093FC6B0071 for ; Tue, 10 May 2022 13:08:47 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id DDDDC32305 for ; Tue, 10 May 2022 17:08:43 +0000 (UTC) X-FDA: 79450467726.01.66B0D3F Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf27.hostedemail.com (Postfix) with ESMTP id CCCEA400A0 for ; Tue, 10 May 2022 17:08:40 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 24BF3618A0; Tue, 10 May 2022 17:08:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FE55C385C2; Tue, 10 May 2022 17:08:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1652202521; bh=JW5+/lrjtsbvazZDjt9voA+Y/DEDFq/SqAnWIuUwXys=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=EeDrrq0xv6A4Pu3pY9lxl38sgB9IqaIEh335jodk/67xwkvtUxluLDq+JesiU/S+K 2HhDhlYX5fEII/ZIIFceCnUor6YQsUokCMG1EXYY1IcJpW3g7PfZ55/hC/RCh/QGOR jaAw0G+c4pdLmTOaijisvxJDe6+pKUcfFyGFFmGM= Date: Tue, 10 May 2022 10:08:40 -0700 From: Andrew Morton To: kernel test robot Cc: "Liam R. Howlett" , llvm@lists.linux.dev, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Linux Memory Management List , Stephen Rothwell Subject: Re: [akpm-mm:mm-unstable 338/431] mm/nommu.c:579:2: error: call to undeclared function 'vma_mas_store'; ISO C99 and later do not support implicit function declarations Message-Id: <20220510100840.2914b21473ac5fe774a5d44a@linux-foundation.org> In-Reply-To: <202205102024.jnJMagOr-lkp@intel.com> References: <202205102024.jnJMagOr-lkp@intel.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Stat-Signature: hsgg934nfpwbqn9sz8dtdcs3uibcmogn X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: CCCEA400A0 Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=EeDrrq0x; spf=pass (imf27.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspam-User: X-HE-Tag: 1652202520-689632 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 Tue, 10 May 2022 20:52:04 +0800 kernel test robot wrote: > >> mm/nommu.c:579:2: error: call to undeclared function 'vma_mas_store'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] > vma_mas_store(vma, &mas); Thanks. I queued the below temp fix for now. Hopefully it makes sense for nommu. From: Andrew Morton Subject: mapletree: build fix Fix the vma_mas_store/vma_mas_remove issues. Missing prototypes, missing implementation on nommu. Cc: "Liam R. Howlett" Cc: Stephen Rothwell Signed-off-by: Andrew Morton --- include/linux/mm.h | 3 +++ mm/mmap.c | 4 ++-- mm/nommu.c | 13 +++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) --- a/mm/nommu.c~mapletree-build-fix +++ a/mm/nommu.c @@ -544,6 +544,19 @@ static void put_nommu_region(struct vm_r __put_nommu_region(region); } +void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas) +{ + mas_set_range(mas, vma->vm_start, vma->vm_end - 1); + mas_store_prealloc(mas, vma); +} + +void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas) +{ + mas->index = vma->vm_start; + mas->last = vma->vm_end - 1; + mas_store_prealloc(mas, NULL); +} + /* * add a VMA into a process's mm_struct in the appropriate place in the list * and tree and add to the address space's page tree also if not an anonymous --- a/mm/mmap.c~mapletree-build-fix +++ a/mm/mmap.c @@ -475,7 +475,7 @@ static void __vma_link_file(struct vm_ar * * Note: the end address is inclusive in the maple tree. */ -inline void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas) +void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas) { trace_vma_store(mas->tree, vma); mas_set_range(mas, vma->vm_start, vma->vm_end - 1); @@ -491,7 +491,7 @@ inline void vma_mas_store(struct vm_area * been established and points to the correct location. * Note: the end address is inclusive in the maple tree. */ -static inline void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas) +void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas) { trace_vma_mas_szero(mas->tree, vma->vm_start, vma->vm_end - 1); mas->index = vma->vm_start; --- a/include/linux/mm.h~mapletree-build-fix +++ a/include/linux/mm.h @@ -2669,6 +2669,9 @@ extern struct vm_area_struct *copy_vma(s bool *need_rmap_locks); extern void exit_mmap(struct mm_struct *); +void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas); +void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas); + static inline int check_data_rlimit(unsigned long rlim, unsigned long new, unsigned long start, _