[linux-next:master 5799/6035] arch/powerpc/include/asm/atomic.h:82:2: note: in expansion of macro 'ATOMIC_OP'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   5c4d1ca9cfa71d9515ce5946cfc6497d22b1108e
commit: c3e3459c92a22be17145cdd9d86a8acc74afa5cf [5799/6035] mm: move vmscan writes and file write accounting to the node
config: powerpc-linkstation_defconfig (attached as .config)
compiler: powerpc-linux-gnu-gcc (Debian 5.3.1-8) 5.3.1 20160205
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 c3e3459c92a22be17145cdd9d86a8acc74afa5cf
        # save the attached .config to linux build tree
        make.cross ARCH=powerpc 

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/powerpc/include/asm/atomic.h:52:2: warning: array subscript is above array bounds [-Warray-bounds]
     __asm__ __volatile__(      \
     ^
>> arch/powerpc/include/asm/atomic.h:82:2: note: in expansion of macro 'ATOMIC_OP'
     ATOMIC_OP(op, asm_op)      \
     ^
>> arch/powerpc/include/asm/atomic.h:85: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/powerpc/include/asm/atomic.h:52:2: warning: array subscript is above array bounds [-Warray-bounds]
     __asm__ __volatile__(      \
     ^
>> arch/powerpc/include/asm/atomic.h:82:2: note: in expansion of macro 'ATOMIC_OP'
     ATOMIC_OP(op, asm_op)      \
     ^
>> arch/powerpc/include/asm/atomic.h:85:1: note: in expansion of macro 'ATOMIC_OPS'
    ATOMIC_OPS(add, add)
    ^

vim +/ATOMIC_OP +82 arch/powerpc/include/asm/atomic.h

^1da177e include/asm-ppc/atomic.h          Linus Torvalds 2005-04-16  46  
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  47  #define ATOMIC_OP(op, asm_op)						\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  48  static __inline__ void atomic_##op(int a, atomic_t *v)			\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  49  {									\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  50  	int t;								\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  51  									\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26 @52  	__asm__ __volatile__(						\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  53  "1:	lwarx	%0,0,%3		# atomic_" #op "\n"			\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  54  	#asm_op " %0,%2,%0\n"						\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  55  	PPC405_ERR77(0,%3)						\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  56  "	stwcx.	%0,0,%3 \n"						\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  57  "	bne-	1b\n"							\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  58  	: "=&r" (t), "+m" (v->counter)					\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  59  	: "r" (a), "r" (&v->counter)					\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  60  	: "cc");							\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  61  }									\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  62  
dc53617c arch/powerpc/include/asm/atomic.h Boqun Feng     2016-01-06  63  #define ATOMIC_OP_RETURN_RELAXED(op, asm_op)				\
dc53617c arch/powerpc/include/asm/atomic.h Boqun Feng     2016-01-06  64  static inline int atomic_##op##_return_relaxed(int a, atomic_t *v)	\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  65  {									\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  66  	int t;								\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  67  									\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  68  	__asm__ __volatile__(						\
dc53617c arch/powerpc/include/asm/atomic.h Boqun Feng     2016-01-06  69  "1:	lwarx	%0,0,%3		# atomic_" #op "_return_relaxed\n"	\
dc53617c arch/powerpc/include/asm/atomic.h Boqun Feng     2016-01-06  70  	#asm_op " %0,%2,%0\n"						\
dc53617c arch/powerpc/include/asm/atomic.h Boqun Feng     2016-01-06  71  	PPC405_ERR77(0, %3)						\
dc53617c arch/powerpc/include/asm/atomic.h Boqun Feng     2016-01-06  72  "	stwcx.	%0,0,%3\n"						\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  73  "	bne-	1b\n"							\
dc53617c arch/powerpc/include/asm/atomic.h Boqun Feng     2016-01-06  74  	: "=&r" (t), "+m" (v->counter)					\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  75  	: "r" (a), "r" (&v->counter)					\
dc53617c arch/powerpc/include/asm/atomic.h Boqun Feng     2016-01-06  76  	: "cc");							\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  77  									\
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  78  	return t;							\
^1da177e include/asm-ppc/atomic.h          Linus Torvalds 2005-04-16  79  }
^1da177e include/asm-ppc/atomic.h          Linus Torvalds 2005-04-16  80  
dc53617c arch/powerpc/include/asm/atomic.h Boqun Feng     2016-01-06  81  #define ATOMIC_OPS(op, asm_op)						\
dc53617c arch/powerpc/include/asm/atomic.h Boqun Feng     2016-01-06 @82  	ATOMIC_OP(op, asm_op)						\
dc53617c arch/powerpc/include/asm/atomic.h Boqun Feng     2016-01-06  83  	ATOMIC_OP_RETURN_RELAXED(op, asm_op)
^1da177e include/asm-ppc/atomic.h          Linus Torvalds 2005-04-16  84  
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26 @85  ATOMIC_OPS(add, add)
af095dd6 arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-03-26  86  ATOMIC_OPS(sub, subf)
^1da177e include/asm-ppc/atomic.h          Linus Torvalds 2005-04-16  87  
d0b7eb6f arch/powerpc/include/asm/atomic.h Peter Zijlstra 2014-04-23  88  ATOMIC_OP(and, and)

:::::: The code at line 82 was first introduced by commit
:::::: dc53617c4a3f6ca35641dfd4279720365ce9f4da powerpc: atomic: Implement atomic{, 64}_*_return_* variants

:::::: TO: Boqun Feng <boqun.feng@xxxxxxxxx>
:::::: CC: Michael Ellerman <mpe@xxxxxxxxxxxxxx>

---
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]