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 Avoid stack protector vi...



details:   https://anonhg.NetBSD.org/src/rev/46fecc92c439
branches:  trunk
changeset: 993625:46fecc92c439
user:      kamil <kamil%NetBSD.org@localhost>
date:      Fri Sep 21 11:49:16 2018 +0000

description:
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.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_dma.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 70f4f30306db -r 46fecc92c439 sys/external/bsd/drm2/dist/drm/i915/i915_dma.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c    Fri Sep 21 11:31:50 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c    Fri Sep 21 11:49:16 2018 +0000
@@ -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 @@
        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;



Home | Main Index | Thread Index | Old Index