linux-next: build failure after merge of the akpm tree

From: Stephen Rothwell
Date: Mon Mar 07 2022 - 06:24:39 EST


Hi all,

After merging the akpm tree, today's linux-next build (mips
malta_defconfig) failed like this:

mm/madvise.c: In function 'madvise_need_mmap_write':
mm/madvise.c:55:7: error: 'MADV_DONTNEED_LOCKED' undeclared (first use in this function); did you mean 'MADV_DONTNEED'?
case MADV_DONTNEED_LOCKED:
^~~~~~~~~~~~~~~~~~~~
MADV_DONTNEED
mm/madvise.c:55:7: note: each undeclared identifier is reported only once for each function it appears in
mm/madvise.c: In function 'madvise_dontneed_free_valid_vma':
mm/madvise.c:789:19: error: 'MADV_DONTNEED_LOCKED' undeclared (first use in this function); did you mean 'MADV_DONTNEED'?
if (behavior != MADV_DONTNEED_LOCKED)
^~~~~~~~~~~~~~~~~~~~
MADV_DONTNEED
mm/madvise.c: In function 'madvise_dontneed_free':
mm/madvise.c:859:47: error: 'MADV_DONTNEED_LOCKED' undeclared (first use in this function); did you mean 'MADV_DONTNEED'?
if (behavior == MADV_DONTNEED || behavior == MADV_DONTNEED_LOCKED)
^~~~~~~~~~~~~~~~~~~~
MADV_DONTNEED
mm/madvise.c: In function 'madvise_vma_behavior':
mm/madvise.c:998:7: error: 'MADV_DONTNEED_LOCKED' undeclared (first use in this function); did you mean 'MADV_DONTNEED'?
case MADV_DONTNEED_LOCKED:
^~~~~~~~~~~~~~~~~~~~
MADV_DONTNEED
mm/madvise.c: In function 'madvise_behavior_valid':
mm/madvise.c:1129:7: error: 'MADV_DONTNEED_LOCKED' undeclared (first use in this function); did you mean 'MADV_DONTNEED'?
case MADV_DONTNEED_LOCKED:
^~~~~~~~~~~~~~~~~~~~
MADV_DONTNEED
mm/madvise.c: In function 'madvise_dontneed_free':
mm/madvise.c:865:1: error: control reaches end of non-void function [-Werror=return-type]
}
^

Caused by commit

55e85812e13f ("mm: madvise: MADV_DONTNEED_LOCKED")

Maybe some of these files need a definition as well?

arch/alpha/include/uapi/asm/mman.h
arch/mips/include/uapi/asm/mman.h
arch/parisc/include/uapi/asm/mman.h
arch/xtensa/include/uapi/asm/mman.h

--
Cheers,
Stephen Rothwell

Attachment: pgpsab3phmcVa.pgp
Description: OpenPGP digital signature