linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/tty/serial/cpm_uart/cpm_uart_core.c:1052:13: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2021-08-25 17:47 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-08-25 17:47 UTC (permalink / raw)
  To: Christophe Leroy; +Cc: kbuild-all, linux-kernel, Michael Ellerman

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6e764bcd1cf72a2846c0e53d3975a09b242c04c9
commit: 6895c5ba7bdcc55eacad03cf309ab23be63b9cac powerpc/xmon: Select CONSOLE_POLL for the 8xx
date:   7 months ago
config: powerpc-randconfig-s032-20210825 (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.3-348-gf0e6938b-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=powerpc 

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: 35468 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* drivers/tty/serial/cpm_uart/cpm_uart_core.c:1052:13: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2021-09-15 21:11 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-09-15 21:11 UTC (permalink / raw)
  To: Christophe Leroy; +Cc: kbuild-all, linux-kernel, Michael Ellerman

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-15 21:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-09-15 21:11 kernel test robot

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).