Module Name:    src
Committed By:   kamil
Date:           Fri Sep 21 11:49:16 UTC 2018

Modified Files:
        src/sys/external/bsd/drm2/dist/drm/i915: i915_dma.c

Log Message:
Avoid stack protector violation

'const int' is not a real constant in C and it cannot be used to define an
array with a number of elements, as it's turned into a variable length
array.

Triggered by GCC when building with more debug options.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c

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_dma.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c:1.26 src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c:1.27
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c:1.26	Thu Sep 13 08:25:55 2018
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c	Fri Sep 21 11:49:16 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: i915_dma.c,v 1.26 2018/09/13 08:25:55 mrg Exp $	*/
+/*	$NetBSD: i915_dma.c,v 1.27 2018/09/21 11:49:16 kamil Exp $	*/
 
 /* i915_dma.c -- DMA support for the I915 -*- linux-c -*-
  */
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_dma.c,v 1.26 2018/09/13 08:25:55 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_dma.c,v 1.27 2018/09/21 11:49:16 kamil Exp $");
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
@@ -705,7 +705,7 @@ static void broadwell_sseu_info_init(str
 	struct intel_device_info *info;
 	const int s_max = 3, ss_max = 3, eu_max = 8;
 	int s, ss;
-	u32 fuse2, eu_disable[s_max], s_enable, ss_disable;
+	u32 fuse2, eu_disable[3], s_enable, ss_disable;
 
 	fuse2 = I915_READ(GEN8_FUSE2);
 	s_enable = (fuse2 & GEN8_F2_S_ENA_MASK) >> GEN8_F2_S_ENA_SHIFT;

Reply via email to