meta-agl-profile-telematics: recipes-core: systemd: change canbus systemd match regex
[AGL/meta-agl.git] / meta-agl-bsp / meta-intel / recipes-kernel / lttng / lttng-modules / BUILD_RUNTIME_BUG_ON-vs-gcc7.patch
1 From ab07574ef90fa510f293c37897d577066a88fe0d Mon Sep 17 00:00:00 2001
2 From: Nathan Lynch <nathan_lynch@mentor.com>
3 Date: Tue, 25 Apr 2017 16:26:57 -0500
4 Subject: [PATCH] BUILD_RUNTIME_BUG_ON vs gcc7
5
6 Avoid using LTTng's BUILD_RUNTIME_BUG_ON macro, as it appears to run
7 into a similar problem as Linux experienced with ilog2.
8
9 See:
10 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=474c90156c8dcc2fa815e6716cc9394d7930cb9c
11 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
12
13 Upstream-Status: Pending
14 Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
15 ---
16  lib/align.h | 4 ++--
17  1 file changed, 2 insertions(+), 2 deletions(-)
18
19 diff --git a/lib/align.h b/lib/align.h
20 index 5b91ae87410b..5e134cd485fe 100644
21 --- a/lib/align.h
22 +++ b/lib/align.h
23 @@ -48,7 +48,7 @@
24   */
25  #define offset_align(align_drift, alignment)                                  \
26         ({                                                                     \
27 -               BUILD_RUNTIME_BUG_ON((alignment) == 0                          \
28 +               BUG_ON((alignment) == 0                                        \
29                                    || ((alignment) & ((alignment) - 1)));      \
30                 (((alignment) - (align_drift)) & ((alignment) - 1));           \
31         })
32 @@ -63,7 +63,7 @@
33   */
34  #define offset_align_floor(align_drift, alignment)                            \
35         ({                                                                     \
36 -               BUILD_RUNTIME_BUG_ON((alignment) == 0                          \
37 +               BUG_ON((alignment) == 0                                        \
38                                    || ((alignment) & ((alignment) - 1)));      \
39                 (((align_drift) - (alignment)) & ((alignment) - 1));           \
40         })
41 -- 
42 2.9.3
43