MIPS: fix double definition of MADV_FREE
PATCH 1/1 MIPS: fix double definition of MADV_FREE
Commit ef58978f1eaab140081ec1808d96ee06e933e760
("mm: define MADV_FREE for some arches") introduced MADV_FREE to MIPS, commit 21f55b018ba57897f4d3590ecbe11516bdc540af ("arch/*/include/uapi/asm/mman.h: : let MADV_FREE have same value for all architectures") added another instance, which resulted in this build error:
In file included from include/uapi/linux/mman.h:4:0,
from include/linux/mman.h:8,
from kernel/fork.c:28:arch/mips/include/uapi/asm/mman.h:79:0: warning: "MADV_FREE" redefined
#define MADV_FREE 8 /* free pages only if memory pressure */
^arch/mips/include/uapi/asm/mman.h:76:0: note: this is the location of the previous definition
#define MADV_FREE 5 /* free pages only if memory pressure */
This patch removes the "MADV_FREE 5" introduced by the first commit ("mm: define MADV_FREE for some arches").
--- arch/mips/include/uapi/asm/mman.h | 1 - 1 file changed, 1 deletion(-)
arch/mips/include/uapi/asm/mman.h +0 -1
@@ -73,7 +73,6 @@#define MADV_SEQUENTIAL 2/* expect sequential page references */ #define MADV_WILLNEED 3/* will need these pages */ #define MADV_DONTNEED 4/* don't need these pages */ -#define MADV_FREE 5/* free pages only if memory pressure */ /* common parameters: try to keep these consistent across architectures */ #define MADV_FREE 8/* free pages only if memory pressure */
Signature · 1 line
2.7.0
Quoted 16 lines · Manuel Lauss
Commit
ef58978f1eaab140081ec1808d96ee06e933e760
("mm: defineMADV_FREEfor some arches") introducedMADV_FREEto MIPS, commit21f55b018ba57897f4d3590ecbe11516bdc540af("arch/*/include/uapi/asm/mman.h: : letMADV_FREEhave same value for all architectures") added another instance, which resulted in this build error:In file included from
include/uapi/linux/mman.h:4:0,from include/linux/mman.h:8, from kernel/fork.c:28:
arch/mips/include/uapi/asm/mman.h:79:0: warning: "MADV_FREE" redefined
#defineMADV_FREE8 /* free pages only if memory pressure */
^arch/mips/include/uapi/asm/mman.h:76:0: note: this is the location of the previous definition
#defineMADV_FREE5 /* free pages only if memory pressure */
Quoted 2 lines
This patch removes the "
MADV_FREE5" introduced by the first commit ("mm: defineMADV_FREEfor some arches").
Guenter Roeck's commit dcd6c87cc59af1b4fe7664b35c6344bbe1c9928f ("mm: arch: remove duplicate definitions of MADV_FREE") already fixed the issue.
Thanks,
Ralf