]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/blob - rt-patches/0034-bug-BUG_ON-WARN_ON-variants-dependend-on-RT-RT.patch
WAR:media:i2c:ov5693: add flip and mirror setting
[hercules2020/nv-tegra/linux-4.4.git] / rt-patches / 0034-bug-BUG_ON-WARN_ON-variants-dependend-on-RT-RT.patch
1 From e52e09be77de68a0380f9aabb8f0c40fa20c4ded Mon Sep 17 00:00:00 2001
2 From: Ingo Molnar <mingo@elte.hu>
3 Date: Fri, 3 Jul 2009 08:29:58 -0500
4 Subject: [PATCH 034/365] bug: BUG_ON/WARN_ON variants dependend on RT/!RT
5
6 Introduce RT/NON-RT WARN/BUG statements to avoid ifdefs in the code.
7
8 Signed-off-by: Ingo Molnar <mingo@elte.hu>
9 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
10 ---
11  include/asm-generic/bug.h | 14 ++++++++++++++
12  1 file changed, 14 insertions(+)
13
14 diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
15 index 630dd23..850e4d9 100644
16 --- a/include/asm-generic/bug.h
17 +++ b/include/asm-generic/bug.h
18 @@ -206,6 +206,20 @@ extern void warn_slowpath_null(const char *file, const int line);
19  # define WARN_ON_SMP(x)                        ({0;})
20  #endif
21  
22 +#ifdef CONFIG_PREEMPT_RT_BASE
23 +# define BUG_ON_RT(c)                  BUG_ON(c)
24 +# define BUG_ON_NONRT(c)               do { } while (0)
25 +# define WARN_ON_RT(condition)         WARN_ON(condition)
26 +# define WARN_ON_NONRT(condition)      do { } while (0)
27 +# define WARN_ON_ONCE_NONRT(condition) do { } while (0)
28 +#else
29 +# define BUG_ON_RT(c)                  do { } while (0)
30 +# define BUG_ON_NONRT(c)               BUG_ON(c)
31 +# define WARN_ON_RT(condition)         do { } while (0)
32 +# define WARN_ON_NONRT(condition)      WARN_ON(condition)
33 +# define WARN_ON_ONCE_NONRT(condition) WARN_ON_ONCE(condition)
34 +#endif
35 +
36  #endif /* __ASSEMBLY__ */
37  
38  #endif
39 -- 
40 2.7.4
41