CC: [email protected] CC: [email protected] TO: Jason Gunthorpe <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 926de8c4326c14fcf35f1de142019043597a4fac commit: 84f969e1c48ed3825986e91a0786e363d57f69d1 IB/qib: Fix null pointer subtraction compiler warning date: 3 days ago :::::: branch date: 4 hours ago :::::: commit date: 3 days ago config: x86_64-allyesconfig (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=84f969e1c48ed3825986e91a0786e363d57f69d1 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 84f969e1c48ed3825986e91a0786e363d57f69d1 # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/infiniband/hw/qib/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> sparse warnings: (new ones prefixed by >>) >> drivers/infiniband/hw/qib/qib_sysfs.c:413:1: sparse: sparse: bad integer >> constant expression >> drivers/infiniband/hw/qib/qib_sysfs.c:413:1: sparse: sparse: static >> assertion failed: "&((struct qib_ibport *)0)->rvp.n_rc_resends != (u64 >> *)NULL" drivers/infiniband/hw/qib/qib_sysfs.c:414:1: sparse: sparse: bad integer constant expression >> drivers/infiniband/hw/qib/qib_sysfs.c:414:1: sparse: sparse: static >> assertion failed: "&((struct qib_ibport *)0)->rvp.n_seq_naks != (u64 *)NULL" drivers/infiniband/hw/qib/qib_sysfs.c:415:1: sparse: sparse: bad integer constant expression >> drivers/infiniband/hw/qib/qib_sysfs.c:415:1: sparse: sparse: static >> assertion failed: "&((struct qib_ibport *)0)->rvp.n_rdma_seq != (u64 *)NULL" drivers/infiniband/hw/qib/qib_sysfs.c:416:1: sparse: sparse: bad integer constant expression >> drivers/infiniband/hw/qib/qib_sysfs.c:416:1: sparse: sparse: static >> assertion failed: "&((struct qib_ibport *)0)->rvp.n_rnr_naks != (u64 *)NULL" drivers/infiniband/hw/qib/qib_sysfs.c:417:1: sparse: sparse: bad integer constant expression >> drivers/infiniband/hw/qib/qib_sysfs.c:417:1: sparse: sparse: static >> assertion failed: "&((struct qib_ibport *)0)->rvp.n_other_naks != (u64 >> *)NULL" drivers/infiniband/hw/qib/qib_sysfs.c:418:1: sparse: sparse: bad integer constant expression >> drivers/infiniband/hw/qib/qib_sysfs.c:418:1: sparse: sparse: static >> assertion failed: "&((struct qib_ibport *)0)->rvp.n_rc_timeouts != (u64 >> *)NULL" drivers/infiniband/hw/qib/qib_sysfs.c:419:1: sparse: sparse: bad integer constant expression >> drivers/infiniband/hw/qib/qib_sysfs.c:419:1: sparse: sparse: static >> assertion failed: "&((struct qib_ibport *)0)->rvp.n_loop_pkts != (u64 *)NULL" drivers/infiniband/hw/qib/qib_sysfs.c:420:1: sparse: sparse: bad integer constant expression >> drivers/infiniband/hw/qib/qib_sysfs.c:420:1: sparse: sparse: static >> assertion failed: "&((struct qib_ibport *)0)->rvp.n_pkt_drops != (u64 *)NULL" drivers/infiniband/hw/qib/qib_sysfs.c:421:1: sparse: sparse: bad integer constant expression >> drivers/infiniband/hw/qib/qib_sysfs.c:421:1: sparse: sparse: static >> assertion failed: "&((struct qib_ibport *)0)->rvp.n_dmawait != (u64 *)NULL" drivers/infiniband/hw/qib/qib_sysfs.c:422:1: sparse: sparse: bad integer constant expression >> drivers/infiniband/hw/qib/qib_sysfs.c:422:1: sparse: sparse: static >> assertion failed: "&((struct qib_ibport *)0)->rvp.n_unaligned != (u64 *)NULL" drivers/infiniband/hw/qib/qib_sysfs.c:423:1: sparse: sparse: bad integer constant expression >> drivers/infiniband/hw/qib/qib_sysfs.c:423:1: sparse: sparse: static >> assertion failed: "&((struct qib_ibport *)0)->rvp.n_rc_dupreq != (u64 *)NULL" drivers/infiniband/hw/qib/qib_sysfs.c:424:1: sparse: sparse: bad integer constant expression >> drivers/infiniband/hw/qib/qib_sysfs.c:424:1: sparse: sparse: static >> assertion failed: "&((struct qib_ibport *)0)->rvp.n_rc_seqnak != (u64 *)NULL" drivers/infiniband/hw/qib/qib_sysfs.c:425:1: sparse: sparse: bad integer constant expression >> drivers/infiniband/hw/qib/qib_sysfs.c:425:1: sparse: sparse: static >> assertion failed: "&((struct qib_ibport *)0)->rvp.n_rc_crwaits != (u64 >> *)NULL" vim +413 drivers/infiniband/hw/qib/qib_sysfs.c f24a6d4887668c Harish Chegondi 2016-01-22 404 4a7aaf88c89f12 Jason Gunthorpe 2021-06-11 405 #define QIB_DIAGC_ATTR(N) \ 84f969e1c48ed3 Jason Gunthorpe 2021-09-03 406 static_assert(&((struct qib_ibport *)0)->rvp.n_##N != (u64 *)NULL); \ f24a6d4887668c Harish Chegondi 2016-01-22 407 static struct qib_diagc_attr qib_diagc_attr_##N = { \ 4a7aaf88c89f12 Jason Gunthorpe 2021-06-11 408 .attr = __ATTR(N, 0664, diagc_attr_show, diagc_attr_store), \ 84f969e1c48ed3 Jason Gunthorpe 2021-09-03 409 .counter = \ 84f969e1c48ed3 Jason Gunthorpe 2021-09-03 410 offsetof(struct qib_ibport, rvp.n_##N) / sizeof(u64) \ f931551bafe1f1 Ralph Campbell 2010-05-23 411 } f931551bafe1f1 Ralph Campbell 2010-05-23 412 f931551bafe1f1 Ralph Campbell 2010-05-23 @413 QIB_DIAGC_ATTR(rc_resends); f931551bafe1f1 Ralph Campbell 2010-05-23 @414 QIB_DIAGC_ATTR(seq_naks); f931551bafe1f1 Ralph Campbell 2010-05-23 @415 QIB_DIAGC_ATTR(rdma_seq); f931551bafe1f1 Ralph Campbell 2010-05-23 @416 QIB_DIAGC_ATTR(rnr_naks); f931551bafe1f1 Ralph Campbell 2010-05-23 @417 QIB_DIAGC_ATTR(other_naks); f931551bafe1f1 Ralph Campbell 2010-05-23 @418 QIB_DIAGC_ATTR(rc_timeouts); f931551bafe1f1 Ralph Campbell 2010-05-23 @419 QIB_DIAGC_ATTR(loop_pkts); f931551bafe1f1 Ralph Campbell 2010-05-23 @420 QIB_DIAGC_ATTR(pkt_drops); f931551bafe1f1 Ralph Campbell 2010-05-23 @421 QIB_DIAGC_ATTR(dmawait); f931551bafe1f1 Ralph Campbell 2010-05-23 @422 QIB_DIAGC_ATTR(unaligned); f931551bafe1f1 Ralph Campbell 2010-05-23 @423 QIB_DIAGC_ATTR(rc_dupreq); f931551bafe1f1 Ralph Campbell 2010-05-23 @424 QIB_DIAGC_ATTR(rc_seqnak); 7199435414868b Kaike Wan 2019-09-11 @425 QIB_DIAGC_ATTR(rc_crwaits); f931551bafe1f1 Ralph Campbell 2010-05-23 426 :::::: The code at line 413 was first introduced by commit :::::: f931551bafe1f10ded7f5282e2aa162c267a2e5d IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters :::::: TO: Ralph Campbell <[email protected]> :::::: CC: Roland Dreier <[email protected]> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
