* [linux-next:master 10655/11234] lib/test_printf.c:247:9: warning: 'PTR' macro redefined
@ 2022-01-07 14:04 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-01-07 14:04 UTC (permalink / raw)
To: Huang Pei
Cc: llvm, kbuild-all, Linux Memory Management List, Thomas Bogendoerfer
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 3770333b3f8cb7c9110889853afaa49777c26ea7
commit: f0b7ddbd794bdffade370f22bb7a774002208ef4 [10655/11234] MIPS: retire "asm/llsc.h"
config: mips-randconfig-r021-20220106 (https://download.01.org/0day-ci/archive/20220107/202201072233.KPabxSoa-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project ca7ffe09dc6e525109e3cd570cc5182ce568be13)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f0b7ddbd794bdffade370f22bb7a774002208ef4
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout f0b7ddbd794bdffade370f22bb7a774002208ef4
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
lib/test_printf.c:157:52: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]
test("0|1|1|128|255", "%hhu|%hhu|%hhu|%hhu|%hhu", 0, 1, 257, 128, -1);
~~~~ ^
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:157:55: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]
test("0|1|1|128|255", "%hhu|%hhu|%hhu|%hhu|%hhu", 0, 1, 257, 128, -1);
~~~~ ^
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:157:58: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]
test("0|1|1|128|255", "%hhu|%hhu|%hhu|%hhu|%hhu", 0, 1, 257, 128, -1);
~~~~ ^~~
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:157:63: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]
test("0|1|1|128|255", "%hhu|%hhu|%hhu|%hhu|%hhu", 0, 1, 257, 128, -1);
~~~~ ^~~
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:157:68: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]
test("0|1|1|128|255", "%hhu|%hhu|%hhu|%hhu|%hhu", 0, 1, 257, 128, -1);
~~~~ ^~
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:158:52: warning: format specifies type 'char' but the argument has type 'int' [-Wformat]
test("0|1|1|-128|-1", "%hhd|%hhd|%hhd|%hhd|%hhd", 0, 1, 257, 128, -1);
~~~~ ^
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:158:55: warning: format specifies type 'char' but the argument has type 'int' [-Wformat]
test("0|1|1|-128|-1", "%hhd|%hhd|%hhd|%hhd|%hhd", 0, 1, 257, 128, -1);
~~~~ ^
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:158:58: warning: format specifies type 'char' but the argument has type 'int' [-Wformat]
test("0|1|1|-128|-1", "%hhd|%hhd|%hhd|%hhd|%hhd", 0, 1, 257, 128, -1);
~~~~ ^~~
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:158:63: warning: format specifies type 'char' but the argument has type 'int' [-Wformat]
test("0|1|1|-128|-1", "%hhd|%hhd|%hhd|%hhd|%hhd", 0, 1, 257, 128, -1);
~~~~ ^~~
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:158:68: warning: format specifies type 'char' but the argument has type 'int' [-Wformat]
test("0|1|1|-128|-1", "%hhd|%hhd|%hhd|%hhd|%hhd", 0, 1, 257, 128, -1);
~~~~ ^~
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:159:41: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
test("2015122420151225", "%ho%ho%#ho", 1037, 5282, -11627);
~~~ ^~~~
%o
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:159:47: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
test("2015122420151225", "%ho%ho%#ho", 1037, 5282, -11627);
~~~ ^~~~
%o
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:159:53: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
test("2015122420151225", "%ho%ho%#ho", 1037, 5282, -11627);
~~~~ ^~~~~~
%#o
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
>> lib/test_printf.c:247:9: warning: 'PTR' macro redefined [-Wmacro-redefined]
#define PTR ((void *)0x456789ab)
^
arch/mips/include/asm/asm.h:288:9: note: previous definition is here
#define PTR .word
^
14 warnings generated.
vim +/PTR +247 lib/test_printf.c
ad67b74d2469d9 Tobin C. Harding 2017-11-01 245
ad67b74d2469d9 Tobin C. Harding 2017-11-01 246 #define PTR_WIDTH 8
ad67b74d2469d9 Tobin C. Harding 2017-11-01 @247 #define PTR ((void *)0x456789ab)
ad67b74d2469d9 Tobin C. Harding 2017-11-01 248 #define PTR_STR "456789ab"
ce041c43f22298 Thierry Escande 2018-06-13 249 #define PTR_VAL_NO_CRNG "(ptrval)"
3e5903eb9cff70 Petr Mladek 2019-04-17 250 #define ZEROS ""
7bd57fbc4a4dde Ilya Dryomov 2020-05-19 251 #define ONES ""
ad67b74d2469d9 Tobin C. Harding 2017-11-01 252
:::::: The code at line 247 was first introduced by commit
:::::: ad67b74d2469d9b82aaa572d76474c95bc484d57 printk: hash addresses printed with %p
:::::: TO: Tobin C. Harding <me@tobin.cc>
:::::: CC: Tobin C. Harding <me@tobin.cc>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* [linux-next:master 10655/11234] lib/test_printf.c:247:9: warning: 'PTR' macro redefined
@ 2022-01-07 14:04 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-01-07 14:04 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 9204 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 3770333b3f8cb7c9110889853afaa49777c26ea7
commit: f0b7ddbd794bdffade370f22bb7a774002208ef4 [10655/11234] MIPS: retire "asm/llsc.h"
config: mips-randconfig-r021-20220106 (https://download.01.org/0day-ci/archive/20220107/202201072233.KPabxSoa-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project ca7ffe09dc6e525109e3cd570cc5182ce568be13)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f0b7ddbd794bdffade370f22bb7a774002208ef4
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout f0b7ddbd794bdffade370f22bb7a774002208ef4
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
lib/test_printf.c:157:52: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]
test("0|1|1|128|255", "%hhu|%hhu|%hhu|%hhu|%hhu", 0, 1, 257, 128, -1);
~~~~ ^
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:157:55: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]
test("0|1|1|128|255", "%hhu|%hhu|%hhu|%hhu|%hhu", 0, 1, 257, 128, -1);
~~~~ ^
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:157:58: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]
test("0|1|1|128|255", "%hhu|%hhu|%hhu|%hhu|%hhu", 0, 1, 257, 128, -1);
~~~~ ^~~
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:157:63: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]
test("0|1|1|128|255", "%hhu|%hhu|%hhu|%hhu|%hhu", 0, 1, 257, 128, -1);
~~~~ ^~~
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:157:68: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]
test("0|1|1|128|255", "%hhu|%hhu|%hhu|%hhu|%hhu", 0, 1, 257, 128, -1);
~~~~ ^~
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:158:52: warning: format specifies type 'char' but the argument has type 'int' [-Wformat]
test("0|1|1|-128|-1", "%hhd|%hhd|%hhd|%hhd|%hhd", 0, 1, 257, 128, -1);
~~~~ ^
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:158:55: warning: format specifies type 'char' but the argument has type 'int' [-Wformat]
test("0|1|1|-128|-1", "%hhd|%hhd|%hhd|%hhd|%hhd", 0, 1, 257, 128, -1);
~~~~ ^
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:158:58: warning: format specifies type 'char' but the argument has type 'int' [-Wformat]
test("0|1|1|-128|-1", "%hhd|%hhd|%hhd|%hhd|%hhd", 0, 1, 257, 128, -1);
~~~~ ^~~
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:158:63: warning: format specifies type 'char' but the argument has type 'int' [-Wformat]
test("0|1|1|-128|-1", "%hhd|%hhd|%hhd|%hhd|%hhd", 0, 1, 257, 128, -1);
~~~~ ^~~
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:158:68: warning: format specifies type 'char' but the argument has type 'int' [-Wformat]
test("0|1|1|-128|-1", "%hhd|%hhd|%hhd|%hhd|%hhd", 0, 1, 257, 128, -1);
~~~~ ^~
%d
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:159:41: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
test("2015122420151225", "%ho%ho%#ho", 1037, 5282, -11627);
~~~ ^~~~
%o
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:159:47: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
test("2015122420151225", "%ho%ho%#ho", 1037, 5282, -11627);
~~~ ^~~~
%o
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/test_printf.c:159:53: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
test("2015122420151225", "%ho%ho%#ho", 1037, 5282, -11627);
~~~~ ^~~~~~
%#o
lib/test_printf.c:137:40: note: expanded from macro 'test'
__test(expect, strlen(expect), fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
>> lib/test_printf.c:247:9: warning: 'PTR' macro redefined [-Wmacro-redefined]
#define PTR ((void *)0x456789ab)
^
arch/mips/include/asm/asm.h:288:9: note: previous definition is here
#define PTR .word
^
14 warnings generated.
vim +/PTR +247 lib/test_printf.c
ad67b74d2469d9 Tobin C. Harding 2017-11-01 245
ad67b74d2469d9 Tobin C. Harding 2017-11-01 246 #define PTR_WIDTH 8
ad67b74d2469d9 Tobin C. Harding 2017-11-01 @247 #define PTR ((void *)0x456789ab)
ad67b74d2469d9 Tobin C. Harding 2017-11-01 248 #define PTR_STR "456789ab"
ce041c43f22298 Thierry Escande 2018-06-13 249 #define PTR_VAL_NO_CRNG "(ptrval)"
3e5903eb9cff70 Petr Mladek 2019-04-17 250 #define ZEROS ""
7bd57fbc4a4dde Ilya Dryomov 2020-05-19 251 #define ONES ""
ad67b74d2469d9 Tobin C. Harding 2017-11-01 252
:::::: The code at line 247 was first introduced by commit
:::::: ad67b74d2469d9b82aaa572d76474c95bc484d57 printk: hash addresses printed with %p
:::::: TO: Tobin C. Harding <me@tobin.cc>
:::::: CC: Tobin C. Harding <me@tobin.cc>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-07 14:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 14:04 [linux-next:master 10655/11234] lib/test_printf.c:247:9: warning: 'PTR' macro redefined kernel test robot
2022-01-07 14:04 ` kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.