[xilinx-xlnx:release-2020.2.2_k26 128/241] include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast
From: kernel test robot <hidden>
Date: 2021-11-13 00:33:06
Also in:
oe-kbuild-all
tree: https://github.com/Xilinx/linux-xlnx release-2020.2.2_k26 head: 4731ff5042ce76fc145bc2797faa2d91b090675e commit: e966fbb13383eec0f1d1ab444b248bd0653d2c05 [128/241] net: xilinx: axiethernet: Add check for transmit data FIFO vacancy config: x86_64-allyesconfig (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://github.com/Xilinx/linux-xlnx/commit/e966fbb13383eec0f1d1ab444b248bd0653d2c05 git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx git fetch --no-tags xilinx-xlnx release-2020.2.2_k26 git checkout e966fbb13383eec0f1d1ab444b248bd0653d2c05 # save the attached .config to linux build tree mkdir build_dir make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/block/ drivers/infiniband/hw/qib/ drivers/infiniband/ulp/opa_vnic/ drivers/net/ drivers/staging/gasket/ drivers/xen/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <redacted> All warnings (new ones prefixed by >>): In file included from include/linux/kernel.h:14, from include/linux/clk.h:13, from drivers/net/ethernet/xilinx/xilinx_axienet_main.c:25: drivers/net/ethernet/xilinx/xilinx_axienet_main.c: In function 'axienet_create_tsheader':
quoted
include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast
12 | (void)(&__dummy == &__dummy2); \
| ^~
include/linux/spinlock.h:249:3: note: in expansion of macro 'typecheck'
249 | typecheck(unsigned long, flags); \
| ^~~~~~~~~
include/linux/spinlock.h:368:2: note: in expansion of macro 'raw_spin_lock_irqsave'
368 | raw_spin_lock_irqsave(spinlock_check(lock), flags); \
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1058:3: note: in expansion of macro 'spin_lock_irqsave'
1058 | spin_lock_irqsave(&lp->ptp_tx_lock, flags);
| ^~~~~~~~~~~~~~~~~
drivers/net/ethernet/xilinx/xilinx_axienet_main.c: In function 'axienet_queue_xmit':
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1253:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
1253 | const struct ethhdr *eth;
| ^~~~~
vim +12 include/linux/typecheck.h
e0deaff470900a Andrew Morton 2008-07-25 4
e0deaff470900a Andrew Morton 2008-07-25 5 /*
e0deaff470900a Andrew Morton 2008-07-25 6 * Check at compile time that something is of a particular type.
e0deaff470900a Andrew Morton 2008-07-25 7 * Always evaluates to 1 so you may use it easily in comparisons.
e0deaff470900a Andrew Morton 2008-07-25 8 */
e0deaff470900a Andrew Morton 2008-07-25 9 #define typecheck(type,x) \
e0deaff470900a Andrew Morton 2008-07-25 10 ({ type __dummy; \
e0deaff470900a Andrew Morton 2008-07-25 11 typeof(x) __dummy2; \
e0deaff470900a Andrew Morton 2008-07-25 @12 (void)(&__dummy == &__dummy2); \
e0deaff470900a Andrew Morton 2008-07-25 13 1; \
e0deaff470900a Andrew Morton 2008-07-25 14 })
e0deaff470900a Andrew Morton 2008-07-25 15
:::::: The code at line 12 was first introduced by commit
:::::: e0deaff470900a4c3222ca7139f6c9639e26a2f5 split the typecheck macros out of include/linux/kernel.h
:::::: TO: Andrew Morton [off-list ref]
:::::: CC: Linus Torvalds [off-list ref]
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Attachments
- .config.gz [application/gzip] 61128 bytes
- (unnamed) [text/plain] 176 bytes · preview