All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: drivers/target/target_core_spc.c:44:18: sparse: sparse: incorrect type in assignment (different address spaces)
Date: Thu, 18 Nov 2021 03:38:56 +0800	[thread overview]
Message-ID: <202111180344.01AHNb13-lkp@intel.com> (raw)

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

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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 28265 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Mike Christie <michael.christie@oracle.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: drivers/target/target_core_spc.c:44:18: sparse: sparse: incorrect type in assignment (different address spaces)
Date: Thu, 18 Nov 2021 03:38:56 +0800	[thread overview]
Message-ID: <202111180344.01AHNb13-lkp@intel.com> (raw)

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

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28265 bytes --]

             reply	other threads:[~2021-11-17 19:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-17 19:38 kernel test robot [this message]
2021-11-17 19:38 ` drivers/target/target_core_spc.c:44:18: 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=202111180344.01AHNb13-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.