Module Name:    src
Committed By:   riastradh
Date:           Mon Aug 27 07:06:25 UTC 2018

Modified Files:
        src/sys/external/bsd/drm2/dist/drm/i915: i915_reg.h

Log Message:
Need braces around BUILD_BUG_ON_MSG.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h:1.3 src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h:1.4
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h:1.3	Mon Aug 27 04:58:23 2018
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h	Mon Aug 27 07:06:25 2018
@@ -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))

Reply via email to