[mmotm:master 201/309] arch/m68k/include/asm/atomic.h:74:2: note: in expansion of macro 'ATOMIC_OP'

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

 



tree:   git://git.cmpxchg.org/linux-mmotm.git master
head:   90fbe8d8441dfa4fc00ac1bc49bc695ec2659b8e
commit: 5c3cf7b159aee92080899618bd0b578db6c0de85 [201/309] mm: move vmscan writes and file write accounting to the node
config: m68k-sun3_defconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 4.9.0
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 5c3cf7b159aee92080899618bd0b578db6c0de85
        # save the attached .config to linux build tree
        make.cross ARCH=m68k 

All warnings (new ones prefixed by >>):

   In file included from include/linux/atomic.h:4:0,
                    from include/linux/spinlock.h:406,
                    from include/linux/wait.h:8,
                    from include/linux/fs.h:5,
                    from include/linux/dax.h:4,
                    from mm/filemap.c:14:
   mm/filemap.c: In function '__delete_from_page_cache':
   arch/m68k/include/asm/atomic.h:36:2: warning: array subscript is above array bounds [-Warray-bounds]
     __asm__ __volatile__(#asm_op "l %1,%0" : "+m" (*v) : ASM_DI (i));\
     ^
>> arch/m68k/include/asm/atomic.h:74:2: note: in expansion of macro 'ATOMIC_OP'
     ATOMIC_OP(op, c_op, asm_op)     \
     ^
>> arch/m68k/include/asm/atomic.h:77:1: note: in expansion of macro 'ATOMIC_OPS'
    ATOMIC_OPS(add, +=, add)
    ^
--
   In file included from include/linux/atomic.h:4:0,
                    from include/linux/spinlock.h:406,
                    from include/linux/wait.h:8,
                    from include/linux/fs.h:5,
                    from mm/shmem.c:24:
   mm/shmem.c: In function 'shmem_add_to_page_cache':
   arch/m68k/include/asm/atomic.h:36:2: warning: array subscript is above array bounds [-Warray-bounds]
     __asm__ __volatile__(#asm_op "l %1,%0" : "+m" (*v) : ASM_DI (i));\
     ^
>> arch/m68k/include/asm/atomic.h:74:2: note: in expansion of macro 'ATOMIC_OP'
     ATOMIC_OP(op, c_op, asm_op)     \
     ^
>> arch/m68k/include/asm/atomic.h:77:1: note: in expansion of macro 'ATOMIC_OPS'
    ATOMIC_OPS(add, +=, add)
    ^

vim +/ATOMIC_OP +74 arch/m68k/include/asm/atomic.h

69f99746 Greg Ungerer       2010-09-08  30  #define	ASM_DI	"di"
49148020 Sam Ravnborg       2009-01-16  31  #endif
b417b717 Geert Uytterhoeven 2010-05-23  32  
d839bae4 Peter Zijlstra     2014-03-23  33  #define ATOMIC_OP(op, c_op, asm_op)					\
d839bae4 Peter Zijlstra     2014-03-23  34  static inline void atomic_##op(int i, atomic_t *v)			\
d839bae4 Peter Zijlstra     2014-03-23  35  {									\
d839bae4 Peter Zijlstra     2014-03-23 @36  	__asm__ __volatile__(#asm_op "l %1,%0" : "+m" (*v) : ASM_DI (i));\
d839bae4 Peter Zijlstra     2014-03-23  37  }									\
d839bae4 Peter Zijlstra     2014-03-23  38  
d839bae4 Peter Zijlstra     2014-03-23  39  #ifdef CONFIG_RMW_INSNS
d839bae4 Peter Zijlstra     2014-03-23  40  
d839bae4 Peter Zijlstra     2014-03-23  41  #define ATOMIC_OP_RETURN(op, c_op, asm_op)				\
d839bae4 Peter Zijlstra     2014-03-23  42  static inline int atomic_##op##_return(int i, atomic_t *v)		\
d839bae4 Peter Zijlstra     2014-03-23  43  {									\
d839bae4 Peter Zijlstra     2014-03-23  44  	int t, tmp;							\
d839bae4 Peter Zijlstra     2014-03-23  45  									\
d839bae4 Peter Zijlstra     2014-03-23  46  	__asm__ __volatile__(						\
d839bae4 Peter Zijlstra     2014-03-23  47  			"1:	movel %2,%1\n"				\
d839bae4 Peter Zijlstra     2014-03-23  48  			"	" #asm_op "l %3,%1\n"			\
d839bae4 Peter Zijlstra     2014-03-23  49  			"	casl %2,%1,%0\n"			\
d839bae4 Peter Zijlstra     2014-03-23  50  			"	jne 1b"					\
d839bae4 Peter Zijlstra     2014-03-23  51  			: "+m" (*v), "=&d" (t), "=&d" (tmp)		\
d839bae4 Peter Zijlstra     2014-03-23  52  			: "g" (i), "2" (atomic_read(v)));		\
d839bae4 Peter Zijlstra     2014-03-23  53  	return t;							\
69f99746 Greg Ungerer       2010-09-08  54  }
69f99746 Greg Ungerer       2010-09-08  55  
d839bae4 Peter Zijlstra     2014-03-23  56  #else
d839bae4 Peter Zijlstra     2014-03-23  57  
d839bae4 Peter Zijlstra     2014-03-23  58  #define ATOMIC_OP_RETURN(op, c_op, asm_op)				\
d839bae4 Peter Zijlstra     2014-03-23  59  static inline int atomic_##op##_return(int i, atomic_t * v)		\
d839bae4 Peter Zijlstra     2014-03-23  60  {									\
d839bae4 Peter Zijlstra     2014-03-23  61  	unsigned long flags;						\
d839bae4 Peter Zijlstra     2014-03-23  62  	int t;								\
d839bae4 Peter Zijlstra     2014-03-23  63  									\
d839bae4 Peter Zijlstra     2014-03-23  64  	local_irq_save(flags);						\
d839bae4 Peter Zijlstra     2014-03-23  65  	t = (v->counter c_op i);					\
d839bae4 Peter Zijlstra     2014-03-23  66  	local_irq_restore(flags);					\
d839bae4 Peter Zijlstra     2014-03-23  67  									\
d839bae4 Peter Zijlstra     2014-03-23  68  	return t;							\
69f99746 Greg Ungerer       2010-09-08  69  }
69f99746 Greg Ungerer       2010-09-08  70  
d839bae4 Peter Zijlstra     2014-03-23  71  #endif /* CONFIG_RMW_INSNS */
d839bae4 Peter Zijlstra     2014-03-23  72  
d839bae4 Peter Zijlstra     2014-03-23  73  #define ATOMIC_OPS(op, c_op, asm_op)					\
d839bae4 Peter Zijlstra     2014-03-23 @74  	ATOMIC_OP(op, c_op, asm_op)					\
d839bae4 Peter Zijlstra     2014-03-23  75  	ATOMIC_OP_RETURN(op, c_op, asm_op)
d839bae4 Peter Zijlstra     2014-03-23  76  
d839bae4 Peter Zijlstra     2014-03-23 @77  ATOMIC_OPS(add, +=, add)
d839bae4 Peter Zijlstra     2014-03-23  78  ATOMIC_OPS(sub, -=, sub)
d839bae4 Peter Zijlstra     2014-03-23  79  
74b1bc50 Peter Zijlstra     2014-04-23  80  ATOMIC_OP(and, &=, and)

:::::: The code at line 74 was first introduced by commit
:::::: d839bae4269aea46bff4133066a411cfba5c7c46 locking,arch,m68k: Fold atomic_ops

:::::: TO: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
:::::: CC: Ingo Molnar <mingo@xxxxxxxxxx>

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

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]