Re: [RFC 2/3] drm/i915: Extend I915_PARAMS_FOR_EACH with default member value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Michal Wajdeczko (2017-09-22 15:27:25)
> 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.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>

Overall, I think this is a positive change. I'm not completely happy
that the param() macro is more readable than the struct assignment, but
that is offset by the reduction in duplication.

Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux