Module Name: src
Committed By: kamil
Date: Fri Jul 6 12:19:56 UTC 2018
Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915: i915_reg.h
Log Message:
Remove UB from definition of symbols in i915_reg.h
Kernel Undefined Behavior Sanitizer enforces more warnings in build time.
This makes the build fatal in the drm/i915 code in:
- intel_ddi_put_crtc_pll(),
- intel_ddi_clock_get(),
- intel_ddi_pll_enable(),
- intel_ddi_setup_hw_pll_state().
The error message in all the cases says:
error: case label does not reduce to an integer constant
Set the type of the value left shifted to unsigned.
This change is required to build NetBSD/amd64 with KUBSan.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
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.1.1.2 src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h:1.2
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h:1.1.1.2 Wed Jul 16 19:35:25 2014
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h Fri Jul 6 12:19:56 2018
@@ -5426,10 +5426,10 @@ enum punit_power_well {
#define PORT_CLK_SEL_LCPLL_1350 (1<<29)
#define PORT_CLK_SEL_LCPLL_810 (2<<29)
#define PORT_CLK_SEL_SPLL (3<<29)
-#define PORT_CLK_SEL_WRPLL1 (4<<29)
-#define PORT_CLK_SEL_WRPLL2 (5<<29)
-#define PORT_CLK_SEL_NONE (7<<29)
-#define PORT_CLK_SEL_MASK (7<<29)
+#define PORT_CLK_SEL_WRPLL1 (4U<<29)
+#define PORT_CLK_SEL_WRPLL2 (5U<<29)
+#define PORT_CLK_SEL_NONE (7U<<29)
+#define PORT_CLK_SEL_MASK (7U<<29)
/* Transcoder clock selection */
#define TRANS_CLK_SEL_A 0x46140