Content-Type: multipart/mixed; boundary="===============1953458546693651583==" MIME-Version: 1.0 From: kbuild test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH 6/6] soc: fsl: qe: fix sparse warnings for ucc_slow.c Date: Tue, 17 Mar 2020 04:06:16 +0800 Message-ID: <202003170454.xzX3NyMw%lkp@intel.com> In-Reply-To: <20200312222827.17409-7-leoyang.li@nxp.com> List-Id: --===============1953458546693651583== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Li, I love your patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.6-rc6 next-20200316] [if your patch is applied to the wrong git tree, please drop us a note to h= elp improve the system. BTW, we also suggest to use '--base' option to specify = the base tree in git format-patch, please see https://stackoverflow.com/a/37406= 982] url: https://github.com/0day-ci/linux/commits/Li-Yang/Fix-sparse-warning= s-for-common-qe-library-code/20200313-071045 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git = 807f030b44ccbb26a346df6f6438628315d9ad98 reproduce: # apt-get install sparse # sparse version: v0.6.1-175-g9d31ee5f-dirty make ARCH=3Dx86_64 allmodconfig make C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag Reported-by: kbuild test robot sparse warnings: (new ones prefixed by >>) drivers/tty/serial/ucc_uart.c:626:17: sparse: got restricted __be32 * drivers/tty/serial/ucc_uart.c:627:17: sparse: sparse: incorrect type in = argument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:627:17: sparse: expected void [noderef]= * drivers/tty/serial/ucc_uart.c:627:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:637:9: sparse: sparse: incorrect type in a= rgument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:637:9: sparse: expected void [noderef] = * drivers/tty/serial/ucc_uart.c:637:9: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:638:9: sparse: sparse: incorrect type in a= rgument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:638:9: sparse: expected void [noderef] = * drivers/tty/serial/ucc_uart.c:638:9: sparse: got restricted __be32 * drivers/tty/serial/ucc_uart.c:639:9: sparse: sparse: incorrect type in a= rgument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:639:9: sparse: expected void [noderef] = * drivers/tty/serial/ucc_uart.c:639:9: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:653:46: sparse: sparse: incorrect type in = initializer (different address spaces) @@ expected struct ucc_uart_pram = *uccup @@ got struct ucc_uart_prstruct ucc_uart_pram *uccup @@ drivers/tty/serial/ucc_uart.c:653:46: sparse: expected struct ucc_uar= t_pram *uccup drivers/tty/serial/ucc_uart.c:653:46: sparse: got struct ucc_uart_pra= m [noderef] *uccup drivers/tty/serial/ucc_uart.c:661:9: sparse: sparse: incorrect type in a= rgument 2 (different address spaces) @@ expected void [noderef] = * @@ got eref] * @@ drivers/tty/serial/ucc_uart.c:661:9: sparse: expected void [noderef] = * drivers/tty/serial/ucc_uart.c:661:9: sparse: got unsigned char * drivers/tty/serial/ucc_uart.c:662:9: sparse: sparse: incorrect type in a= rgument 2 (different address spaces) @@ expected void [noderef] = * @@ got eref] * @@ drivers/tty/serial/ucc_uart.c:662:9: sparse: expected void [noderef] = * drivers/tty/serial/ucc_uart.c:662:9: sparse: got unsigned char * drivers/tty/serial/ucc_uart.c:663:9: sparse: sparse: incorrect type in a= rgument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:663:9: sparse: expected void [noderef] = * drivers/tty/serial/ucc_uart.c:663:9: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:664:9: sparse: sparse: incorrect type in a= rgument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:664:9: sparse: expected void [noderef] = * drivers/tty/serial/ucc_uart.c:664:9: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:665:9: sparse: sparse: incorrect type in a= rgument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:665:9: sparse: expected void [noderef] = * drivers/tty/serial/ucc_uart.c:665:9: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:666:9: sparse: sparse: incorrect type in a= rgument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:666:9: sparse: expected void [noderef] = * drivers/tty/serial/ucc_uart.c:666:9: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:667:9: sparse: sparse: incorrect type in a= rgument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:667:9: sparse: expected void [noderef] = * drivers/tty/serial/ucc_uart.c:667:9: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:668:9: sparse: sparse: incorrect type in a= rgument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:668:9: sparse: expected void [noderef] = * drivers/tty/serial/ucc_uart.c:668:9: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:669:9: sparse: sparse: incorrect type in a= rgument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:669:9: sparse: expected void [noderef] = * drivers/tty/serial/ucc_uart.c:669:9: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:670:9: sparse: sparse: incorrect type in a= rgument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:670:9: sparse: expected void [noderef] = * drivers/tty/serial/ucc_uart.c:670:9: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:671:9: sparse: sparse: incorrect type in a= rgument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:671:9: sparse: expected void [noderef] = * drivers/tty/serial/ucc_uart.c:671:9: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:672:9: sparse: sparse: incorrect type in a= rgument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:672:9: sparse: expected void [noderef] = * drivers/tty/serial/ucc_uart.c:672:9: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:674:17: sparse: sparse: incorrect type in = argument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:674:17: sparse: expected void [noderef]= * drivers/tty/serial/ucc_uart.c:674:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:675:9: sparse: sparse: incorrect type in a= rgument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:675:9: sparse: expected void [noderef] = * drivers/tty/serial/ucc_uart.c:675:9: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:713:17: sparse: sparse: incorrect type in = argument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:713:17: sparse: expected void [noderef]= * drivers/tty/serial/ucc_uart.c:713:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:714:17: sparse: sparse: incorrect type in = argument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:714:17: sparse: expected void [noderef]= * drivers/tty/serial/ucc_uart.c:714:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:715:17: sparse: sparse: incorrect type in = argument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:715:17: sparse: expected void [noderef]= * drivers/tty/serial/ucc_uart.c:715:17: sparse: got restricted __be32 * drivers/tty/serial/ucc_uart.c:716:17: sparse: sparse: incorrect type in = argument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:716:17: sparse: expected void [noderef]= * drivers/tty/serial/ucc_uart.c:716:17: sparse: got restricted __be32 * drivers/tty/serial/ucc_uart.c:717:17: sparse: sparse: incorrect type in = argument 2 (different address spaces) @@ expected void [noderef] = * @@ got eref] * @@ drivers/tty/serial/ucc_uart.c:717:17: sparse: expected void [noderef]= * drivers/tty/serial/ucc_uart.c:717:17: sparse: got unsigned char * drivers/tty/serial/ucc_uart.c:718:17: sparse: sparse: incorrect type in = argument 2 (different address spaces) @@ expected void [noderef] = * @@ got eref] * @@ drivers/tty/serial/ucc_uart.c:718:17: sparse: expected void [noderef]= * drivers/tty/serial/ucc_uart.c:718:17: sparse: got unsigned char * drivers/tty/serial/ucc_uart.c:719:17: sparse: sparse: incorrect type in = argument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:719:17: sparse: expected void [noderef]= * drivers/tty/serial/ucc_uart.c:719:17: sparse: got restricted __be32 * drivers/tty/serial/ucc_uart.c:720:17: sparse: sparse: incorrect type in = argument 2 (different address spaces) @@ expected void [noderef] = * @@ got eref] * @@ drivers/tty/serial/ucc_uart.c:720:17: sparse: expected void [noderef]= * drivers/tty/serial/ucc_uart.c:720:17: sparse: got unsigned char * drivers/tty/serial/ucc_uart.c:721:17: sparse: sparse: incorrect type in = argument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:721:17: sparse: expected void [noderef]= * drivers/tty/serial/ucc_uart.c:721:17: sparse: got restricted __be32 * drivers/tty/serial/ucc_uart.c:722:17: sparse: sparse: incorrect type in = argument 2 (different address spaces) @@ expected void [noderef] = * @@ got eref] * @@ drivers/tty/serial/ucc_uart.c:722:17: sparse: expected void [noderef]= * drivers/tty/serial/ucc_uart.c:722:17: sparse: got unsigned char * drivers/tty/serial/ucc_uart.c:724:17: sparse: sparse: incorrect type in = argument 2 (different address spaces) @@ expected void [noderef] = * @@ got eref] * @@ drivers/tty/serial/ucc_uart.c:724:17: sparse: expected void [noderef]= * drivers/tty/serial/ucc_uart.c:724:17: sparse: got unsigned char * drivers/tty/serial/ucc_uart.c:726:17: sparse: sparse: incorrect type in = argument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:726:17: sparse: expected void [noderef]= * drivers/tty/serial/ucc_uart.c:726:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:727:17: sparse: sparse: incorrect type in = argument 2 (different address spaces) @@ expected void [noderef] = * @@ got eref] * @@ drivers/tty/serial/ucc_uart.c:727:17: sparse: expected void [noderef]= * drivers/tty/serial/ucc_uart.c:727:17: sparse: got unsigned char * drivers/tty/serial/ucc_uart.c:728:17: sparse: sparse: incorrect type in = argument 2 (different address spaces) @@ expected void [noderef] = * @@ got [noderef] * @@ drivers/tty/serial/ucc_uart.c:728:17: sparse: expected void [noderef]= * drivers/tty/serial/ucc_uart.c:728:17: sparse: got restricted __be16 * >> drivers/tty/serial/ucc_uart.c:1000:27: sparse: sparse: cast removes addr= ess space '' of expression drivers/tty/serial/ucc_uart.c:1000:24: sparse: sparse: incorrect type in= assignment (different address spaces) @@ expected struct ucc_uart_pram = [noderef] *uccup @@ got am [noderef] *uccup @@ drivers/tty/serial/ucc_uart.c:1000:24: sparse: expected struct ucc_ua= rt_pram [noderef] *uccup drivers/tty/serial/ucc_uart.c:1000:24: sparse: got struct ucc_uart_pr= am * >> drivers/tty/serial/ucc_uart.c:1001:29: sparse: sparse: incorrect type in= assignment (different address spaces) @@ expected struct qe_bd *rx_bd_b= ase @@ got struct qe_bd [nodestruct qe_bd *rx_bd_base @@ >> drivers/tty/serial/ucc_uart.c:1001:29: sparse: expected struct qe_bd = *rx_bd_base >> drivers/tty/serial/ucc_uart.c:1001:29: sparse: got struct qe_bd [node= ref] *rx_bd >> drivers/tty/serial/ucc_uart.c:1002:29: sparse: sparse: incorrect type in= assignment (different address spaces) @@ expected struct qe_bd *tx_bd_b= ase @@ got struct qe_bd [nodestruct qe_bd *tx_bd_base @@ >> drivers/tty/serial/ucc_uart.c:1002:29: sparse: expected struct qe_bd = *tx_bd_base >> drivers/tty/serial/ucc_uart.c:1002:29: sparse: got struct qe_bd [node= ref] *tx_bd vim +1000 drivers/tty/serial/ucc_uart.c d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 976 = d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 977 /* d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 978 * A= llocate any memory and I/O resources required by the port. d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 979 */ d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 980 stat= ic int qe_uart_request_port(struct uart_port *port) d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 981 { d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 982 int= ret; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 983 str= uct uart_qe_port *qe_port =3D d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 984 co= ntainer_of(port, struct uart_qe_port, port); d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 985 str= uct ucc_slow_info *us_info =3D &qe_port->us_info; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 986 str= uct ucc_slow_private *uccs; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 987 uns= igned int rx_size, tx_size; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 988 voi= d *bd_virt; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 989 dma= _addr_t bd_dma_addr =3D 0; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 990 = d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 991 ret= =3D ucc_slow_init(us_info, &uccs); d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 992 if = (ret) { d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 993 de= v_err(port->dev, "could not initialize UCC%u\n", d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 994 = qe_port->ucc_num); d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 995 re= turn ret; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 996 } d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 997 = d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 998 qe_= port->us_private =3D uccs; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 999 qe_= port->uccp =3D uccs->us_regs; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 @1000 qe_= port->uccup =3D (struct ucc_uart_pram *) uccs->us_pram; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 @1001 qe_= port->rx_bd_base =3D uccs->rx_bd; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 @1002 qe_= port->tx_bd_base =3D uccs->tx_bd; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1003 = d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1004 /* d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1005 * = Allocate the transmit and receive data buffers. d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1006 */ d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1007 = d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1008 rx_= size =3D L1_CACHE_ALIGN(qe_port->rx_nrfifos * qe_port->rx_fifosize); d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1009 tx_= size =3D L1_CACHE_ALIGN(qe_port->tx_nrfifos * qe_port->tx_fifosize); d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1010 = 8b05cefca73bfb drivers/serial/ucc_uart.c Becky Bruce 2008-09-12 1011 bd_= virt =3D dma_alloc_coherent(port->dev, rx_size + tx_size, &bd_dma_addr, d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1012 GF= P_KERNEL); d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1013 if = (!bd_virt) { d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1014 de= v_err(port->dev, "could not allocate buffer descriptors\n"); d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1015 re= turn -ENOMEM; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1016 } d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1017 = d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1018 qe_= port->bd_virt =3D bd_virt; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1019 qe_= port->bd_dma_addr =3D bd_dma_addr; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1020 qe_= port->bd_size =3D rx_size + tx_size; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1021 = d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1022 qe_= port->rx_buf =3D bd_virt; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1023 qe_= port->tx_buf =3D qe_port->rx_buf + rx_size; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1024 = d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1025 ret= urn 0; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1026 } d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1027 = :::::: The code at line 1000 was first introduced by commit :::::: d7584ed2b994a572326650b0c4d2c25961e6f49d [POWERPC] qe-uart: add supp= ort for Freescale QUICCEngine UART :::::: TO: Timur Tabi :::::: CC: Kumar Gala --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============1953458546693651583==--