2020-06-15 14:38:03

by kernel test robot

[permalink] [raw]
Subject: drivers/reset/reset-intel-gw.c:18:9: warning: 'REG_OFFSET' macro redefined

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b3a9e3b9622ae10064826dccb4f7a52bd88c7407
commit: e44ab4e14d6f4c448ae555132090c1a116b19e5c regmap: Simplify implementation of the regmap_read_poll_timeout() macro
date: 8 weeks ago
config: arm-randconfig-r022-20200615 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3d8149c2a1228609fd7d7c91a04681304a2f0ca9)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git checkout e44ab4e14d6f4c448ae555132090c1a116b19e5c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/reset/reset-intel-gw.c:18:9: warning: 'REG_OFFSET' macro redefined [-Wmacro-redefined]
#define REG_OFFSET GENMASK(31, 16)
^
arch/arm/mach-ixp4xx/include/mach/platform.h:25:9: note: previous definition is here
#define REG_OFFSET 3
^
1 warning generated.

vim +/REG_OFFSET +18 drivers/reset/reset-intel-gw.c

c9aef213e38cde Dilip Kota 2020-01-03 17
c9aef213e38cde Dilip Kota 2020-01-03 @18 #define REG_OFFSET GENMASK(31, 16)
c9aef213e38cde Dilip Kota 2020-01-03 19 #define BIT_OFFSET GENMASK(15, 8)
c9aef213e38cde Dilip Kota 2020-01-03 20 #define STAT_BIT_OFFSET GENMASK(7, 0)
c9aef213e38cde Dilip Kota 2020-01-03 21

:::::: The code at line 18 was first introduced by commit
:::::: c9aef213e38cde27d4689a5cbe25a7c1b1db9fad reset: intel: Add system reset controller driver

:::::: TO: Dilip Kota <[email protected]>
:::::: CC: Philipp Zabel <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]


Attachments:
(No filename) (2.11 kB)
.config.gz (40.16 kB)
Download all attachments

2020-06-15 19:24:33

by Dejin Zheng

[permalink] [raw]
Subject: Re: drivers/reset/reset-intel-gw.c:18:9: warning: 'REG_OFFSET' macro redefined

On Mon, Jun 15, 2020 at 10:33:12PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: b3a9e3b9622ae10064826dccb4f7a52bd88c7407
> commit: e44ab4e14d6f4c448ae555132090c1a116b19e5c regmap: Simplify implementation of the regmap_read_poll_timeout() macro
> date: 8 weeks ago
> config: arm-randconfig-r022-20200615 (attached as .config)
> compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3d8149c2a1228609fd7d7c91a04681304a2f0ca9)
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # install arm cross compiling tool for clang build
> # apt-get install binutils-arm-linux-gnueabi
> git checkout e44ab4e14d6f4c448ae555132090c1a116b19e5c
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <[email protected]>
>
Hi

I sent a patch to fix it, and now the patch is currently under review.
https://lkml.org/lkml/2020/6/4/606

BR,
Dejin

> All warnings (new ones prefixed by >>, old ones prefixed by <<):
>
> >> drivers/reset/reset-intel-gw.c:18:9: warning: 'REG_OFFSET' macro redefined [-Wmacro-redefined]
> #define REG_OFFSET GENMASK(31, 16)
> ^
> arch/arm/mach-ixp4xx/include/mach/platform.h:25:9: note: previous definition is here
> #define REG_OFFSET 3
> ^
> 1 warning generated.
>
> vim +/REG_OFFSET +18 drivers/reset/reset-intel-gw.c
>
> c9aef213e38cde Dilip Kota 2020-01-03 17
> c9aef213e38cde Dilip Kota 2020-01-03 @18 #define REG_OFFSET GENMASK(31, 16)
> c9aef213e38cde Dilip Kota 2020-01-03 19 #define BIT_OFFSET GENMASK(15, 8)
> c9aef213e38cde Dilip Kota 2020-01-03 20 #define STAT_BIT_OFFSET GENMASK(7, 0)
> c9aef213e38cde Dilip Kota 2020-01-03 21
>
> :::::: The code at line 18 was first introduced by commit
> :::::: c9aef213e38cde27d4689a5cbe25a7c1b1db9fad reset: intel: Add system reset controller driver
>
> :::::: TO: Dilip Kota <[email protected]>
> :::::: CC: Philipp Zabel <[email protected]>
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/[email protected]