drivers/soc/fsl/qe/ucc_slow.c:81:18: sparse: sparse: incorrect type in argument 1 (different base types)

From: kbuild test robot
Date: Tue May 19 2020 - 05:21:00 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 642b151f45dd54809ea00ecd3976a56c1ec9b53d
commit: 461c3ac0dc46ba7fc09628aadf63c81253c4c3de soc: fsl: qe: fix sparse warnings for ucc_slow.c
date: 8 weeks ago
config: powerpc-randconfig-s001-20200519 (attached as .config)
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-193-gb8fad4bc-dirty
git checkout 461c3ac0dc46ba7fc09628aadf63c81253c4c3de
# save the attached .config to linux build tree
make C=1 ARCH=powerpc CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)

>> drivers/soc/fsl/qe/ucc_slow.c:81:18: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int const volatile [noderef] [usertype] <asn:2> *addr @@ got latile [noderef] [usertype] <asn:2> *addr @@
drivers/soc/fsl/qe/ucc_slow.c:81:18: sparse: expected unsigned int const volatile [noderef] [usertype] <asn:2> *addr
drivers/soc/fsl/qe/ucc_slow.c:81:18: sparse: got restricted __be32 [noderef] <asn:2> *
drivers/soc/fsl/qe/ucc_slow.c:90:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] <asn:2> *addr @@ got latile [noderef] [usertype] <asn:2> *addr @@
drivers/soc/fsl/qe/ucc_slow.c:90:9: sparse: expected unsigned int volatile [noderef] [usertype] <asn:2> *addr
drivers/soc/fsl/qe/ucc_slow.c:90:9: sparse: got restricted __be32 [noderef] <asn:2> *
drivers/soc/fsl/qe/ucc_slow.c:102:18: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int const volatile [noderef] [usertype] <asn:2> *addr @@ got latile [noderef] [usertype] <asn:2> *addr @@
drivers/soc/fsl/qe/ucc_slow.c:102:18: sparse: expected unsigned int const volatile [noderef] [usertype] <asn:2> *addr
drivers/soc/fsl/qe/ucc_slow.c:102:18: sparse: got restricted __be32 [noderef] <asn:2> *
drivers/soc/fsl/qe/ucc_slow.c:111:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] <asn:2> *addr @@ got latile [noderef] [usertype] <asn:2> *addr @@
drivers/soc/fsl/qe/ucc_slow.c:111:9: sparse: expected unsigned int volatile [noderef] [usertype] <asn:2> *addr
drivers/soc/fsl/qe/ucc_slow.c:111:9: sparse: got restricted __be32 [noderef] <asn:2> *
drivers/soc/fsl/qe/ucc_slow.c:197:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short volatile [noderef] [usertype] <asn:2> *addr @@ got latile [noderef] [usertype] <asn:2> *addr @@
drivers/soc/fsl/qe/ucc_slow.c:197:9: sparse: expected unsigned short volatile [noderef] [usertype] <asn:2> *addr
drivers/soc/fsl/qe/ucc_slow.c:197:9: sparse: got restricted __be16 [noderef] <asn:2> *
drivers/soc/fsl/qe/ucc_slow.c:225:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] <asn:2> *addr @@ got latile [noderef] [usertype] <asn:2> *addr @@
drivers/soc/fsl/qe/ucc_slow.c:225:17: sparse: expected unsigned int volatile [noderef] [usertype] <asn:2> *addr
drivers/soc/fsl/qe/ucc_slow.c:225:17: sparse: got restricted __be32 [noderef] <asn:2> *
drivers/soc/fsl/qe/ucc_slow.c:231:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] <asn:2> *addr @@ got latile [noderef] [usertype] <asn:2> *addr @@
drivers/soc/fsl/qe/ucc_slow.c:231:9: sparse: expected unsigned int volatile [noderef] [usertype] <asn:2> *addr
drivers/soc/fsl/qe/ucc_slow.c:231:9: sparse: got restricted __be32 [noderef] <asn:2> *
drivers/soc/fsl/qe/ucc_slow.c:240:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] <asn:2> *addr @@ got latile [noderef] [usertype] <asn:2> *addr @@
drivers/soc/fsl/qe/ucc_slow.c:240:17: sparse: expected unsigned int volatile [noderef] [usertype] <asn:2> *addr
drivers/soc/fsl/qe/ucc_slow.c:240:17: sparse: got restricted __be32 [noderef] <asn:2> *
drivers/soc/fsl/qe/ucc_slow.c:245:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] <asn:2> *addr @@ got latile [noderef] [usertype] <asn:2> *addr @@
drivers/soc/fsl/qe/ucc_slow.c:245:9: sparse: expected unsigned int volatile [noderef] [usertype] <asn:2> *addr
drivers/soc/fsl/qe/ucc_slow.c:245:9: sparse: got restricted __be32 [noderef] <asn:2> *
drivers/soc/fsl/qe/ucc_slow.c:266:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] <asn:2> *addr @@ got latile [noderef] [usertype] <asn:2> *addr @@
drivers/soc/fsl/qe/ucc_slow.c:266:9: sparse: expected unsigned int volatile [noderef] [usertype] <asn:2> *addr
drivers/soc/fsl/qe/ucc_slow.c:266:9: sparse: got restricted __be32 [noderef] <asn:2> *
drivers/soc/fsl/qe/ucc_slow.c:279:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] <asn:2> *addr @@ got latile [noderef] [usertype] <asn:2> *addr @@
drivers/soc/fsl/qe/ucc_slow.c:279:9: sparse: expected unsigned int volatile [noderef] [usertype] <asn:2> *addr
drivers/soc/fsl/qe/ucc_slow.c:279:9: sparse: got restricted __be32 [noderef] <asn:2> *
drivers/soc/fsl/qe/ucc_slow.c:289:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short volatile [noderef] [usertype] <asn:2> *addr @@ got latile [noderef] [usertype] <asn:2> *addr @@
drivers/soc/fsl/qe/ucc_slow.c:289:9: sparse: expected unsigned short volatile [noderef] [usertype] <asn:2> *addr
drivers/soc/fsl/qe/ucc_slow.c:289:9: sparse: got restricted __be16 [noderef] <asn:2> *
drivers/soc/fsl/qe/ucc_slow.c:290:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short volatile [noderef] [usertype] <asn:2> *addr @@ got latile [noderef] [usertype] <asn:2> *addr @@
drivers/soc/fsl/qe/ucc_slow.c:290:9: sparse: expected unsigned short volatile [noderef] [usertype] <asn:2> *addr
drivers/soc/fsl/qe/ucc_slow.c:290:9: sparse: got restricted __be16 [noderef] <asn:2> *
drivers/soc/fsl/qe/ucc_slow.c:320:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short volatile [noderef] [usertype] <asn:2> *addr @@ got latile [noderef] [usertype] <asn:2> *addr @@
drivers/soc/fsl/qe/ucc_slow.c:320:9: sparse: expected unsigned short volatile [noderef] [usertype] <asn:2> *addr
drivers/soc/fsl/qe/ucc_slow.c:320:9: sparse: got restricted __be16 [noderef] <asn:2> *
drivers/soc/fsl/qe/ucc_slow.c:327:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short volatile [noderef] [usertype] <asn:2> *addr @@ got latile [noderef] [usertype] <asn:2> *addr @@
drivers/soc/fsl/qe/ucc_slow.c:327:9: sparse: expected unsigned short volatile [noderef] [usertype] <asn:2> *addr
drivers/soc/fsl/qe/ucc_slow.c:327:9: sparse: got restricted __be16 [noderef] <asn:2> *

vim +81 drivers/soc/fsl/qe/ucc_slow.c

9865853851313e arch/powerpc/sysdev/qe_lib/ucc_slow.c Li Yang 2006-10-03 72
9865853851313e arch/powerpc/sysdev/qe_lib/ucc_slow.c Li Yang 2006-10-03 73 void ucc_slow_enable(struct ucc_slow_private * uccs, enum comm_dir mode)
9865853851313e arch/powerpc/sysdev/qe_lib/ucc_slow.c Li Yang 2006-10-03 74 {
461c3ac0dc46ba drivers/soc/fsl/qe/ucc_slow.c Li Yang 2020-03-12 75 struct ucc_slow __iomem *us_regs;
9865853851313e arch/powerpc/sysdev/qe_lib/ucc_slow.c Li Yang 2006-10-03 76 u32 gumr_l;
9865853851313e arch/powerpc/sysdev/qe_lib/ucc_slow.c Li Yang 2006-10-03 77
9865853851313e arch/powerpc/sysdev/qe_lib/ucc_slow.c Li Yang 2006-10-03 78 us_regs = uccs->us_regs;
9865853851313e arch/powerpc/sysdev/qe_lib/ucc_slow.c Li Yang 2006-10-03 79
9865853851313e arch/powerpc/sysdev/qe_lib/ucc_slow.c Li Yang 2006-10-03 80 /* Enable reception and/or transmission on this UCC. */
77d7676a92d154 drivers/soc/fsl/qe/ucc_slow.c Rasmus Villemoes 2019-11-28 @81 gumr_l = qe_ioread32be(&us_regs->gumr_l);
9865853851313e arch/powerpc/sysdev/qe_lib/ucc_slow.c Li Yang 2006-10-03 82 if (mode & COMM_DIR_TX) {
9865853851313e arch/powerpc/sysdev/qe_lib/ucc_slow.c Li Yang 2006-10-03 83 gumr_l |= UCC_SLOW_GUMR_L_ENT;
9865853851313e arch/powerpc/sysdev/qe_lib/ucc_slow.c Li Yang 2006-10-03 84 uccs->enabled_tx = 1;
9865853851313e arch/powerpc/sysdev/qe_lib/ucc_slow.c Li Yang 2006-10-03 85 }
9865853851313e arch/powerpc/sysdev/qe_lib/ucc_slow.c Li Yang 2006-10-03 86 if (mode & COMM_DIR_RX) {
9865853851313e arch/powerpc/sysdev/qe_lib/ucc_slow.c Li Yang 2006-10-03 87 gumr_l |= UCC_SLOW_GUMR_L_ENR;
9865853851313e arch/powerpc/sysdev/qe_lib/ucc_slow.c Li Yang 2006-10-03 88 uccs->enabled_rx = 1;
9865853851313e arch/powerpc/sysdev/qe_lib/ucc_slow.c Li Yang 2006-10-03 89 }
77d7676a92d154 drivers/soc/fsl/qe/ucc_slow.c Rasmus Villemoes 2019-11-28 90 qe_iowrite32be(gumr_l, &us_regs->gumr_l);
9865853851313e arch/powerpc/sysdev/qe_lib/ucc_slow.c Li Yang 2006-10-03 91 }
845cf505cebd15 arch/powerpc/sysdev/qe_lib/ucc_slow.c Timur Tabi 2008-01-09 92 EXPORT_SYMBOL(ucc_slow_enable);
9865853851313e arch/powerpc/sysdev/qe_lib/ucc_slow.c Li Yang 2006-10-03 93

:::::: The code at line 81 was first introduced by commit
:::::: 77d7676a92d1541ac6245811a754c70c605a974d soc: fsl: qe: avoid ppc-specific io accessors

:::::: TO: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
:::::: CC: Li Yang <leoyang.li@xxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip