[Intel-gfx] [drm-intel:drm-intel-next-queued 11/59] drivers/gpu/drm/i915/selftests/i915_mock_selftests.h:11: error: unknown field 'mock' specified in initializer

Chris Wilson chris at chris-wilson.co.uk
Tue Feb 14 11:40:54 UTC 2017


On Tue, Feb 14, 2017 at 06:32:17PM +0800, kbuild test robot wrote:
> tree:   git://anongit.freedesktop.org/drm-intel drm-intel-next-queued
> head:   d892e9398ecf6defc7972a62227b77dad6be20bd
> commit: 953c7f82eb890085c60dbe22578e883d6837c674 [11/59] drm/i915: Provide a hook for selftests
> config: x86_64-randconfig-s2-02141638 (attached as .config)
> compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
> reproduce:
>         git checkout 953c7f82eb890085c60dbe22578e883d6837c674
>         # save the attached .config to linux build tree
>         make ARCH=x86_64 
> 
> All errors (new ones prefixed by >>):
> 
>    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
>    cc1: warnings being treated as errors
> >> drivers/gpu/drm/i915/selftests/i915_mock_selftests.h:11: error: missing braces around initializer
>    drivers/gpu/drm/i915/selftests/i915_mock_selftests.h:11: error: (near initialization for 'mock_selftests[0].<anonymous>')
>    In file included from drivers/gpu/drm/i915/selftests/i915_selftest.c:74:
> >> drivers/gpu/drm/i915/selftests/i915_live_selftests.h:11: error: unknown field 'live' specified in initializer
> >> drivers/gpu/drm/i915/selftests/i915_live_selftests.h:11: error: missing braces around initializer
>    drivers/gpu/drm/i915/selftests/i915_live_selftests.h:11: error: (near initialization for 'live_selftests[0].<anonymous>')
> >> drivers/gpu/drm/i915/selftests/i915_live_selftests.h:11: error: initialization from incompatible pointer type
> 
> vim +/mock +11 drivers/gpu/drm/i915/selftests/i915_mock_selftests.h
> 
>      5	 *
>      6	 * The function should be of type int function(void). It may be conditionally
>      7	 * compiled using #if IS_ENABLED(DRM_I915_SELFTEST).
>      8	 *
>      9	 * Tests are executed in order by igt/drv_selftest
>     10	 */
>   > 11	selftest(sanitycheck, i915_mock_sanitycheck) /* keep first (igt selfcheck) */

This is a named initializer for an anonymous union. It wasn't supported in
gcc until 4.6 :|
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list