diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2017-03-10 00:47:37 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-10 10:06:10 +0100 |
commit | 188540137a74980ae2f52092e82c01b35fbc5ed5 (patch) | |
tree | 83b155f6406308025636299a59c24ff023a312cd /drivers/gpu/drm/i915/selftests | |
parent | drm/i915/guc: Fix request re-submission after reset (diff) | |
download | linux-188540137a74980ae2f52092e82c01b35fbc5ed5.tar.xz linux-188540137a74980ae2f52092e82c01b35fbc5ed5.zip |
drivers/gpu/drm/i915/selftests/i915_selftest.c: fix build with gcc-4.4.4
gcc-4.4.4 has issues with anonymous union initializers.
In file included from drivers/gpu/drm/i915/selftests/i915_selftest.c:68:
drivers/gpu/drm/i915/selftests/i915_mock_selftests.h:11: error: unknown field 'mock' specified in initializer
drivers/gpu/drm/i915/selftests/i915_mock_selftests.h:11: warning: missing braces around initializer
drivers/gpu/drm/i915/selftests/i915_mock_selftests.h:11: warning: (near initialization for 'mock_selftests[0].<anonymous>')
drivers/gpu/drm/i915/selftests/i915_mock_selftests.h:12: error: unknown field 'mock' specified in initializer
drivers/gpu/drm/i915/selftests/i915_mock_selftests.h:13: error: unknown field 'm
...
Work around this.
Fixes: 953c7f82eb89 ("drm/i915: Provide a hook for selftests")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170310090314.3142-1-chris@chris-wilson.co.uk
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/selftests')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/i915_selftest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_selftest.c b/drivers/gpu/drm/i915/selftests/i915_selftest.c index 6ba3abb10c6f..addc5a599c4a 100644 --- a/drivers/gpu/drm/i915/selftests/i915_selftest.c +++ b/drivers/gpu/drm/i915/selftests/i915_selftest.c @@ -63,13 +63,13 @@ struct selftest { }; }; -#define selftest(n, f) [mock_##n] = { .name = #n, .mock = f }, +#define selftest(n, f) [mock_##n] = { .name = #n, { .mock = f } }, static struct selftest mock_selftests[] = { #include "i915_mock_selftests.h" }; #undef selftest -#define selftest(n, f) [live_##n] = { .name = #n, .live = f }, +#define selftest(n, f) [live_##n] = { .name = #n, { .live = f } }, static struct selftest live_selftests[] = { #include "i915_live_selftests.h" }; |