[Intel-gfx] [PATCH 1/2] dma-fence: Propagate errors to dma-fence-array container

kbuild test robot lkp at intel.com
Mon Mar 25 02:21:12 UTC 2019


Hi Chris,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.1-rc1 next-20190322]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Chris-Wilson/dma-fence-Propagate-errors-to-dma-fence-array-container/20190325-074009
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=sparc64 

All warnings (new ones prefixed by >>):

   In file included from arch/sparc/include/asm/cmpxchg.h:5:0,
                    from arch/sparc/include/asm/atomic_64.h:12,
                    from arch/sparc/include/asm/atomic.h:5,
                    from include/linux/atomic.h:7,
                    from include/asm-generic/bitops/lock.h:5,
                    from arch/sparc/include/asm/bitops_64.h:52,
                    from arch/sparc/include/asm/bitops.h:5,
                    from include/linux/bitops.h:19,
                    from include/linux/kernel.h:12,
                    from include/asm-generic/bug.h:18,
                    from arch/sparc/include/asm/bug.h:25,
                    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/dma-buf/dma-fence-array.c:21:
   drivers/dma-buf/dma-fence-array.c: In function 'dma_fence_array_cb_func':
   arch/sparc/include/asm/cmpxchg_64.h:199:3: warning: value computed is not used [-Wunused-value]
     ((__typeof__(*(ptr)))__cmpxchg_local((ptr), (unsigned long)(o), \
     ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       (unsigned long)(n), sizeof(*(ptr))))
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/dma-buf/dma-fence-array.c:50:3: note: in expansion of macro 'cmpxchg_local'
      cmpxchg_local(&array->base.error, 0, f->error);
      ^~~~~~~~~~~~~

vim +/cmpxchg_local +50 drivers/dma-buf/dma-fence-array.c

  > 21	#include <linux/slab.h>
    22	#include <linux/dma-fence-array.h>
    23	
    24	static const char *dma_fence_array_get_driver_name(struct dma_fence *fence)
    25	{
    26		return "dma_fence_array";
    27	}
    28	
    29	static const char *dma_fence_array_get_timeline_name(struct dma_fence *fence)
    30	{
    31		return "unbound";
    32	}
    33	
    34	static void irq_dma_fence_array_work(struct irq_work *wrk)
    35	{
    36		struct dma_fence_array *array = container_of(wrk, typeof(*array), work);
    37	
    38		dma_fence_signal(&array->base);
    39		dma_fence_put(&array->base);
    40	}
    41	
    42	static void dma_fence_array_cb_func(struct dma_fence *f,
    43					    struct dma_fence_cb *cb)
    44	{
    45		struct dma_fence_array_cb *array_cb =
    46			container_of(cb, struct dma_fence_array_cb, cb);
    47		struct dma_fence_array *array = array_cb->array;
    48	
    49		if (atomic_read(&array->num_pending) > 0)
  > 50			cmpxchg_local(&array->base.error, 0, f->error);
    51	
    52		if (atomic_dec_and_test(&array->num_pending))
    53			irq_work_queue(&array->work);
    54		else
    55			dma_fence_put(&array->base);
    56	}
    57	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 56723 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20190325/875e555f/attachment-0001.gz>


More information about the Intel-gfx mailing list