[drm-tip:drm-tip 4/8] drivers/gpu/drm/lima/lima_ctx.c:26:46: error: incompatible type for argument 4 of 'xa_alloc'

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

 



tree:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
head:   093a2914c367de18bbf8d07d0b15ce63c43e5f9e
commit: 4e0795386a907989f92082c9f1af3c70dec46969 [4/8] Merge remote-tracking branch 'drm-misc/drm-misc-next' into drm-tip
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 4e0795386a907989f92082c9f1af3c70dec46969
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=xtensa 

All errors (new ones prefixed by >>):

   In file included from include/linux/kernel.h:7,
                    from include/asm-generic/bug.h:18,
                    from ./arch/xtensa/include/generated/asm/bug.h:1,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/gfp.h:5,
                    from include/linux/slab.h:15,
                    from drivers/gpu/drm/lima/lima_ctx.c:4:
   drivers/gpu/drm/lima/lima_ctx.c: In function 'lima_ctx_create':
   include/linux/limits.h:13:18: warning: passing argument 3 of 'xa_alloc' makes pointer from integer without a cast [-Wint-conversion]
    #define UINT_MAX (~0U)
                     ^~~~~
   drivers/gpu/drm/lima/lima_ctx.c:26:36: note: in expansion of macro 'UINT_MAX'
     err = xa_alloc(&mgr->handles, id, UINT_MAX, ctx, GFP_KERNEL);
                                       ^~~~~~~~
   In file included from include/linux/radix-tree.h:31,
                    from include/linux/idr.h:15,
                    from include/drm/drm_device.h:7,
                    from drivers/gpu/drm/lima/lima_device.h:7,
                    from drivers/gpu/drm/lima/lima_ctx.c:6:
   include/linux/xarray.h:817:9: note: expected 'void *' but argument is of type 'unsigned int'
      void *entry, struct xa_limit limit, gfp_t gfp)
      ~~~~~~^~~~~
>> drivers/gpu/drm/lima/lima_ctx.c:26:46: error: incompatible type for argument 4 of 'xa_alloc'
     err = xa_alloc(&mgr->handles, id, UINT_MAX, ctx, GFP_KERNEL);
                                                 ^~~
   In file included from include/linux/radix-tree.h:31,
                    from include/linux/idr.h:15,
                    from include/drm/drm_device.h:7,
                    from drivers/gpu/drm/lima/lima_device.h:7,
                    from drivers/gpu/drm/lima/lima_ctx.c:6:
   include/linux/xarray.h:817:32: note: expected 'struct xa_limit' but argument is of type 'struct lima_ctx *'
      void *entry, struct xa_limit limit, gfp_t gfp)
                   ~~~~~~~~~~~~~~~~^~~~~

vim +/xa_alloc +26 drivers/gpu/drm/lima/lima_ctx.c

a1d2a633 Qiang Yu 2019-03-09   5  
a1d2a633 Qiang Yu 2019-03-09  @6  #include "lima_device.h"
a1d2a633 Qiang Yu 2019-03-09   7  #include "lima_ctx.h"
a1d2a633 Qiang Yu 2019-03-09   8  
a1d2a633 Qiang Yu 2019-03-09   9  int lima_ctx_create(struct lima_device *dev, struct lima_ctx_mgr *mgr, u32 *id)
a1d2a633 Qiang Yu 2019-03-09  10  {
a1d2a633 Qiang Yu 2019-03-09  11  	struct lima_ctx *ctx;
a1d2a633 Qiang Yu 2019-03-09  12  	int i, err;
a1d2a633 Qiang Yu 2019-03-09  13  
a1d2a633 Qiang Yu 2019-03-09  14  	ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
a1d2a633 Qiang Yu 2019-03-09  15  	if (!ctx)
a1d2a633 Qiang Yu 2019-03-09  16  		return -ENOMEM;
a1d2a633 Qiang Yu 2019-03-09  17  	ctx->dev = dev;
a1d2a633 Qiang Yu 2019-03-09  18  	kref_init(&ctx->refcnt);
a1d2a633 Qiang Yu 2019-03-09  19  
a1d2a633 Qiang Yu 2019-03-09  20  	for (i = 0; i < lima_pipe_num; i++) {
a1d2a633 Qiang Yu 2019-03-09  21  		err = lima_sched_context_init(dev->pipe + i, ctx->context + i, &ctx->guilty);
a1d2a633 Qiang Yu 2019-03-09  22  		if (err)
a1d2a633 Qiang Yu 2019-03-09  23  			goto err_out0;
a1d2a633 Qiang Yu 2019-03-09  24  	}
a1d2a633 Qiang Yu 2019-03-09  25  
a1d2a633 Qiang Yu 2019-03-09 @26  	err = xa_alloc(&mgr->handles, id, UINT_MAX, ctx, GFP_KERNEL);
a1d2a633 Qiang Yu 2019-03-09  27  	if (err < 0)
a1d2a633 Qiang Yu 2019-03-09  28  		goto err_out0;
a1d2a633 Qiang Yu 2019-03-09  29  
a1d2a633 Qiang Yu 2019-03-09  30  	return 0;
a1d2a633 Qiang Yu 2019-03-09  31  
a1d2a633 Qiang Yu 2019-03-09  32  err_out0:
a1d2a633 Qiang Yu 2019-03-09  33  	for (i--; i >= 0; i--)
a1d2a633 Qiang Yu 2019-03-09  34  		lima_sched_context_fini(dev->pipe + i, ctx->context + i);
a1d2a633 Qiang Yu 2019-03-09  35  	kfree(ctx);
a1d2a633 Qiang Yu 2019-03-09  36  	return err;
a1d2a633 Qiang Yu 2019-03-09  37  }
a1d2a633 Qiang Yu 2019-03-09  38  

:::::: The code at line 26 was first introduced by commit
:::::: a1d2a6339961efc078208dc3b2f006e9e9a8e119 drm/lima: driver for ARM Mali4xx GPUs

:::::: TO: Qiang Yu <yuq825@xxxxxxxxx>
:::::: CC: Eric Anholt <eric@xxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
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