drivers/tty/serial/ucc_uart.c:264:21: sparse: sparse: incorrect type in argument 1 (different address spaces)

kernel test robot
2020-06-05T05:54:08Z

[-- Attachment #1: Type: text/plain, Size: 18666 bytes --]

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 435faf5c218a47fd6258187f62d9bb1009717896
commit: 5a35435ef4e6e4bd2aabd6706b146b298a9cffe5 soc: fsl: qe: remove PPC32 dependency from CONFIG_QUICC_ENGINE
date: 6 months ago
config: arm-randconfig-s031-20200605 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-246-g41f651b4-dirty
git checkout 5a35435ef4e6e4bd2aabd6706b146b298a9cffe5
# save the attached .config to linux build tree
make W=1 C=1 ARCH=arm CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

sparse warnings: (new ones prefixed by >>)

>> drivers/tty/serial/ucc_uart.c:264:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
>> drivers/tty/serial/ucc_uart.c:264:21: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:264:21: sparse: got restricted __be16 *
>> drivers/tty/serial/ucc_uart.c:264:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
>> drivers/tty/serial/ucc_uart.c:264:21: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:264:21: sparse: got restricted __be16 *
>> drivers/tty/serial/ucc_uart.c:264:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
>> drivers/tty/serial/ucc_uart.c:264:21: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:264:21: sparse: got restricted __be16 *
>> drivers/tty/serial/ucc_uart.c:264:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
>> drivers/tty/serial/ucc_uart.c:264:21: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:264:21: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:268:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:268:21: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:268:21: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:268:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:268:21: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:268:21: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:268:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:268:21: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:268:21: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:268:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:268:21: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:268:21: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:286:6: sparse: sparse: symbol 'qe_uart_set_mctrl' was not declared. Should it be static?
drivers/tty/serial/ucc_uart.c:349:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:349:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:349:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:350:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:350:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:350:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:350:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:350:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:350:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:350:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:350:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:350:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:350:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:350:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:350:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:350:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:350:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:350:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:350:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:350:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:350:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:350:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:350:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:350:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:350:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:350:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:350:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:350:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:350:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:350:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:350:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:350:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:350:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:350:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:350:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:350:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:350:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:350:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:350:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:350:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:350:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:350:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:350:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:350:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:350:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:350:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:350:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:350:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:350:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:350:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:350:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:350:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:350:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:350:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:352:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:352:21: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:352:21: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:352:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:352:21: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:352:21: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:352:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:352:21: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:352:21: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:352:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:352:21: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:352:21: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:371:18: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:371:18: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:371:18: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:371:18: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:371:18: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:371:18: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:371:18: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:371:18: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:371:18: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:371:18: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:371:18: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:371:18: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:384:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:384:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:384:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:385:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:385:17: sparse: expected void const volatile [noderef] <asn:2> *
drivers/tty/serial/ucc_uart.c:385:17: sparse: got restricted __be16 *
drivers/tty/serial/ucc_uart.c:385:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got restricted __be16 * @@
drivers/tty/serial/ucc_uart.c:385:17: sparse: expected void const volatile [noderef] <asn:2> *

vim +264 drivers/tty/serial/ucc_uart.c

d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 248
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 249 /*
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 250 * Return 1 if the QE is done transmitting all buffers for this port
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 251 *
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 252 * This function scans each BD in sequence. If we find a BD that is not
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 253 * ready (READY=1), then we return 0 indicating that the QE is still sending
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 254 * data. If we reach the last BD (WRAP=1), then we know we've scanned
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 255 * the entire list, and all BDs are done.
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 256 */
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 257 static unsigned int qe_uart_tx_empty(struct uart_port *port)
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 258 {
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 259 struct uart_qe_port *qe_port =
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 260 container_of(port, struct uart_qe_port, port);
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 261 struct qe_bd *bdp = qe_port->tx_bd_base;
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 262
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 263 while (1) {
8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 @264 if (qe_ioread16be(&bdp->status) & BD_SC_READY)
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 265 /* This BD is not done, so return "not done" */
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 266 return 0;
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 267
8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 268 if (qe_ioread16be(&bdp->status) & BD_SC_WRAP)
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 269 /*
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 270 * This BD is done and it's the last one, so return
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 271 * "done"
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 272 */
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 273 return 1;
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 274
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 275 bdp++;
fc811472c2167c drivers/tty/serial/ucc_uart.c Joe Perches 2013-10-08 276 }
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 277 }
d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 278

:::::: The code at line 264 was first introduced by commit
:::::: 8b1cdc4033bd1659c5499c918d4e59bf8253abec serial: ucc_uart: replace ppc-specific IO accessors

:::::: TO: Rasmus Villemoes <linux@rasmusvillemoes.dk>
:::::: CC: Li Yang <leoyang.li@nxp.com>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24513 bytes --]