Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915 Need braces around BUILD...



details:   https://anonhg.NetBSD.org/src/rev/cf63dfd507bf
branches:  trunk
changeset: 992582:cf63dfd507bf
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:06:25 2018 +0000

description:
Need braces around BUILD_BUG_ON_MSG.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_reg.h |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r f0cbab5a1e0d -r cf63dfd507bf sys/external/bsd/drm2/dist/drm/i915/i915_reg.h
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h    Mon Aug 27 07:06:11 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h    Mon Aug 27 07:06:25 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_reg.h,v 1.3 2018/08/27 04:58:23 riastradh Exp $   */
+/*     $NetBSD: i915_reg.h,v 1.4 2018/08/27 07:06:25 riastradh Exp $   */
 
 /* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
  * All Rights Reserved.
@@ -37,13 +37,16 @@
                               (port) == PORT_B ? (b) : (c))
 
 #define _MASKED_FIELD(mask, value) ({                                     \
-       if (__builtin_constant_p(mask))                                    \
+       if (__builtin_constant_p(mask)) {                                  \
                BUILD_BUG_ON_MSG(((mask) & 0xffff0000), "Incorrect mask"); \
-       if (__builtin_constant_p(value))                                   \
+       }                                                                  \
+       if (__builtin_constant_p(value)) {                                 \
                BUILD_BUG_ON_MSG((value) & 0xffff0000, "Incorrect value"); \
-       if (__builtin_constant_p(mask) && __builtin_constant_p(value))     \
+       }                                                                  \
+       if (__builtin_constant_p(mask) && __builtin_constant_p(value)) {   \
                BUILD_BUG_ON_MSG((value) & ~(mask),                        \
                                 "Incorrect value for mask");              \
+       }                                                                  \
        (mask) << 16 | (value); })
 #define _MASKED_BIT_ENABLE(a)  ({ typeof(a) _a = (a); _MASKED_FIELD(_a, _a); })
 #define _MASKED_BIT_DISABLE(a) (_MASKED_FIELD((a), 0))



Home | Main Index | Thread Index | Old Index