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 help
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/37406982]
url:
https://github.com/0day-ci/linux/commits/Li-Yang/Fix-sparse-warnings-for-...
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=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
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] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:627:17: sparse: expected void [noderef] <asn:2>
*
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 argument 2
(different address spaces) @@ expected void [noderef] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:637:9: sparse: expected void [noderef] <asn:2>
*
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 argument 2
(different address spaces) @@ expected void [noderef] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:638:9: sparse: expected void [noderef] <asn:2>
*
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 argument 2
(different address spaces) @@ expected void [noderef] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:639:9: sparse: expected void [noderef] <asn:2>
*
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_uart_pram *uccup
drivers/tty/serial/ucc_uart.c:653:46: sparse: got struct ucc_uart_pram [noderef]
<asn:2> *uccup
drivers/tty/serial/ucc_uart.c:661:9: sparse: sparse: incorrect type in argument 2
(different address spaces) @@ expected void [noderef] <asn:2> * @@ got eref]
<asn:2> * @@
drivers/tty/serial/ucc_uart.c:661:9: sparse: expected void [noderef] <asn:2>
*
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 argument 2
(different address spaces) @@ expected void [noderef] <asn:2> * @@ got eref]
<asn:2> * @@
drivers/tty/serial/ucc_uart.c:662:9: sparse: expected void [noderef] <asn:2>
*
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 argument 2
(different address spaces) @@ expected void [noderef] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:663:9: sparse: expected void [noderef] <asn:2>
*
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 argument 2
(different address spaces) @@ expected void [noderef] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:664:9: sparse: expected void [noderef] <asn:2>
*
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 argument 2
(different address spaces) @@ expected void [noderef] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:665:9: sparse: expected void [noderef] <asn:2>
*
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 argument 2
(different address spaces) @@ expected void [noderef] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:666:9: sparse: expected void [noderef] <asn:2>
*
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 argument 2
(different address spaces) @@ expected void [noderef] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:667:9: sparse: expected void [noderef] <asn:2>
*
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 argument 2
(different address spaces) @@ expected void [noderef] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:668:9: sparse: expected void [noderef] <asn:2>
*
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 argument 2
(different address spaces) @@ expected void [noderef] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:669:9: sparse: expected void [noderef] <asn:2>
*
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 argument 2
(different address spaces) @@ expected void [noderef] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:670:9: sparse: expected void [noderef] <asn:2>
*
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 argument 2
(different address spaces) @@ expected void [noderef] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:671:9: sparse: expected void [noderef] <asn:2>
*
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 argument 2
(different address spaces) @@ expected void [noderef] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:672:9: sparse: expected void [noderef] <asn:2>
*
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] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:674:17: sparse: expected void [noderef] <asn:2>
*
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 argument 2
(different address spaces) @@ expected void [noderef] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:675:9: sparse: expected void [noderef] <asn:2>
*
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] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:713:17: sparse: expected void [noderef] <asn:2>
*
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] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:714:17: sparse: expected void [noderef] <asn:2>
*
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] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:715:17: sparse: expected void [noderef] <asn:2>
*
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] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:716:17: sparse: expected void [noderef] <asn:2>
*
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] <asn:2> * @@ got eref]
<asn:2> * @@
drivers/tty/serial/ucc_uart.c:717:17: sparse: expected void [noderef] <asn:2>
*
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] <asn:2> * @@ got eref]
<asn:2> * @@
drivers/tty/serial/ucc_uart.c:718:17: sparse: expected void [noderef] <asn:2>
*
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] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:719:17: sparse: expected void [noderef] <asn:2>
*
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] <asn:2> * @@ got eref]
<asn:2> * @@
drivers/tty/serial/ucc_uart.c:720:17: sparse: expected void [noderef] <asn:2>
*
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] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:721:17: sparse: expected void [noderef] <asn:2>
*
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] <asn:2> * @@ got eref]
<asn:2> * @@
drivers/tty/serial/ucc_uart.c:722:17: sparse: expected void [noderef] <asn:2>
*
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] <asn:2> * @@ got eref]
<asn:2> * @@
drivers/tty/serial/ucc_uart.c:724:17: sparse: expected void [noderef] <asn:2>
*
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] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:726:17: sparse: expected void [noderef] <asn:2>
*
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] <asn:2> * @@ got eref]
<asn:2> * @@
drivers/tty/serial/ucc_uart.c:727:17: sparse: expected void [noderef] <asn:2>
*
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] <asn:2> * @@ got
[noderef] <asn:2> * @@
drivers/tty/serial/ucc_uart.c:728:17: sparse: expected void [noderef] <asn:2>
*
drivers/tty/serial/ucc_uart.c:728:17: sparse: got restricted __be16 *
> drivers/tty/serial/ucc_uart.c:1000:27: sparse: sparse: cast
removes address space '<asn:2>' 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] <asn:2>
*uccup @@ got am [noderef] <asn:2> *uccup @@
drivers/tty/serial/ucc_uart.c:1000:24: sparse: expected struct ucc_uart_pram
[noderef] <asn:2> *uccup
drivers/tty/serial/ucc_uart.c:1000:24: sparse: got struct ucc_uart_pram *
> drivers/tty/serial/ucc_uart.c:1001:29: sparse: sparse: incorrect
type in assignment (different address spaces) @@ expected struct qe_bd *rx_bd_base @@
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 [noderef]
<asn:2> *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_base @@ 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 [noderef]
<asn:2> *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 * Allocate 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 static 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 struct
uart_qe_port *qe_port =
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 984
container_of(port, struct uart_qe_port, port);
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 985 struct
ucc_slow_info *us_info = &qe_port->us_info;
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 986 struct
ucc_slow_private *uccs;
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 987 unsigned int
rx_size, tx_size;
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 988 void *bd_virt;
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 989 dma_addr_t
bd_dma_addr = 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 =
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
dev_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 return 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 = uccs;
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 999 qe_port->uccp =
uccs->us_regs;
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 @1000 qe_port->uccup
= (struct ucc_uart_pram *) uccs->us_pram;
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 @1001
qe_port->rx_bd_base = uccs->rx_bd;
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 @1002
qe_port->tx_bd_base = 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 =
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 =
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 =
dma_alloc_coherent(port->dev, rx_size + tx_size, &bd_dma_addr,
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1012 GFP_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
dev_err(port->dev, "could not allocate buffer descriptors\n");
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1015 return -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 = bd_virt;
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1019
qe_port->bd_dma_addr = bd_dma_addr;
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1020
qe_port->bd_size = 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
= bd_virt;
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 1023 qe_port->tx_buf
= 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 return 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 support for
Freescale QUICCEngine UART
:::::: TO: Timur Tabi <timur(a)freescale.com>
:::::: CC: Kumar Gala <galak(a)kernel.crashing.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org