Re: linux-next: build failure after merge of the drm-misc tree

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

 



On Tue, Apr 02, 2019 at 10:50:06AM +1100, Stephen Rothwell wrote:
> +++ b/drivers/gpu/drm/lima/lima_ctx.c
> @@ -23,7 +23,7 @@ int lima_ctx_create(struct lima_device *dev, struct lima_ctx_mgr *mgr, u32 *id)
>  			goto err_out0;
>  	}
>  
> -	err = xa_alloc(&mgr->handles, id, UINT_MAX, ctx, GFP_KERNEL);
> +	err = xa_alloc(&mgr->handles, id, ctx, XA_LIMIT(*id, UINT_MAX), GFP_KERNEL);
>  	if (err < 0)
>  		goto err_out0;

I agree that this is an exact translation of what the code was doing,
but I don't think it's what the author intended the code to do.
They almost certainly meant:

	err = xa_alloc(&mgr->handles, id, ctx, xa_limit_32b, GFP_KERNEL);

I'm basing this on:

+struct drm_lima_ctx_create {
+       __u32 id;          /* out, context handle */
+       __u32 _pad;        /* pad, must be zero */
+};

(and this confusion is exactly why I changed the API ...)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux