lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202204032039.TEInlRXP-lkp@intel.com>
Date:   Sun, 3 Apr 2022 20:24:36 +0800
From:   kernel test robot <lkp@...el.com>
To:     Etienne Carriere <etienne.carriere@...aro.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Sudeep Holla <sudeep.holla@....com>,
        Cristian Marussi <cristian.marussi@....com>
Subject: drivers/firmware/arm_scmi/optee.c:428:20: sparse: sparse: incorrect
 type in return expression (different address spaces)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   be2d3ecedd9911fbfd7e55cc9ceac5f8b79ae4cf
commit: 5f90f189a052f6fc46048f6ce29a37b709548b81 firmware: arm_scmi: Add optee transport
date:   5 months ago
config: arm64-randconfig-s031-20220403 (https://download.01.org/0day-ci/archive/20220403/202204032039.TEInlRXP-lkp@intel.com/config)
compiler: aarch64-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=5f90f189a052f6fc46048f6ce29a37b709548b81
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 5f90f189a052f6fc46048f6ce29a37b709548b81
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/bus/ drivers/firmware/arm_scmi/ drivers/firmware/meson/

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


sparse warnings: (new ones prefixed by >>)
   drivers/firmware/arm_scmi/optee.c:295:24: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct scmi_shared_mem [noderef] __iomem *shmem @@     got void * @@
   drivers/firmware/arm_scmi/optee.c:295:24: sparse:     expected struct scmi_shared_mem [noderef] __iomem *shmem
   drivers/firmware/arm_scmi/optee.c:295:24: sparse:     got void *
   drivers/firmware/arm_scmi/optee.c:296:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *p @@     got struct scmi_shared_mem [noderef] __iomem *shmem @@
   drivers/firmware/arm_scmi/optee.c:296:23: sparse:     expected void *p
   drivers/firmware/arm_scmi/optee.c:296:23: sparse:     got struct scmi_shared_mem [noderef] __iomem *shmem
>> drivers/firmware/arm_scmi/optee.c:428:20: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected struct scmi_shared_mem * @@     got struct scmi_shared_mem [noderef] __iomem *shmem @@
   drivers/firmware/arm_scmi/optee.c:428:20: sparse:     expected struct scmi_shared_mem *
   drivers/firmware/arm_scmi/optee.c:428:20: sparse:     got struct scmi_shared_mem [noderef] __iomem *shmem
>> drivers/firmware/arm_scmi/optee.c:440:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct scmi_shared_mem [noderef] __iomem *shmem @@     got struct scmi_shared_mem *shmem @@
   drivers/firmware/arm_scmi/optee.c:440:26: sparse:     expected struct scmi_shared_mem [noderef] __iomem *shmem
   drivers/firmware/arm_scmi/optee.c:440:26: sparse:     got struct scmi_shared_mem *shmem
   drivers/firmware/arm_scmi/optee.c:444:51: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct scmi_shared_mem [noderef] __iomem *shmem @@     got struct scmi_shared_mem *shmem @@
   drivers/firmware/arm_scmi/optee.c:444:51: sparse:     expected struct scmi_shared_mem [noderef] __iomem *shmem
   drivers/firmware/arm_scmi/optee.c:444:51: sparse:     got struct scmi_shared_mem *shmem
   drivers/firmware/arm_scmi/optee.c:456:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct scmi_shared_mem [noderef] __iomem *shmem @@     got struct scmi_shared_mem *shmem @@
   drivers/firmware/arm_scmi/optee.c:456:30: sparse:     expected struct scmi_shared_mem [noderef] __iomem *shmem
   drivers/firmware/arm_scmi/optee.c:456:30: sparse:     got struct scmi_shared_mem *shmem
   drivers/firmware/arm_scmi/optee.c:465:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct scmi_shared_mem [noderef] __iomem *shmem @@     got struct scmi_shared_mem *shmem @@
   drivers/firmware/arm_scmi/optee.c:465:32: sparse:     expected struct scmi_shared_mem [noderef] __iomem *shmem
   drivers/firmware/arm_scmi/optee.c:465:32: sparse:     got struct scmi_shared_mem *shmem

vim +428 drivers/firmware/arm_scmi/optee.c

   421	
   422	static struct scmi_shared_mem *get_channel_shm(struct scmi_optee_channel *chan,
   423						       struct scmi_xfer *xfer)
   424	{
   425		if (!chan)
   426			return NULL;
   427	
 > 428		return chan->shmem;
   429	}
   430	
   431	
   432	static int scmi_optee_send_message(struct scmi_chan_info *cinfo,
   433					   struct scmi_xfer *xfer)
   434	{
   435		struct scmi_optee_channel *channel = cinfo->transport_info;
   436		struct scmi_shared_mem *shmem = get_channel_shm(channel, xfer);
   437		int ret;
   438	
   439		mutex_lock(&channel->mu);
 > 440		shmem_tx_prepare(shmem, xfer);
   441	
   442		ret = invoke_process_smt_channel(channel);
   443	
   444		scmi_rx_callback(cinfo, shmem_read_header(shmem), NULL);
   445		mutex_unlock(&channel->mu);
   446	
   447		return ret;
   448	}
   449	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ