From: Liam Howlett <liam.howlett@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kernel test robot <lkp@intel.com>,
"llvm@lists.linux.dev" <llvm@lists.linux.dev>,
"kbuild-all@lists.01.org" <kbuild-all@lists.01.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Stephen Rothwell <sfr@canb.auug.org.au>
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
Date: Tue, 10 May 2022 17:35:18 +0000 [thread overview]
Message-ID: <20220510173503.abz4t3y3nyg4ndmz@revolver> (raw)
In-Reply-To: <20220510100840.2914b21473ac5fe774a5d44a@linux-foundation.org>
* Andrew Morton <akpm@linux-foundation.org> [220510 10:08]:
> On Tue, 10 May 2022 20:52:04 +0800 kernel test robot <lkp@intel.com> 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.
Yes that works. I'm trying to figure out the best way to keep my
tracepoints in the mmap.c version and I think this is probably better
than yet-another-underscore or dropping tracepoints all together.
I think in the long run, it might be better to put these prototypes into
mm/internal.h to limit the users.
>
>
>
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: mapletree: build fix
>
> Fix the vma_mas_store/vma_mas_remove issues. Missing prototypes, missing
> implementation on nommu.
>
> Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>
> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> 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,
> _
>
prev parent reply other threads:[~2022-05-10 17:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 12:52 kernel test robot
2022-05-10 17:08 ` Andrew Morton
2022-05-10 17:35 ` Liam Howlett [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220510173503.abz4t3y3nyg4ndmz@revolver \
--to=liam.howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox