]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Use designated initializers for init/exit table
authorKees Cook <keescook@chromium.org>
Tue, 17 Aug 2021 23:33:57 +0000 (16:33 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 18 Aug 2021 09:55:40 +0000 (11:55 +0200)
commit90fd2194a0cc52eb7a61dfa6412a0e498c58c688
tree1826efae4790a780008a97a7bba915d17e810bcd
parentd5ef86b38e4c2a65d5c1d64d8d0f3fcf58aa0884
drm/i915: Use designated initializers for init/exit table

The kernel builds with -Werror=designated-init, and __designated_init
is used by CONFIG_GCC_PLUGIN_RANDSTRUCT for automatically selected (all
function pointer) structures. Include the field names in the init/exit
table. Avoids warnings like:

drivers/gpu/drm/i915/i915_module.c:59:4: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]

Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: David Airlie <airlied@linux.ie>
Cc: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Fixes: a04ea6ae7c67 ("drm/i915: Use a table for i915_init/exit (v2)")
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210817233357.2379455-1-keescook@chromium.org
drivers/gpu/drm/i915/i915_module.c