Hi Sebastian,

On Tue, Dec 16, 2025 at 04:11:45PM +0100, Sebastian Brzezinka wrote:
> CONFIG_RANDSTRUCT may reorder structure fields, which makes positional
> initializers unsafe. The i915 GT debugfs tables were using positional
> initializers for `struct intel_gt_debugfs_file`, and on configs where
> the layout differs (e.g., presence/absence of the `.eval` callback),
> this can lead to fields being initialized incorrectly and trigger
> randstruct warnings such as:
> 
> ```
>   drivers/gpu/drm/i915/gt/intel_gt_debugfs.c:75:51: note: randstruct:
>   casting between randomized structure pointer types (constructor)
> ```
> 
> Switch all the GT debugfs file arrays to designated initializers. This
> binds each value to the intended member regardless of structure
> reordering or optional members and removes the warning while preserving
> the intended initialization. Also drops the '&' from
> intel_eval_slpc_support so .eval receives the function pointer directly.
> 
> No functional change, only initialization style is updated.
> 
> Signed-off-by: Sebastian Brzezinka <[email protected]>
> Reviewed-by: Krzysztof Karas <[email protected]>

Reviewed and merged to drm-intel-gt-next.

Thanks,
Andi

Reply via email to