Expand INIT_STRUCT_PID and remove
authorDavid Howells <dhowells@redhat.com>
Tue, 2 Jan 2018 15:12:01 +0000 (15:12 +0000)
committerDavid Howells <dhowells@redhat.com>
Wed, 17 Jan 2018 11:30:16 +0000 (11:30 +0000)
Expand INIT_STRUCT_PID in the single place that uses it and then remove it.
There doesn't seem any point in the macro.

Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Tony Luck <tony.luck@intel.com>
Tested-by: Will Deacon <will.deacon@arm.com> (arm64)
Tested-by: Palmer Dabbelt <palmer@sifive.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/init_task.h
kernel/pid.c

index 5b5f413..a454b8a 100644 (file)
@@ -46,21 +46,6 @@ extern struct cred init_cred;
 #define INIT_CPU_TIMERS(s)
 #endif
 
-
-#define INIT_STRUCT_PID {                                              \
-       .count          = ATOMIC_INIT(1),                               \
-       .tasks          = {                                             \
-               { .first = NULL },                                      \
-               { .first = NULL },                                      \
-               { .first = NULL },                                      \
-       },                                                              \
-       .level          = 0,                                            \
-       .numbers        = { {                                           \
-               .nr             = 0,                                    \
-               .ns             = &init_pid_ns,                         \
-       }, }                                                            \
-}
-
 #define INIT_PID_LINK(type)                                    \
 {                                                              \
        .node = {                                               \
index b13b624..161af2e 100644 (file)
 #include <linux/sched/task.h>
 #include <linux/idr.h>
 
-struct pid init_struct_pid = INIT_STRUCT_PID;
+struct pid init_struct_pid = {
+       .count          = ATOMIC_INIT(1),
+       .tasks          = {
+               { .first = NULL },
+               { .first = NULL },
+               { .first = NULL },
+       },
+       .level          = 0,
+       .numbers        = { {
+               .nr             = 0,
+               .ns             = &init_pid_ns,
+       }, }
+};
 
 int pid_max = PID_MAX_DEFAULT;