]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/blob - rt-patches/0118-wait.h-include-atomic.h.patch
rt_patches: required rebase due to printk change
[hercules2020/nv-tegra/linux-4.4.git] / rt-patches / 0118-wait.h-include-atomic.h.patch
1 From 3ab22b5eed16453d92b83c865471b2e20178f626 Mon Sep 17 00:00:00 2001
2 From: Grygorii Strashko <Grygorii.Strashko@linaro.org>
3 Date: Tue, 21 Jul 2015 19:43:56 +0300
4 Subject: [PATCH 118/366] wait.h: include atomic.h
5
6 This patch fixes build error:
7   CC      kernel/pid_namespace.o
8 In file included from kernel/pid_namespace.c:11:0:
9 include/linux/pid.h: In function 'get_pid':
10 include/linux/pid.h:78:3: error: implicit declaration of function 'atomic_inc' [-Werror=implicit-function-declaration]
11    atomic_inc(&pid->count);
12    ^
13 which happens when
14  CONFIG_PROVE_LOCKING=n
15  CONFIG_DEBUG_SPINLOCK=n
16  CONFIG_DEBUG_MUTEXES=n
17  CONFIG_DEBUG_LOCK_ALLOC=n
18  CONFIG_PID_NS=y
19
20 Vanilla gets this via spinlock.h.
21
22 Signed-off-by: Grygorii Strashko <Grygorii.Strashko@linaro.org>
23 Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
24 ---
25  include/linux/pid.h | 1 +
26  1 file changed, 1 insertion(+)
27
28 diff --git a/include/linux/pid.h b/include/linux/pid.h
29 index 97b745d..01a5460 100644
30 --- a/include/linux/pid.h
31 +++ b/include/linux/pid.h
32 @@ -2,6 +2,7 @@
33  #define _LINUX_PID_H
34  
35  #include <linux/rcupdate.h>
36 +#include <linux/atomic.h>
37  
38  enum pid_type
39  {
40 -- 
41 1.9.1
42