Skip to content

Commit e1e871a

Browse files
committed
Expand INIT_STRUCT_PID and remove
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>
1 parent 3678e2f commit e1e871a

2 files changed

Lines changed: 13 additions & 16 deletions

File tree

‎include/linux/init_task.h‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,6 @@ extern struct cred init_cred;
4646
#define INIT_CPU_TIMERS(s)
4747
#endif
4848

49-
50-
#define INIT_STRUCT_PID { \
51-
.count = ATOMIC_INIT(1), \
52-
.tasks = { \
53-
{ .first = NULL }, \
54-
{ .first = NULL }, \
55-
{ .first = NULL }, \
56-
}, \
57-
.level = 0, \
58-
.numbers = { { \
59-
.nr = 0, \
60-
.ns = &init_pid_ns, \
61-
}, } \
62-
}
63-
6449
#define INIT_PID_LINK(type) \
6550
{ \
6651
.node = { \

‎kernel/pid.c‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,19 @@
4141
#include <linux/sched/task.h>
4242
#include <linux/idr.h>
4343

44-
struct pid init_struct_pid = INIT_STRUCT_PID;
44+
struct pid init_struct_pid = {
45+
.count = ATOMIC_INIT(1),
46+
.tasks = {
47+
{ .first = NULL },
48+
{ .first = NULL },
49+
{ .first = NULL },
50+
},
51+
.level = 0,
52+
.numbers = { {
53+
.nr = 0,
54+
.ns = &init_pid_ns,
55+
}, }
56+
};
4557

4658
int pid_max = PID_MAX_DEFAULT;
4759

0 commit comments

Comments
 (0)