linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: Remove duplicate definitions of MADV_FREE
@ 2016-01-18  3:29 Guenter Roeck
  2016-01-18  8:23 ` Helge Deller
  0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2016-01-18  3:29 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Richard Henderson, Ralf Baechle, Helge Deller, Chris Zankel,
	linux-alpha, linux-kernel, linux-mips, linux-parisc, linux-xtensa,
	Guenter Roeck, Chen Gang, Minchan Kim

Commits 21f55b018ba5 ("arch/*/include/uapi/asm/mman.h: : let MADV_FREE
have same value for all architectures") and ef58978f1eaa ("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: 21f55b018ba5 ("arch/*/include/uapi/asm/mman.h: : let MADV_FREE have same value for all architectures")
Fixes: ef58978f1eaa ("mm: define MADV_FREE for some arches")
Cc: Chen Gang <gang.chen.5i5j@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 arch/alpha/include/uapi/asm/mman.h  | 1 -
 arch/mips/include/uapi/asm/mman.h   | 1 -
 arch/parisc/include/uapi/asm/mman.h | 1 -
 arch/xtensa/include/uapi/asm/mman.h | 1 -
 4 files changed, 4 deletions(-)

diff --git a/arch/alpha/include/uapi/asm/mman.h b/arch/alpha/include/uapi/asm/mman.h
index ab336c06153e..fec1947b8dbc 100644
--- a/arch/alpha/include/uapi/asm/mman.h
+++ b/arch/alpha/include/uapi/asm/mman.h
@@ -47,7 +47,6 @@
 #define MADV_WILLNEED	3		/* will need these pages */
 #define	MADV_SPACEAVAIL	5		/* ensure resources are available */
 #define MADV_DONTNEED	6		/* don't need these pages */
-#define MADV_FREE	7		/* free pages only if memory pressure */
 
 /* common/generic parameters */
 #define MADV_FREE	8		/* free pages only if memory pressure */
diff --git a/arch/mips/include/uapi/asm/mman.h b/arch/mips/include/uapi/asm/mman.h
index b0ebe59f73fd..ccdcfcbb24aa 100644
--- a/arch/mips/include/uapi/asm/mman.h
+++ b/arch/mips/include/uapi/asm/mman.h
@@ -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 */
diff --git a/arch/parisc/include/uapi/asm/mman.h b/arch/parisc/include/uapi/asm/mman.h
index cf830d465f75..f3db7d8eb0c2 100644
--- a/arch/parisc/include/uapi/asm/mman.h
+++ b/arch/parisc/include/uapi/asm/mman.h
@@ -43,7 +43,6 @@
 #define MADV_SPACEAVAIL 5               /* insure that resources are reserved */
 #define MADV_VPS_PURGE  6               /* Purge pages from VM page cache */
 #define MADV_VPS_INHERIT 7              /* Inherit parents page size */
-#define MADV_FREE	8		/* free pages only if memory pressure */
 
 /* common/generic parameters */
 #define MADV_FREE	8		/* free pages only if memory pressure */
diff --git a/arch/xtensa/include/uapi/asm/mman.h b/arch/xtensa/include/uapi/asm/mman.h
index d030594ed22b..9e079d49e7f2 100644
--- a/arch/xtensa/include/uapi/asm/mman.h
+++ b/arch/xtensa/include/uapi/asm/mman.h
@@ -86,7 +86,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 */
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm: Remove duplicate definitions of MADV_FREE
  2016-01-18  3:29 [PATCH] mm: Remove duplicate definitions of MADV_FREE Guenter Roeck
@ 2016-01-18  8:23 ` Helge Deller
  0 siblings, 0 replies; 2+ messages in thread
From: Helge Deller @ 2016-01-18  8:23 UTC (permalink / raw)
  To: Guenter Roeck, Andrew Morton
  Cc: Richard Henderson, Ralf Baechle, Chris Zankel, linux-alpha,
	linux-kernel, linux-mips, linux-parisc, Chen Gang, Minchan Kim

On 18.01.2016 04:29, Guenter Roeck wrote:
> Commits 21f55b018ba5 ("arch/*/include/uapi/asm/mman.h: : let MADV_FREE
> have same value for all architectures") and ef58978f1eaa ("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: 21f55b018ba5 ("arch/*/include/uapi/asm/mman.h: : let MADV_FREE have same value for all architectures")
> Fixes: ef58978f1eaa ("mm: define MADV_FREE for some arches")
> Cc: Chen Gang <gang.chen.5i5j@gmail.com>
> Cc: Minchan Kim <minchan@kernel.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>


On parisc both definitions of MADV_FREE are 8, so I do not face the compiler error.
Nevertheless it should be cleaned up.

Acked-by: Helge Deller <deller@gmx.de>  (for parisc)

Thanks!
Helge

> ---
>  arch/alpha/include/uapi/asm/mman.h  | 1 -
>  arch/mips/include/uapi/asm/mman.h   | 1 -
>  arch/parisc/include/uapi/asm/mman.h | 1 -
>  arch/xtensa/include/uapi/asm/mman.h | 1 -
>  4 files changed, 4 deletions(-)
> 
> diff --git a/arch/parisc/include/uapi/asm/mman.h b/arch/parisc/include/uapi/asm/mman.h
> index cf830d465f75..f3db7d8eb0c2 100644
> --- a/arch/parisc/include/uapi/asm/mman.h
> +++ b/arch/parisc/include/uapi/asm/mman.h
> @@ -43,7 +43,6 @@
>  #define MADV_SPACEAVAIL 5               /* insure that resources are reserved */
>  #define MADV_VPS_PURGE  6               /* Purge pages from VM page cache */
>  #define MADV_VPS_INHERIT 7              /* Inherit parents page size */
> -#define MADV_FREE	8		/* free pages only if memory pressure */
>  
>  /* common/generic parameters */
>  #define MADV_FREE	8		/* free pages only if memory pressure */

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-18  8:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-18  3:29 [PATCH] mm: Remove duplicate definitions of MADV_FREE Guenter Roeck
2016-01-18  8:23 ` Helge Deller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).