drm/i915: Extend I915_PARAMS_FOR_EACH with default member value
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 25 Sep 2017 10:50:07 +0000 (10:50 +0000)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Tue, 26 Sep 2017 08:22:23 +0000 (11:22 +0300)
commit7075cb855d493487805ecf113874c04218d16014
tree1da7f4dbe1f5b47101b754e522bff959664fb6f1
parent54fea2b974a076799e427e50644de7c6ca662be5
drm/i915: Extend I915_PARAMS_FOR_EACH with default member value

By combining default value into helper macro we can initialize
modparams struct in the same automatic way as it was declared.
This will initialize members in the same order as declared
and additionally will disallow declaring new member without
proper default value for it.

v2: make MEMBER macro more robust (Joonas)

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170925105008.46060-2-michal.wajdeczko@intel.com
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_gpu_error.c
drivers/gpu/drm/i915/i915_params.c
drivers/gpu/drm/i915/i915_params.h