mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Brajeswar Ghosh <brajeswar.linux@gmail.com>
Cc: kbuild-all@01.org, rth@twiddle.net, ink@jurassic.park.msu.ru,
	mattst88@gmail.com, parri.andrea@gmail.com, mingo@kernel.org,
	paulmck@linux.vnet.ibm.com, jrdr.linux@gmail.com,
	linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org,
	sabyasachi.linux@gmail.com
Subject: Re: [PATCH] include/asm/cmpxchg.h: Remove duplicate header
Date: Sat, 3 Nov 2018 09:51:47 +0800	[thread overview]
Message-ID: <201811030903.E92tPmvf%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181102152637.GA3105@hp-pavilion-15-notebook-pc-brajeswar>

[-- Attachment #1: Type: text/plain, Size: 5640 bytes --]

Hi Brajeswar,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on sof-driver-fuweitax/master]
[also build test ERROR on v4.19 next-20181102]
[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/Brajeswar-Ghosh/include-asm-cmpxchg-h-Remove-duplicate-header/20181103-072531
base:   https://github.com/fuweitax/linux master
config: alpha-allmodconfig (attached as .config)
compiler: alpha-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=alpha 

All error/warnings (new ones prefixed by >>):

   In file included from arch/alpha/include/asm/atomic.h:7:0,
                    from include/linux/atomic.h:5,
                    from include/linux/rcupdate.h:38,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from arch/alpha/kernel/asm-offsets.c:10:
   include/linux/atomic.h: In function 'atomic_inc_not_zero_hint':
>> arch/alpha/include/asm/cmpxchg.h:61:31: error: implicit declaration of function '__cmpxchg'; did you mean 'cmpxchg'? [-Werror=implicit-function-declaration]
     __ret = (__typeof__(*(ptr))) __cmpxchg((ptr),   \
                                  ^
>> arch/alpha/include/asm/atomic.h:205:38: note: in expansion of macro 'cmpxchg'
    #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new))
                                         ^~~~~~~
>> include/linux/atomic.h:596:9: note: in expansion of macro 'atomic_cmpxchg'
      val = atomic_cmpxchg(v, c, c + 1);
            ^~~~~~~~~~~~~~
   In file included from arch/alpha/include/asm/atomic.h:7:0,
                    from include/linux/atomic.h:5,
                    from include/linux/rcupdate.h:38,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from arch/alpha/kernel/asm-offsets.c:10:
   include/linux/debug_locks.h: In function '__debug_locks_off':
>> arch/alpha/include/asm/cmpxchg.h:50:3: error: implicit declaration of function '__xchg'; did you mean '____xchg'? [-Werror=implicit-function-declaration]
      __xchg((ptr), (unsigned long)_x_, sizeof(*(ptr))); \
      ^
>> include/linux/debug_locks.h:17:9: note: in expansion of macro 'xchg'
     return xchg(&debug_locks, 0);
            ^~~~
   include/linux/llist.h: In function 'llist_del_all':
>> arch/alpha/include/asm/cmpxchg.h:49:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     __ret = (__typeof__(*(ptr)))     \
             ^
>> include/linux/llist.h:234:9: note: in expansion of macro 'xchg'
     return xchg(&head->first, NULL);
            ^~~~
   cc1: some warnings being treated as errors
   make[2]: *** [arch/alpha/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [sub-make] Error 2

vim +61 arch/alpha/include/asm/cmpxchg.h

5ba840f9 Paul Gortmaker 2012-04-02  39  
fbfcd019 Andrea Parri   2018-02-27  40  /*
fbfcd019 Andrea Parri   2018-02-27  41   * The leading and the trailing memory barriers guarantee that these
fbfcd019 Andrea Parri   2018-02-27  42   * operations are fully ordered.
fbfcd019 Andrea Parri   2018-02-27  43   */
5ba840f9 Paul Gortmaker 2012-04-02  44  #define xchg(ptr, x)							\
5ba840f9 Paul Gortmaker 2012-04-02  45  ({									\
fbfcd019 Andrea Parri   2018-02-27  46  	__typeof__(*(ptr)) __ret;					\
5ba840f9 Paul Gortmaker 2012-04-02  47  	__typeof__(*(ptr)) _x_ = (x);					\
fbfcd019 Andrea Parri   2018-02-27  48  	smp_mb();							\
fbfcd019 Andrea Parri   2018-02-27 @49  	__ret = (__typeof__(*(ptr)))					\
fbfcd019 Andrea Parri   2018-02-27 @50  		__xchg((ptr), (unsigned long)_x_, sizeof(*(ptr)));	\
fbfcd019 Andrea Parri   2018-02-27  51  	smp_mb();							\
fbfcd019 Andrea Parri   2018-02-27  52  	__ret;								\
5ba840f9 Paul Gortmaker 2012-04-02  53  })
5ba840f9 Paul Gortmaker 2012-04-02  54  
5ba840f9 Paul Gortmaker 2012-04-02  55  #define cmpxchg(ptr, o, n)						\
5ba840f9 Paul Gortmaker 2012-04-02  56  ({									\
fbfcd019 Andrea Parri   2018-02-27  57  	__typeof__(*(ptr)) __ret;					\
5ba840f9 Paul Gortmaker 2012-04-02  58  	__typeof__(*(ptr)) _o_ = (o);					\
5ba840f9 Paul Gortmaker 2012-04-02  59  	__typeof__(*(ptr)) _n_ = (n);					\
fbfcd019 Andrea Parri   2018-02-27  60  	smp_mb();							\
fbfcd019 Andrea Parri   2018-02-27 @61  	__ret = (__typeof__(*(ptr))) __cmpxchg((ptr),			\
fbfcd019 Andrea Parri   2018-02-27  62  		(unsigned long)_o_, (unsigned long)_n_, sizeof(*(ptr)));\
fbfcd019 Andrea Parri   2018-02-27  63  	smp_mb();							\
fbfcd019 Andrea Parri   2018-02-27  64  	__ret;								\
5ba840f9 Paul Gortmaker 2012-04-02  65  })
5ba840f9 Paul Gortmaker 2012-04-02  66  

:::::: The code at line 61 was first introduced by commit
:::::: fbfcd0199170984bd3c2812e49ed0fe7b226959a locking/xchg/alpha: Remove superfluous memory barriers from the _local() variants

:::::: TO: Andrea Parri <parri.andrea@gmail.com>
:::::: CC: Ingo Molnar <mingo@kernel.org>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 52265 bytes --]

      parent reply	other threads:[~2018-11-03  2:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-02 15:26 Brajeswar Ghosh
2018-11-02 18:29 ` Michael Cree
2018-11-02 18:58   ` Souptick Joarder
2018-11-02 19:01     ` Matt Turner
2018-11-02 19:13       ` Souptick Joarder
2018-11-02 19:14         ` Matt Turner
2018-11-03  1:44 ` kbuild test robot
2018-11-03  1:51 ` kbuild test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201811030903.E92tPmvf%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=brajeswar.linux@gmail.com \
    --cc=ink@jurassic.park.msu.ru \
    --cc=jrdr.linux@gmail.com \
    --cc=kbuild-all@01.org \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=mingo@kernel.org \
    --cc=parri.andrea@gmail.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=rth@twiddle.net \
    --cc=sabyasachi.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®