tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 27bba9c532a8d21050b94224ffd310ad0058c353 commit: 4be002f1dec8418d88bbc556a0dfbaa9adc38ab0 serial: ucc_uart: make qe_uart_set_mctrl() static date: 9 weeks ago config: alpha-randconfig-s032-20201122 (attached as .config) compiler: alpha-linux-gcc (GCC) 9.3.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-134-gb59dbdaf-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4be002f1dec8418d88bbc556a0dfbaa9adc38ab0 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 4be002f1dec8418d88bbc556a0dfbaa9adc38ab0 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=alpha If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot "sparse warnings: (new ones prefixed by >>)" drivers/tty/serial/ucc_uart.c:512:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:512:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:512:17: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:512:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:512:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:512:17: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:512:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:512:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:512:17: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:512:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:512:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:512:17: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:512:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:512:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:512:17: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:512:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:512:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:512:17: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:512:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:512:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:512:17: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:512:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:512:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:512:17: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:512:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:512:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:512:17: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:512:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:512:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:512:17: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:512:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:512:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:512:17: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:512:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:512:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:512:17: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:512:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:512:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:512:17: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:512:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:512:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:512:17: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:512:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:512:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:512:17: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:512:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:512:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:512:17: sparse: expected void [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:512:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:515:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:515:21: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:515:21: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:515:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:515:21: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:515:21: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:515:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:515:21: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:515:21: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:515:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:515:21: sparse: expected void const [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:515:21: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:604:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:604:17: sparse: expected void [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:604:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:605:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got restricted __be32 * @@ drivers/tty/serial/ucc_uart.c:605:17: sparse: expected void [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:605:17: sparse: got restricted __be32 * drivers/tty/serial/ucc_uart.c:606:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:606:17: sparse: expected void [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:606:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:612:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:612:9: sparse: expected void [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:612:9: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:613:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got restricted __be32 * @@ drivers/tty/serial/ucc_uart.c:613:9: sparse: expected void [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:613:9: sparse: got restricted __be32 * drivers/tty/serial/ucc_uart.c:614:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:614:9: sparse: expected void [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:614:9: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:625:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:625:17: sparse: expected void [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:625:17: sparse: got restricted __be16 * drivers/tty/serial/ucc_uart.c:626:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got restricted __be32 * @@ drivers/tty/serial/ucc_uart.c:626:17: sparse: expected void [noderef] __iomem *addr 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] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:627:17: sparse: expected void [noderef] __iomem *addr 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] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:637:9: sparse: expected void [noderef] __iomem *addr 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] __iomem *addr @@ got restricted __be32 * @@ drivers/tty/serial/ucc_uart.c:638:9: sparse: expected void [noderef] __iomem *addr 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] __iomem *addr @@ got restricted __be16 * @@ drivers/tty/serial/ucc_uart.c:639:9: sparse: expected void [noderef] __iomem *addr 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_pram [noderef] __iomem *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] __iomem *uccup >> drivers/tty/serial/ucc_uart.c:661:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got unsigned char * @@ drivers/tty/serial/ucc_uart.c:661:9: sparse: expected void [noderef] __iomem *addr drivers/tty/serial/ucc_uart.c:661:9: sparse: got unsigned char * drivers/tty/serial/ucc_uart.c:662:9: sparse: sparse: too many warnings vim +661 drivers/tty/serial/ucc_uart.c d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 641 d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 642 /* d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 643 * Initialize a UCC for UART. d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 644 * d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 645 * This function configures a given UCC to be used as a UART device. Basic d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 646 * UCC initialization is handled in qe_uart_request_port(). This function d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 647 * does all the UART-specific stuff. d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 648 */ d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 649 static void qe_uart_init_ucc(struct uart_qe_port *qe_port) d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 650 { d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 651 u32 cecr_subblock; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 652 struct ucc_slow __iomem *uccp = qe_port->uccp; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 653 struct ucc_uart_pram *uccup = qe_port->uccup; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 654 d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 655 unsigned int i; d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 656 d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 657 /* First, disable TX and RX in the UCC */ d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 658 ucc_slow_disable(qe_port->us_private, COMM_DIR_RX_AND_TX); d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 659 d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 660 /* Program the UCC UART parameter RAM */ 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 @661 qe_iowrite8(UCC_BMR_GBL | UCC_BMR_BO_BE, &uccup->common.rbmr); 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 662 qe_iowrite8(UCC_BMR_GBL | UCC_BMR_BO_BE, &uccup->common.tbmr); 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 663 qe_iowrite16be(qe_port->rx_fifosize, &uccup->common.mrblr); 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 664 qe_iowrite16be(0x10, &uccup->maxidl); 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 665 qe_iowrite16be(1, &uccup->brkcr); 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 666 qe_iowrite16be(0, &uccup->parec); 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 667 qe_iowrite16be(0, &uccup->frmec); 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 668 qe_iowrite16be(0, &uccup->nosec); 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 669 qe_iowrite16be(0, &uccup->brkec); 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 670 qe_iowrite16be(0, &uccup->uaddr[0]); 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 671 qe_iowrite16be(0, &uccup->uaddr[1]); 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 672 qe_iowrite16be(0, &uccup->toseq); d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 673 for (i = 0; i < 8; i++) 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 674 qe_iowrite16be(0xC000, &uccup->cchars[i]); 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 675 qe_iowrite16be(0xc0ff, &uccup->rccm); d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 676 d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 677 /* Configure the GUMR registers for UART */ b45cc9eff72e08 drivers/serial/ucc_uart.c Dave Liu 2009-06-08 678 if (soft_uart) { d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 679 /* Soft-UART requires a 1X multiplier for TX */ 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 680 qe_clrsetbits_be32(&uccp->gumr_l, 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 681 UCC_SLOW_GUMR_L_MODE_MASK | UCC_SLOW_GUMR_L_TDCR_MASK | UCC_SLOW_GUMR_L_RDCR_MASK, 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 682 UCC_SLOW_GUMR_L_MODE_UART | UCC_SLOW_GUMR_L_TDCR_1 | UCC_SLOW_GUMR_L_RDCR_16); b45cc9eff72e08 drivers/serial/ucc_uart.c Dave Liu 2009-06-08 683 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 684 qe_clrsetbits_be32(&uccp->gumr_h, UCC_SLOW_GUMR_H_RFW, b45cc9eff72e08 drivers/serial/ucc_uart.c Dave Liu 2009-06-08 685 UCC_SLOW_GUMR_H_TRX | UCC_SLOW_GUMR_H_TTX); b45cc9eff72e08 drivers/serial/ucc_uart.c Dave Liu 2009-06-08 686 } else { 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 687 qe_clrsetbits_be32(&uccp->gumr_l, 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 688 UCC_SLOW_GUMR_L_MODE_MASK | UCC_SLOW_GUMR_L_TDCR_MASK | UCC_SLOW_GUMR_L_RDCR_MASK, 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 689 UCC_SLOW_GUMR_L_MODE_UART | UCC_SLOW_GUMR_L_TDCR_16 | UCC_SLOW_GUMR_L_RDCR_16); d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 690 8b1cdc4033bd16 drivers/tty/serial/ucc_uart.c Rasmus Villemoes 2019-11-28 691 qe_clrsetbits_be32(&uccp->gumr_h, b45cc9eff72e08 drivers/serial/ucc_uart.c Dave Liu 2009-06-08 692 UCC_SLOW_GUMR_H_TRX | UCC_SLOW_GUMR_H_TTX, b45cc9eff72e08 drivers/serial/ucc_uart.c Dave Liu 2009-06-08 693 UCC_SLOW_GUMR_H_RFW); b45cc9eff72e08 drivers/serial/ucc_uart.c Dave Liu 2009-06-08 694 } d7584ed2b994a5 drivers/serial/ucc_uart.c Timur Tabi 2008-01-15 695 :::::: The code at line 661 was first introduced by commit :::::: 8b1cdc4033bd1659c5499c918d4e59bf8253abec serial: ucc_uart: replace ppc-specific IO accessors :::::: TO: Rasmus Villemoes :::::: CC: Li Yang --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org