Skip to content

Commit dcd6c87

Browse files
groecktorvalds
authored andcommitted
mm: arch: remove duplicate definitions of MADV_FREE
Commits 21f55b0 ("arch/*/include/uapi/asm/mman.h: : let MADV_FREE have same value for all architectures") and ef58978 ("mm: define MADV_FREE for some arches") both defined MADV_FREE, but did not use the same values. This results in build errors such as ./arch/alpha/include/uapi/asm/mman.h:53:0: error: "MADV_FREE" redefined ./arch/alpha/include/uapi/asm/mman.h:50:0: note: this is the location of the previous definition for the affected architectures. Fixes: 21f55b0 ("arch/*/include/uapi/asm/mman.h: : let MADV_FREE have same value for all architectures") Fixes: ef58978 ("mm: define MADV_FREE for some arches") Signed-off-by: Guenter Roeck <linux@roeck-us.net> Cc: Chen Gang <gang.chen.5i5j@gmail.com> Cc: Minchan Kim <minchan@kernel.org> Acked-by: Helge Deller <deller@gmx.de> [parisc] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent f4be615 commit dcd6c87

4 files changed

Lines changed: 0 additions & 4 deletions

File tree

‎arch/alpha/include/uapi/asm/mman.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
#define MADV_WILLNEED 3 /* will need these pages */
4848
#define MADV_SPACEAVAIL 5 /* ensure resources are available */
4949
#define MADV_DONTNEED 6 /* don't need these pages */
50-
#define MADV_FREE 7 /* free pages only if memory pressure */
5150

5251
/* common/generic parameters */
5352
#define MADV_FREE 8 /* free pages only if memory pressure */

‎arch/mips/include/uapi/asm/mman.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
#define MADV_SEQUENTIAL 2 /* expect sequential page references */
7474
#define MADV_WILLNEED 3 /* will need these pages */
7575
#define MADV_DONTNEED 4 /* don't need these pages */
76-
#define MADV_FREE 5 /* free pages only if memory pressure */
7776

7877
/* common parameters: try to keep these consistent across architectures */
7978
#define MADV_FREE 8 /* free pages only if memory pressure */

‎arch/parisc/include/uapi/asm/mman.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
#define MADV_SPACEAVAIL 5 /* insure that resources are reserved */
4444
#define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */
4545
#define MADV_VPS_INHERIT 7 /* Inherit parents page size */
46-
#define MADV_FREE 8 /* free pages only if memory pressure */
4746

4847
/* common/generic parameters */
4948
#define MADV_FREE 8 /* free pages only if memory pressure */

‎arch/xtensa/include/uapi/asm/mman.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
#define MADV_SEQUENTIAL 2 /* expect sequential page references */
8787
#define MADV_WILLNEED 3 /* will need these pages */
8888
#define MADV_DONTNEED 4 /* don't need these pages */
89-
#define MADV_FREE 5 /* free pages only if memory pressure */
9089

9190
/* common parameters: try to keep these consistent across architectures */
9291
#define MADV_FREE 8 /* free pages only if memory pressure */

0 commit comments

Comments
 (0)