Messages in this thread | | | Date | Thu, 18 Nov 2021 03:38:56 +0800 | From | kernel test robot <> | Subject | drivers/target/target_core_spc.c:44:18: sparse: sparse: incorrect type in assignment (different address spaces) |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: ee1703cda8dc777e937dec172da55beaf1a74919 commit: 7324f47d4293ff50f489010735a4057defb1a5d6 scsi: target: Replace lun_tg_pt_gp_lock with rcu in I/O path date: 4 weeks ago config: x86_64-randconfig-s021-20211116 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7324f47d4293ff50f489010735a4057defb1a5d6 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 7324f47d4293ff50f489010735a4057defb1a5d6 # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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/target/target_core_spc.c:44:18: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct t10_alua_tg_pt_gp *tg_pt_gp @@ got struct t10_alua_tg_pt_gp [noderef] __rcu *lun_tg_pt_gp @@ drivers/target/target_core_spc.c:44:18: sparse: expected struct t10_alua_tg_pt_gp *tg_pt_gp drivers/target/target_core_spc.c:44:18: sparse: got struct t10_alua_tg_pt_gp [noderef] __rcu *lun_tg_pt_gp drivers/target/target_core_spc.c:329:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct t10_alua_tg_pt_gp *tg_pt_gp @@ got struct t10_alua_tg_pt_gp [noderef] __rcu *lun_tg_pt_gp @@ drivers/target/target_core_spc.c:329:26: sparse: expected struct t10_alua_tg_pt_gp *tg_pt_gp drivers/target/target_core_spc.c:329:26: sparse: got struct t10_alua_tg_pt_gp [noderef] __rcu *lun_tg_pt_gp
vim +44 drivers/target/target_core_spc.c
88455ec4be02c39 Christoph Hellwig 2012-05-20 27 adf653f92f38e80 Christoph Hellwig 2015-05-25 28 static void spc_fill_alua_data(struct se_lun *lun, unsigned char *buf) 1fd032ee10d2816 Christoph Hellwig 2012-05-20 29 { 1fd032ee10d2816 Christoph Hellwig 2012-05-20 30 struct t10_alua_tg_pt_gp *tg_pt_gp; 1fd032ee10d2816 Christoph Hellwig 2012-05-20 31 1fd032ee10d2816 Christoph Hellwig 2012-05-20 32 /* 1fd032ee10d2816 Christoph Hellwig 2012-05-20 33 * Set SCCS for MAINTENANCE_IN + REPORT_TARGET_PORT_GROUPS. 1fd032ee10d2816 Christoph Hellwig 2012-05-20 34 */ 1fd032ee10d2816 Christoph Hellwig 2012-05-20 35 buf[5] = 0x80; 1fd032ee10d2816 Christoph Hellwig 2012-05-20 36 1fd032ee10d2816 Christoph Hellwig 2012-05-20 37 /* 125d0119d158180 Hannes Reinecke 2013-11-19 38 * Set TPGS field for explicit and/or implicit ALUA access type 1fd032ee10d2816 Christoph Hellwig 2012-05-20 39 * and opteration. 1fd032ee10d2816 Christoph Hellwig 2012-05-20 40 * 1fd032ee10d2816 Christoph Hellwig 2012-05-20 41 * See spc4r17 section 6.4.2 Table 135 1fd032ee10d2816 Christoph Hellwig 2012-05-20 42 */ adf653f92f38e80 Christoph Hellwig 2015-05-25 43 spin_lock(&lun->lun_tg_pt_gp_lock); adf653f92f38e80 Christoph Hellwig 2015-05-25 @44 tg_pt_gp = lun->lun_tg_pt_gp; 1fd032ee10d2816 Christoph Hellwig 2012-05-20 45 if (tg_pt_gp) 1fd032ee10d2816 Christoph Hellwig 2012-05-20 46 buf[5] |= tg_pt_gp->tg_pt_gp_alua_access_type; adf653f92f38e80 Christoph Hellwig 2015-05-25 47 spin_unlock(&lun->lun_tg_pt_gp_lock); 1fd032ee10d2816 Christoph Hellwig 2012-05-20 48 } 1fd032ee10d2816 Christoph Hellwig 2012-05-20 49
:::::: The code at line 44 was first introduced by commit :::::: adf653f92f38e80a78bb77e912d49bcc8055330f target: Subsume se_port + t10_alua_tg_pt_gp_member into se_lun
:::::: TO: Christoph Hellwig <hch@lst.de> :::::: CC: Nicholas Bellinger <nab@linux-iscsi.org>
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |