From 2f37237054a1657c27f301c443c3260e4d175c1f Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 20 Mar 2013 15:08:43 +1100 Subject: [PATCH] pid_namespacec-h-simplify-defines-fix kernel/pid.c:54:1: warning: "BITS_PER_PAGE" redefined Cc: Raphael S.Carvalho Signed-off-by: Andrew Morton --- include/linux/pid_namespace.h | 1 + kernel/pid.c | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index e4ae94521e49..8ac32836690e 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h @@ -14,6 +14,7 @@ struct pidmap { }; #define BITS_PER_PAGE (PAGE_SIZE * 8) +#define BITS_PER_PAGE_MASK (BITS_PER_PAGE-1) #define PIDMAP_ENTRIES ((PID_MAX_LIMIT+BITS_PER_PAGE-1)/BITS_PER_PAGE) struct bsd_acct_struct; diff --git a/kernel/pid.c b/kernel/pid.c index 8147bdf22f36..6283d6412aff 100644 --- a/kernel/pid.c +++ b/kernel/pid.c @@ -51,9 +51,6 @@ int pid_max = PID_MAX_DEFAULT; int pid_max_min = RESERVED_PIDS + 1; int pid_max_max = PID_MAX_LIMIT; -#define BITS_PER_PAGE (PAGE_SIZE*8) -#define BITS_PER_PAGE_MASK (BITS_PER_PAGE-1) - static inline int mk_pid(struct pid_namespace *pid_ns, struct pidmap *map, int off) { -- 2.39.2