tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: e6251ab4551f51fa4cee03523e08051898c3ce82 commit: d991bb1c8da842a2a0b9dc83b1005e655783f861 include/linux/compiler-gcc.h: sparse can do constant folding of __builtin_bswap*() date: 10 months ago config: mips-randconfig-s031-20220209 (https://download.01.org/0day-ci/archive/20220209/202202091914.WouzjlIJ-lkp@xxxxxxxxx/config) compiler: mips64-linux-gcc (GCC) 11.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d991bb1c8da842a2a0b9dc83b1005e655783f861 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout d991bb1c8da842a2a0b9dc83b1005e655783f861 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash drivers/infiniband/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> sparse warnings: (new ones prefixed by >>) command-line: note: in included file: builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined builtin:0:0: sparse: this was the original definition builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined builtin:0:0: sparse: this was the original definition builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined builtin:0:0: sparse: this was the original definition builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined builtin:0:0: sparse: this was the original definition drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:831:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] pa_lo @@ got restricted __le32 [usertype] @@ drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:831:28: sparse: expected unsigned int [usertype] pa_lo drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:831:28: sparse: got restricted __le32 [usertype] drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:832:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] pa_hi @@ got restricted __le32 [usertype] @@ drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:832:28: sparse: expected unsigned int [usertype] pa_hi drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:832:28: sparse: got restricted __le32 [usertype] drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:1632:44: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2072:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] pa_lo @@ got restricted __le32 [usertype] @@ drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2072:28: sparse: expected unsigned int [usertype] pa_lo drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2072:28: sparse: got restricted __le32 [usertype] drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2073:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] pa_hi @@ got restricted __le32 [usertype] @@ drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2073:28: sparse: expected unsigned int [usertype] pa_hi drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2073:28: sparse: got restricted __le32 [usertype] drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2421:18: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2452:44: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2452:42: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] flags_status_srcqpn @@ got restricted __le32 [usertype] @@ drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2452:42: sparse: expected unsigned int [usertype] flags_status_srcqpn drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2452:42: sparse: got restricted __le32 [usertype] drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2455:44: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2455:42: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] flags_status_srcqpn @@ got restricted __le32 [usertype] @@ drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2455:42: sparse: expected unsigned int [usertype] flags_status_srcqpn drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2455:42: sparse: got restricted __le32 [usertype] drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2461:52: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2461:50: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] flags_status_srcqpn @@ got restricted __le32 [usertype] @@ drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2461:50: sparse: expected unsigned int [usertype] flags_status_srcqpn drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2461:50: sparse: got restricted __le32 [usertype] drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2464:52: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2464:50: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] flags_status_srcqpn @@ got restricted __le32 [usertype] @@ drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2464:50: sparse: expected unsigned int [usertype] flags_status_srcqpn drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2464:50: sparse: got restricted __le32 [usertype] drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2469:52: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2469:50: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] flags_status_srcqpn @@ got restricted __le32 [usertype] @@ drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2469:50: sparse: expected unsigned int [usertype] flags_status_srcqpn drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2469:50: sparse: got restricted __le32 [usertype] drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2472:52: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2472:50: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] flags_status_srcqpn @@ got restricted __le32 [usertype] @@ drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2472:50: sparse: expected unsigned int [usertype] flags_status_srcqpn drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2472:50: sparse: got restricted __le32 [usertype] drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2528:23: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2583:20: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2598:19: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2614:19: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2616:24: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2620:27: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2625:29: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2644:20: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2703:34: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2706:37: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2710:37: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2713:44: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2732:27: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2736:27: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:2780:24: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c: note: in included file: >> drivers/infiniband/hw/ocrdma/ocrdma.h:499:21: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma.h:505:17: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c: note: in included file: drivers/infiniband/hw/ocrdma/ocrdma_hw.h:55:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 @@ drivers/infiniband/hw/ocrdma/ocrdma_hw.h:55:32: sparse: expected unsigned int [usertype] drivers/infiniband/hw/ocrdma/ocrdma_hw.h:55:32: sparse: got restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_hw.h:55:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 @@ drivers/infiniband/hw/ocrdma/ocrdma_hw.h:55:32: sparse: expected unsigned int [usertype] drivers/infiniband/hw/ocrdma/ocrdma_hw.h:55:32: sparse: got restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c: note: in included file: drivers/infiniband/hw/ocrdma/ocrdma.h:505:17: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma.h:517:17: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma.h:523:17: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma.h:511:17: sparse: sparse: cast to restricted __le32 >> drivers/infiniband/hw/ocrdma/ocrdma.h:499:21: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/ocrdma/ocrdma.h:505:17: sparse: sparse: cast to restricted __le32 vim +499 drivers/infiniband/hw/ocrdma/ocrdma.h fe2caefcdf5869 Parav Pandit 2012-03-21 495 df176ea0743fd0 Naresh Gottumukkala 2013-06-10 496 static inline int is_cqe_valid(struct ocrdma_cq *cq, struct ocrdma_cqe *cqe) df176ea0743fd0 Naresh Gottumukkala 2013-06-10 497 { df176ea0743fd0 Naresh Gottumukkala 2013-06-10 498 int cqe_valid; df176ea0743fd0 Naresh Gottumukkala 2013-06-10 @499 cqe_valid = le32_to_cpu(cqe->flags_status_srcqpn) & OCRDMA_CQE_VALID; f99b1649dbb634 Naresh Gottumukkala 2013-08-07 500 return (cqe_valid == cq->phase); df176ea0743fd0 Naresh Gottumukkala 2013-06-10 501 } df176ea0743fd0 Naresh Gottumukkala 2013-06-10 502 :::::: The code at line 499 was first introduced by commit :::::: df176ea0743fd0fb0514c862797f6bd8c08ab42e RDMA/ocrdma: Change macros to inline funtions :::::: TO: Naresh Gottumukkala <bgottumukkala@xxxxxxxxxx> :::::: CC: Roland Dreier <roland@xxxxxxxxxxxxxxx> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx