tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 071a0578b0ce0b0e543d1e38ee6926b9cc21c198 commit: 8f28ca6bd8211214faf717677bbffe375c2a6072 iomap: constify ioreadX() iomem argument (as in generic implementation) date: 9 weeks ago config: powerpc-randconfig-s032-20201017 (attached as .config) compiler: powerpc-linux-gcc (GCC) 9.3.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.3-rc1-2-g368fd9ce-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8f28ca6bd8211214faf717677bbffe375c2a6072 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 8f28ca6bd8211214faf717677bbffe375c2a6072 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <l...@intel.com> "sparse warnings: (new ones prefixed by >>)" drivers/dma/ppc4xx/adma.c:73:1: sparse: sparse: symbol 'ppc440spe_adma_chan_list' was not declared. Should it be static? drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:140:17: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:543:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sg1l @@ got restricted __le32 [usertype] @@ drivers/dma/ppc4xx/adma.c:543:35: sparse: expected unsigned int [usertype] sg1l drivers/dma/ppc4xx/adma.c:543:35: sparse: got restricted __le32 [usertype] drivers/dma/ppc4xx/adma.c:544:35: sparse: sparse: invalid assignment: |= drivers/dma/ppc4xx/adma.c:544:35: sparse: left side has type unsigned int drivers/dma/ppc4xx/adma.c:544:35: sparse: right side has type restricted __le32 drivers/dma/ppc4xx/adma.c:590:23: sparse: sparse: invalid assignment: |= drivers/dma/ppc4xx/adma.c:590:23: sparse: left side has type unsigned int drivers/dma/ppc4xx/adma.c:590:23: sparse: right side has type restricted __le32 drivers/dma/ppc4xx/adma.c:629:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/dma/ppc4xx/adma.c:629:23: sparse: expected unsigned int [usertype] drivers/dma/ppc4xx/adma.c:629:23: sparse: got restricted __le32 [usertype] drivers/dma/ppc4xx/adma.c:630:23: sparse: sparse: invalid assignment: |= drivers/dma/ppc4xx/adma.c:630:23: sparse: left side has type unsigned int drivers/dma/ppc4xx/adma.c:630:23: sparse: right side has type restricted __le32 drivers/dma/ppc4xx/adma.c:655:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] cnt @@ got restricted __le32 [usertype] @@ drivers/dma/ppc4xx/adma.c:655:34: sparse: expected unsigned int [usertype] cnt drivers/dma/ppc4xx/adma.c:655:34: sparse: got restricted __le32 [usertype] drivers/dma/ppc4xx/adma.c:688:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:688:38: sparse: expected void [noderef] __iomem * drivers/dma/ppc4xx/adma.c:688:38: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:689:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:689:38: sparse: expected void [noderef] __iomem * drivers/dma/ppc4xx/adma.c:689:38: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:690:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:690:38: sparse: expected void [noderef] __iomem * drivers/dma/ppc4xx/adma.c:690:38: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:691:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:691:39: sparse: expected void [noderef] __iomem * drivers/dma/ppc4xx/adma.c:691:39: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:738:69: sparse: sparse: Using plain integer as NULL pointer drivers/dma/ppc4xx/adma.c:1187:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct dma_regs *dma_reg @@ got struct dma_regs [noderef] __iomem *dma_reg @@ drivers/dma/ppc4xx/adma.c:1187:25: sparse: expected struct dma_regs *dma_reg drivers/dma/ppc4xx/adma.c:1187:25: sparse: got struct dma_regs [noderef] __iomem *dma_reg >> drivers/dma/ppc4xx/adma.c:1188:34: sparse: sparse: incorrect type in >> argument 1 (different address spaces) @@ expected void const [noderef] >> __iomem * @@ got unsigned int * @@ >> drivers/dma/ppc4xx/adma.c:1188:34: sparse: expected void const [noderef] >> __iomem * drivers/dma/ppc4xx/adma.c:1188:34: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:1190:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct xor_regs *xor_reg @@ got struct xor_regs [noderef] __iomem *xor_reg @@ drivers/dma/ppc4xx/adma.c:1190:25: sparse: expected struct xor_regs *xor_reg drivers/dma/ppc4xx/adma.c:1190:25: sparse: got struct xor_regs [noderef] __iomem *xor_reg drivers/dma/ppc4xx/adma.c:1191:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:1191:36: sparse: expected void const [noderef] __iomem * drivers/dma/ppc4xx/adma.c:1191:36: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:1138:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct xor_regs *xor_reg @@ got struct xor_regs [noderef] __iomem *xor_reg @@ drivers/dma/ppc4xx/adma.c:1138:25: sparse: expected struct xor_regs *xor_reg drivers/dma/ppc4xx/adma.c:1138:25: sparse: got struct xor_regs [noderef] __iomem *xor_reg drivers/dma/ppc4xx/adma.c:1147:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:1147:35: sparse: expected void const [noderef] __iomem * drivers/dma/ppc4xx/adma.c:1147:35: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:1157:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:1157:49: sparse: expected void const [noderef] __iomem * drivers/dma/ppc4xx/adma.c:1157:49: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:1159:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:1159:38: sparse: expected void [noderef] __iomem * drivers/dma/ppc4xx/adma.c:1159:38: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:911:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct dma_regs *dma_reg @@ got struct dma_regs [noderef] __iomem *dma_reg @@ drivers/dma/ppc4xx/adma.c:911:25: sparse: expected struct dma_regs *dma_reg drivers/dma/ppc4xx/adma.c:911:25: sparse: got struct dma_regs [noderef] __iomem *dma_reg drivers/dma/ppc4xx/adma.c:912:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:912:40: sparse: expected void const [noderef] __iomem * drivers/dma/ppc4xx/adma.c:912:40: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:929:37: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:929:37: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:929:37: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:929:37: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:929:37: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:929:37: sparse: sparse: cast to restricted __le32 drivers/dma/ppc4xx/adma.c:974:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:974:32: sparse: expected void const [noderef] __iomem * drivers/dma/ppc4xx/adma.c:974:32: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:979:40: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:979:40: sparse: expected void [noderef] __iomem * drivers/dma/ppc4xx/adma.c:979:40: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:984:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct xor_regs *xor_reg @@ got struct xor_regs [noderef] __iomem *xor_reg @@ drivers/dma/ppc4xx/adma.c:984:25: sparse: expected struct xor_regs *xor_reg drivers/dma/ppc4xx/adma.c:984:25: sparse: got struct xor_regs [noderef] __iomem *xor_reg drivers/dma/ppc4xx/adma.c:985:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:985:34: sparse: expected void const [noderef] __iomem * drivers/dma/ppc4xx/adma.c:985:34: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:986:34: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:986:34: sparse: expected void [noderef] __iomem * drivers/dma/ppc4xx/adma.c:986:34: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:993:55: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:993:55: sparse: expected void const [noderef] __iomem * drivers/dma/ppc4xx/adma.c:993:55: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:995:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:995:51: sparse: expected void [noderef] __iomem * drivers/dma/ppc4xx/adma.c:995:51: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:997:51: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:997:51: sparse: expected void const [noderef] __iomem * drivers/dma/ppc4xx/adma.c:997:51: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:999:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:999:46: sparse: expected void [noderef] __iomem * drivers/dma/ppc4xx/adma.c:999:46: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:1008:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:1008:35: sparse: expected void const [noderef] __iomem * drivers/dma/ppc4xx/adma.c:1008:35: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:1027:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct dma_regs *dma_reg @@ got struct dma_regs [noderef] __iomem *dma_reg @@ drivers/dma/ppc4xx/adma.c:1027:25: sparse: expected struct dma_regs *dma_reg drivers/dma/ppc4xx/adma.c:1027:25: sparse: got struct dma_regs [noderef] __iomem *dma_reg >> drivers/dma/ppc4xx/adma.c:1031:31: sparse: sparse: incorrect type in >> argument 1 (different address spaces) @@ expected void const [noderef] >> __iomem * @@ got unsigned short * @@ drivers/dma/ppc4xx/adma.c:1031:31: sparse: expected void const [noderef] __iomem * drivers/dma/ppc4xx/adma.c:1031:31: sparse: got unsigned short * drivers/dma/ppc4xx/adma.c:1031:60: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned short * @@ drivers/dma/ppc4xx/adma.c:1031:60: sparse: expected void const [noderef] __iomem * drivers/dma/ppc4xx/adma.c:1031:60: sparse: got unsigned short * drivers/dma/ppc4xx/adma.c:1032:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned short * @@ drivers/dma/ppc4xx/adma.c:1032:31: sparse: expected void const [noderef] __iomem * drivers/dma/ppc4xx/adma.c:1032:31: sparse: got unsigned short * drivers/dma/ppc4xx/adma.c:1032:60: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned short * @@ drivers/dma/ppc4xx/adma.c:1032:60: sparse: expected void const [noderef] __iomem * drivers/dma/ppc4xx/adma.c:1032:60: sparse: got unsigned short * drivers/dma/ppc4xx/adma.c:1038:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct xor_regs *xor_reg @@ got struct xor_regs [noderef] __iomem *xor_reg @@ drivers/dma/ppc4xx/adma.c:1038:25: sparse: expected struct xor_regs *xor_reg drivers/dma/ppc4xx/adma.c:1038:25: sparse: got struct xor_regs [noderef] __iomem *xor_reg drivers/dma/ppc4xx/adma.c:1039:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:1039:37: sparse: expected void const [noderef] __iomem * drivers/dma/ppc4xx/adma.c:1039:37: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:1053:48: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct xor_regs *xor_reg @@ got struct xor_regs [noderef] __iomem *xor_reg @@ drivers/dma/ppc4xx/adma.c:1053:48: sparse: expected struct xor_regs *xor_reg drivers/dma/ppc4xx/adma.c:1053:48: sparse: got struct xor_regs [noderef] __iomem *xor_reg drivers/dma/ppc4xx/adma.c:1055:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:1055:25: sparse: expected void const [noderef] __iomem * drivers/dma/ppc4xx/adma.c:1055:25: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:1062:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:1062:41: sparse: expected void [noderef] __iomem * drivers/dma/ppc4xx/adma.c:1062:41: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:1064:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:1064:39: sparse: expected void [noderef] __iomem * drivers/dma/ppc4xx/adma.c:1064:39: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:1065:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:1065:25: sparse: expected void [noderef] __iomem * drivers/dma/ppc4xx/adma.c:1065:25: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:1066:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:1066:33: sparse: expected void const [noderef] __iomem * drivers/dma/ppc4xx/adma.c:1066:33: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:1067:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:1067:22: sparse: expected void [noderef] __iomem * drivers/dma/ppc4xx/adma.c:1067:22: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:1080:48: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct dma_regs *dma_reg @@ got struct dma_regs [noderef] __iomem *dma_reg @@ drivers/dma/ppc4xx/adma.c:1080:48: sparse: expected struct dma_regs *dma_reg drivers/dma/ppc4xx/adma.c:1080:48: sparse: got struct dma_regs [noderef] __iomem *dma_reg drivers/dma/ppc4xx/adma.c:1090:26: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:1090:26: sparse: expected void [noderef] __iomem * drivers/dma/ppc4xx/adma.c:1090:26: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:1210:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct xor_regs *xor_reg @@ got struct xor_regs [noderef] __iomem *xor_reg @@ drivers/dma/ppc4xx/adma.c:1210:25: sparse: expected struct xor_regs *xor_reg drivers/dma/ppc4xx/adma.c:1210:25: sparse: got struct xor_regs [noderef] __iomem *xor_reg drivers/dma/ppc4xx/adma.c:1214:30: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem * @@ got unsigned int * @@ drivers/dma/ppc4xx/adma.c:1214:30: sparse: expected void [noderef] __iomem * drivers/dma/ppc4xx/adma.c:1214:30: sparse: got unsigned int * drivers/dma/ppc4xx/adma.c:2777:62: sparse: sparse: Using plain integer as NULL pointer drivers/dma/ppc4xx/adma.c:4094:14: sparse: sparse: too many warnings vim +1188 drivers/dma/ppc4xx/adma.c 12458ea06efd7b Anatolij Gustschin 2009-12-11 1014 12458ea06efd7b Anatolij Gustschin 2009-12-11 1015 /** 12458ea06efd7b Anatolij Gustschin 2009-12-11 1016 * ppc440spe_chan_is_busy - get the channel status 12458ea06efd7b Anatolij Gustschin 2009-12-11 1017 */ 12458ea06efd7b Anatolij Gustschin 2009-12-11 1018 static int ppc440spe_chan_is_busy(struct ppc440spe_adma_chan *chan) 12458ea06efd7b Anatolij Gustschin 2009-12-11 1019 { 12458ea06efd7b Anatolij Gustschin 2009-12-11 1020 struct dma_regs *dma_reg; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1021 struct xor_regs *xor_reg; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1022 int busy = 0; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1023 12458ea06efd7b Anatolij Gustschin 2009-12-11 1024 switch (chan->device->id) { 12458ea06efd7b Anatolij Gustschin 2009-12-11 1025 case PPC440SPE_DMA0_ID: 12458ea06efd7b Anatolij Gustschin 2009-12-11 1026 case PPC440SPE_DMA1_ID: 12458ea06efd7b Anatolij Gustschin 2009-12-11 1027 dma_reg = chan->device->dma_reg; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1028 /* if command FIFO's head and tail pointers are equal and 12458ea06efd7b Anatolij Gustschin 2009-12-11 1029 * status tail is the same as command, then channel is free 12458ea06efd7b Anatolij Gustschin 2009-12-11 1030 */ 12458ea06efd7b Anatolij Gustschin 2009-12-11 @1031 if (ioread16(&dma_reg->cpfhp) != ioread16(&dma_reg->cpftp) || 12458ea06efd7b Anatolij Gustschin 2009-12-11 1032 ioread16(&dma_reg->cpftp) != ioread16(&dma_reg->csftp)) 12458ea06efd7b Anatolij Gustschin 2009-12-11 1033 busy = 1; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1034 break; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1035 case PPC440SPE_XOR_ID: 12458ea06efd7b Anatolij Gustschin 2009-12-11 1036 /* use the special status bit for the XORcore 12458ea06efd7b Anatolij Gustschin 2009-12-11 1037 */ 12458ea06efd7b Anatolij Gustschin 2009-12-11 1038 xor_reg = chan->device->xor_reg; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1039 busy = (ioread32be(&xor_reg->sr) & XOR_SR_XCP_BIT) ? 1 : 0; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1040 break; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1041 } 12458ea06efd7b Anatolij Gustschin 2009-12-11 1042 12458ea06efd7b Anatolij Gustschin 2009-12-11 1043 return busy; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1044 } 12458ea06efd7b Anatolij Gustschin 2009-12-11 1045 12458ea06efd7b Anatolij Gustschin 2009-12-11 1046 /** 12458ea06efd7b Anatolij Gustschin 2009-12-11 1047 * ppc440spe_chan_set_first_xor_descriptor - init XORcore chain 12458ea06efd7b Anatolij Gustschin 2009-12-11 1048 */ 12458ea06efd7b Anatolij Gustschin 2009-12-11 1049 static void ppc440spe_chan_set_first_xor_descriptor( 12458ea06efd7b Anatolij Gustschin 2009-12-11 1050 struct ppc440spe_adma_chan *chan, 12458ea06efd7b Anatolij Gustschin 2009-12-11 1051 struct ppc440spe_adma_desc_slot *next_desc) 12458ea06efd7b Anatolij Gustschin 2009-12-11 1052 { 12458ea06efd7b Anatolij Gustschin 2009-12-11 1053 struct xor_regs *xor_reg = chan->device->xor_reg; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1054 12458ea06efd7b Anatolij Gustschin 2009-12-11 1055 if (ioread32be(&xor_reg->sr) & XOR_SR_XCP_BIT) 12458ea06efd7b Anatolij Gustschin 2009-12-11 1056 printk(KERN_INFO "%s: Warn: XORcore is running " 12458ea06efd7b Anatolij Gustschin 2009-12-11 1057 "when try to set the first CDB!\n", 12458ea06efd7b Anatolij Gustschin 2009-12-11 1058 __func__); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1059 12458ea06efd7b Anatolij Gustschin 2009-12-11 1060 xor_last_submit = xor_last_linked = next_desc; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1061 12458ea06efd7b Anatolij Gustschin 2009-12-11 1062 iowrite32be(XOR_CRSR_64BA_BIT, &xor_reg->crsr); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1063 12458ea06efd7b Anatolij Gustschin 2009-12-11 1064 iowrite32be(next_desc->phys, &xor_reg->cblalr); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1065 iowrite32be(0, &xor_reg->cblahr); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1066 iowrite32be(ioread32be(&xor_reg->cbcr) | XOR_CBCR_LNK_BIT, 12458ea06efd7b Anatolij Gustschin 2009-12-11 1067 &xor_reg->cbcr); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1068 12458ea06efd7b Anatolij Gustschin 2009-12-11 1069 chan->hw_chain_inited = 1; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1070 } 12458ea06efd7b Anatolij Gustschin 2009-12-11 1071 12458ea06efd7b Anatolij Gustschin 2009-12-11 1072 /** 12458ea06efd7b Anatolij Gustschin 2009-12-11 1073 * ppc440spe_dma_put_desc - put DMA0,1 descriptor to FIFO. 12458ea06efd7b Anatolij Gustschin 2009-12-11 1074 * called with irqs disabled 12458ea06efd7b Anatolij Gustschin 2009-12-11 1075 */ 12458ea06efd7b Anatolij Gustschin 2009-12-11 1076 static void ppc440spe_dma_put_desc(struct ppc440spe_adma_chan *chan, 12458ea06efd7b Anatolij Gustschin 2009-12-11 1077 struct ppc440spe_adma_desc_slot *desc) 12458ea06efd7b Anatolij Gustschin 2009-12-11 1078 { 12458ea06efd7b Anatolij Gustschin 2009-12-11 1079 u32 pcdb; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1080 struct dma_regs *dma_reg = chan->device->dma_reg; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1081 12458ea06efd7b Anatolij Gustschin 2009-12-11 1082 pcdb = desc->phys; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1083 if (!test_bit(PPC440SPE_DESC_INT, &desc->flags)) 12458ea06efd7b Anatolij Gustschin 2009-12-11 1084 pcdb |= DMA_CDB_NO_INT; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1085 12458ea06efd7b Anatolij Gustschin 2009-12-11 1086 chan_last_sub[chan->device->id] = desc; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1087 12458ea06efd7b Anatolij Gustschin 2009-12-11 1088 ADMA_LL_DBG(print_cb(chan, desc->hw_desc)); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1089 12458ea06efd7b Anatolij Gustschin 2009-12-11 1090 iowrite32(pcdb, &dma_reg->cpfpl); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1091 } 12458ea06efd7b Anatolij Gustschin 2009-12-11 1092 12458ea06efd7b Anatolij Gustschin 2009-12-11 1093 /** 12458ea06efd7b Anatolij Gustschin 2009-12-11 1094 * ppc440spe_chan_append - update the h/w chain in the channel 12458ea06efd7b Anatolij Gustschin 2009-12-11 1095 */ 12458ea06efd7b Anatolij Gustschin 2009-12-11 1096 static void ppc440spe_chan_append(struct ppc440spe_adma_chan *chan) 12458ea06efd7b Anatolij Gustschin 2009-12-11 1097 { 12458ea06efd7b Anatolij Gustschin 2009-12-11 1098 struct xor_regs *xor_reg; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1099 struct ppc440spe_adma_desc_slot *iter; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1100 struct xor_cb *xcb; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1101 u32 cur_desc; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1102 unsigned long flags; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1103 12458ea06efd7b Anatolij Gustschin 2009-12-11 1104 local_irq_save(flags); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1105 12458ea06efd7b Anatolij Gustschin 2009-12-11 1106 switch (chan->device->id) { 12458ea06efd7b Anatolij Gustschin 2009-12-11 1107 case PPC440SPE_DMA0_ID: 12458ea06efd7b Anatolij Gustschin 2009-12-11 1108 case PPC440SPE_DMA1_ID: 12458ea06efd7b Anatolij Gustschin 2009-12-11 1109 cur_desc = ppc440spe_chan_get_current_descriptor(chan); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1110 12458ea06efd7b Anatolij Gustschin 2009-12-11 1111 if (likely(cur_desc)) { 12458ea06efd7b Anatolij Gustschin 2009-12-11 1112 iter = chan_last_sub[chan->device->id]; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1113 BUG_ON(!iter); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1114 } else { 12458ea06efd7b Anatolij Gustschin 2009-12-11 1115 /* first peer */ 12458ea06efd7b Anatolij Gustschin 2009-12-11 1116 iter = chan_first_cdb[chan->device->id]; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1117 BUG_ON(!iter); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1118 ppc440spe_dma_put_desc(chan, iter); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1119 chan->hw_chain_inited = 1; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1120 } 12458ea06efd7b Anatolij Gustschin 2009-12-11 1121 12458ea06efd7b Anatolij Gustschin 2009-12-11 1122 /* is there something new to append */ 12458ea06efd7b Anatolij Gustschin 2009-12-11 1123 if (!iter->hw_next) 12458ea06efd7b Anatolij Gustschin 2009-12-11 1124 break; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1125 12458ea06efd7b Anatolij Gustschin 2009-12-11 1126 /* flush descriptors from the s/w queue to fifo */ 12458ea06efd7b Anatolij Gustschin 2009-12-11 1127 list_for_each_entry_continue(iter, &chan->chain, chain_node) { 12458ea06efd7b Anatolij Gustschin 2009-12-11 1128 ppc440spe_dma_put_desc(chan, iter); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1129 if (!iter->hw_next) 12458ea06efd7b Anatolij Gustschin 2009-12-11 1130 break; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1131 } 12458ea06efd7b Anatolij Gustschin 2009-12-11 1132 break; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1133 case PPC440SPE_XOR_ID: 12458ea06efd7b Anatolij Gustschin 2009-12-11 1134 /* update h/w links and refetch */ 12458ea06efd7b Anatolij Gustschin 2009-12-11 1135 if (!xor_last_submit->hw_next) 12458ea06efd7b Anatolij Gustschin 2009-12-11 1136 break; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1137 12458ea06efd7b Anatolij Gustschin 2009-12-11 1138 xor_reg = chan->device->xor_reg; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1139 /* the last linked CDB has to generate an interrupt 12458ea06efd7b Anatolij Gustschin 2009-12-11 1140 * that we'd be able to append the next lists to h/w 12458ea06efd7b Anatolij Gustschin 2009-12-11 1141 * regardless of the XOR engine state at the moment of 12458ea06efd7b Anatolij Gustschin 2009-12-11 1142 * appending of these next lists 12458ea06efd7b Anatolij Gustschin 2009-12-11 1143 */ 12458ea06efd7b Anatolij Gustschin 2009-12-11 1144 xcb = xor_last_linked->hw_desc; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1145 xcb->cbc |= XOR_CBCR_CBCE_BIT; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1146 12458ea06efd7b Anatolij Gustschin 2009-12-11 1147 if (!(ioread32be(&xor_reg->sr) & XOR_SR_XCP_BIT)) { 12458ea06efd7b Anatolij Gustschin 2009-12-11 1148 /* XORcore is idle. Refetch now */ 12458ea06efd7b Anatolij Gustschin 2009-12-11 1149 do_xor_refetch = 0; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1150 ppc440spe_xor_set_link(xor_last_submit, 12458ea06efd7b Anatolij Gustschin 2009-12-11 1151 xor_last_submit->hw_next); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1152 12458ea06efd7b Anatolij Gustschin 2009-12-11 1153 ADMA_LL_DBG(print_cb_list(chan, 12458ea06efd7b Anatolij Gustschin 2009-12-11 1154 xor_last_submit->hw_next)); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1155 12458ea06efd7b Anatolij Gustschin 2009-12-11 1156 xor_last_submit = xor_last_linked; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1157 iowrite32be(ioread32be(&xor_reg->crsr) | 12458ea06efd7b Anatolij Gustschin 2009-12-11 1158 XOR_CRSR_RCBE_BIT | XOR_CRSR_64BA_BIT, 12458ea06efd7b Anatolij Gustschin 2009-12-11 1159 &xor_reg->crsr); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1160 } else { 12458ea06efd7b Anatolij Gustschin 2009-12-11 1161 /* XORcore is running. Refetch later in the handler */ 12458ea06efd7b Anatolij Gustschin 2009-12-11 1162 do_xor_refetch = 1; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1163 } 12458ea06efd7b Anatolij Gustschin 2009-12-11 1164 12458ea06efd7b Anatolij Gustschin 2009-12-11 1165 break; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1166 } 12458ea06efd7b Anatolij Gustschin 2009-12-11 1167 12458ea06efd7b Anatolij Gustschin 2009-12-11 1168 local_irq_restore(flags); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1169 } 12458ea06efd7b Anatolij Gustschin 2009-12-11 1170 12458ea06efd7b Anatolij Gustschin 2009-12-11 1171 /** 12458ea06efd7b Anatolij Gustschin 2009-12-11 1172 * ppc440spe_chan_get_current_descriptor - get the currently executed descriptor 12458ea06efd7b Anatolij Gustschin 2009-12-11 1173 */ 12458ea06efd7b Anatolij Gustschin 2009-12-11 1174 static u32 12458ea06efd7b Anatolij Gustschin 2009-12-11 1175 ppc440spe_chan_get_current_descriptor(struct ppc440spe_adma_chan *chan) 12458ea06efd7b Anatolij Gustschin 2009-12-11 1176 { 12458ea06efd7b Anatolij Gustschin 2009-12-11 1177 struct dma_regs *dma_reg; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1178 struct xor_regs *xor_reg; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1179 12458ea06efd7b Anatolij Gustschin 2009-12-11 1180 if (unlikely(!chan->hw_chain_inited)) 12458ea06efd7b Anatolij Gustschin 2009-12-11 1181 /* h/w descriptor chain is not initialized yet */ 12458ea06efd7b Anatolij Gustschin 2009-12-11 1182 return 0; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1183 12458ea06efd7b Anatolij Gustschin 2009-12-11 1184 switch (chan->device->id) { 12458ea06efd7b Anatolij Gustschin 2009-12-11 1185 case PPC440SPE_DMA0_ID: 12458ea06efd7b Anatolij Gustschin 2009-12-11 1186 case PPC440SPE_DMA1_ID: 12458ea06efd7b Anatolij Gustschin 2009-12-11 1187 dma_reg = chan->device->dma_reg; 12458ea06efd7b Anatolij Gustschin 2009-12-11 @1188 return ioread32(&dma_reg->acpl) & (~DMA_CDB_MSK); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1189 case PPC440SPE_XOR_ID: 12458ea06efd7b Anatolij Gustschin 2009-12-11 1190 xor_reg = chan->device->xor_reg; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1191 return ioread32be(&xor_reg->ccbalr); 12458ea06efd7b Anatolij Gustschin 2009-12-11 1192 } 12458ea06efd7b Anatolij Gustschin 2009-12-11 1193 return 0; 12458ea06efd7b Anatolij Gustschin 2009-12-11 1194 } 12458ea06efd7b Anatolij Gustschin 2009-12-11 1195 :::::: The code at line 1188 was first introduced by commit :::::: 12458ea06efd7b44281e68fe59c950ec7d59c649 ppc440spe-adma: adds updated ppc440spe adma driver :::::: TO: Anatolij Gustschin <ag...@denx.de> :::::: CC: Dan Williams <dan.j.willi...@intel.com> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
.config.gz
Description: application/gzip