From: kernel test robot <lkp@intel.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Michael Ellerman <mpe@ellerman.id.au>
Subject: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1052:13: sparse: sparse: incorrect type in assignment (different address spaces)
Date: Thu, 16 Sep 2021 05:11:53 +0800 [thread overview]
Message-ID: <202109160533.nq9RuZaq-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 7413 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 80be5998ad6339e3e804a772723390cb50b96428
commit: 6895c5ba7bdcc55eacad03cf309ab23be63b9cac powerpc/xmon: Select CONSOLE_POLL for the 8xx
date: 8 months ago
config: powerpc64-randconfig-s032-20210916 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 11.2.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.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6895c5ba7bdcc55eacad03cf309ab23be63b9cac
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6895c5ba7bdcc55eacad03cf309ab23be63b9cac
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc64
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/cpm_uart/cpm_uart_core.c:1052:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cpm_buf_desc volatile [usertype] *bdp @@ got struct cpm_buf_desc [noderef] [usertype] __iomem *rx_cur @@
drivers/tty/serial/cpm_uart/cpm_uart_core.c:1052:13: sparse: expected struct cpm_buf_desc volatile [usertype] *bdp
drivers/tty/serial/cpm_uart/cpm_uart_core.c:1052:13: sparse: got struct cpm_buf_desc [noderef] [usertype] __iomem *rx_cur
drivers/tty/serial/cpm_uart/cpm_uart_core.c:1071:21: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cpm_buf_desc volatile [usertype] *bdp @@ got struct cpm_buf_desc [noderef] [usertype] __iomem *rx_bd_base @@
drivers/tty/serial/cpm_uart/cpm_uart_core.c:1071:21: sparse: expected struct cpm_buf_desc volatile [usertype] *bdp
drivers/tty/serial/cpm_uart/cpm_uart_core.c:1071:21: sparse: got struct cpm_buf_desc [noderef] [usertype] __iomem *rx_bd_base
>> drivers/tty/serial/cpm_uart/cpm_uart_core.c:1074:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cpm_buf_desc [noderef] [usertype] __iomem *rx_cur @@ got struct cpm_buf_desc [usertype] * @@
drivers/tty/serial/cpm_uart/cpm_uart_core.c:1074:23: sparse: expected struct cpm_buf_desc [noderef] [usertype] __iomem *rx_cur
drivers/tty/serial/cpm_uart/cpm_uart_core.c:1074:23: sparse: got struct cpm_buf_desc [usertype] *
drivers/tty/serial/cpm_uart/cpm_uart_core.c:1279:39: sparse: sparse: context imbalance in 'cpm_uart_console_write' - unexpected unlock
vim +1052 drivers/tty/serial/cpm_uart/cpm_uart_core.c
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1043
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1044 static int poll_wait_key(char *obuf, struct uart_cpm_port *pinfo)
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1045 {
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1046 u_char c, *cp;
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1047 volatile cbd_t *bdp;
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1048 int i;
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1049
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1050 /* Get the address of the host memory buffer.
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1051 */
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 @1052 bdp = pinfo->rx_cur;
be28c1e3ca2988 drivers/tty/serial/cpm_uart/cpm_uart_core.c Christophe Leroy 2018-09-14 1053 if (bdp->cbd_sc & BD_SC_EMPTY)
be28c1e3ca2988 drivers/tty/serial/cpm_uart/cpm_uart_core.c Christophe Leroy 2018-09-14 1054 return NO_POLL_CHAR;
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1055
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1056 /* If the buffer address is in the CPM DPRAM, don't
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1057 * convert it.
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1058 */
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1059 cp = cpm2cpu_addr(bdp->cbd_bufaddr, pinfo);
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1060
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1061 if (obuf) {
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1062 i = c = bdp->cbd_datlen;
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1063 while (i-- > 0)
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1064 *obuf++ = *cp++;
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1065 } else
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1066 c = *cp;
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1067 bdp->cbd_sc &= ~(BD_SC_BR | BD_SC_FR | BD_SC_PR | BD_SC_OV | BD_SC_ID);
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1068 bdp->cbd_sc |= BD_SC_EMPTY;
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1069
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1070 if (bdp->cbd_sc & BD_SC_WRAP)
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1071 bdp = pinfo->rx_bd_base;
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1072 else
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1073 bdp++;
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 @1074 pinfo->rx_cur = (cbd_t *)bdp;
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1075
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1076 return (int)c;
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1077 }
8e21d04c077c50 drivers/serial/cpm_uart/cpm_uart_core.c Jason Wessel 2008-07-23 1078
:::::: The code at line 1052 was first introduced by commit
:::::: 8e21d04c077c50284bdad10fda8f8cea674458e1 kgdb: kgdboc console poll hooks for cpm uart
:::::: TO: Jason Wessel <jason.wessel@windriver.com>
:::::: CC: Jason Wessel <jason.wessel@windriver.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: 35057 bytes --]
next reply other threads:[~2021-09-15 21:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-15 21:11 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-08-25 17:47 drivers/tty/serial/cpm_uart/cpm_uart_core.c:1052:13: sparse: sparse: incorrect type in assignment (different address spaces) kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202109160533.nq9RuZaq-lkp@intel.com \
--to=lkp@intel.com \
--cc=christophe.leroy@csgroup.eu \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpe@ellerman.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).