Skip to content

Commit

Permalink
Expand INIT_STRUCT_PID and remove
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Tony Luck <[email protected]>
Tested-by: Will Deacon <[email protected]> (arm64)
Tested-by: Palmer Dabbelt <[email protected]>
Acked-by: Thomas Gleixner <[email protected]>
  • Loading branch information
dhowells committed Jan 17, 2018
1 parent 3678e2f commit e1e871a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
15 changes: 0 additions & 15 deletions include/linux/init_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 = { \
Expand Down
14 changes: 13 additions & 1 deletion kernel/pid.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,19 @@
#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;

Expand Down

0 comments on commit e1e871a

Please sign in to comment.