On Fri, Sep 19, 2025 at 02:15:27PM +0100, Tvrtko Ursulin wrote:
> Struct ttm_operation_ctx initializer in ttm_bo_init_validate assumes the
> order of the structure fields when it is configuring the interruptible
> flag.
> 
> Fix it by using named initialization.
> 
> Signed-off-by: Tvrtko Ursulin <[email protected]>
> ---
>  drivers/gpu/drm/ttm/ttm_bo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index 29423ceeec5c..e5f5d4aa5a47 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -1024,7 +1024,7 @@ int ttm_bo_init_validate(struct ttm_device *bdev, 
> struct ttm_buffer_object *bo,
>                        struct sg_table *sg, struct dma_resv *resv,
>                        void (*destroy) (struct ttm_buffer_object *))
>  {
> -     struct ttm_operation_ctx ctx = { interruptible, false };
> +     struct ttm_operation_ctx ctx = { .interruptible = interruptible };
>       int ret;
>  
>       ret = ttm_bo_init_reserved(bdev, bo, type, placement, alignment, &ctx,
> -- 
> 2.48.0
> 

Acked-by: Thadeu Lima de Souza Cascardo <[email protected]>

Reply via email to