mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Palmer Dabbelt <palmerdabbelt@google.com>
Subject: drivers/scsi/bnx2i/bnx2i_hwi.c:220:9: sparse: sparse: cast from restricted __le32
Date: Tue, 9 Feb 2021 11:07:56 +0800	[thread overview]
Message-ID: <202102091145.CI8Xz82i-lkp@intel.com> (raw)

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

Hi Kefeng,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   61556703b610a104de324e4f061dc6cf7b218b46
commit: ed1ed4c0da5447c5e322481ce2ef9f03336c6ffb riscv: mmiowb: Fix implicit declaration of function 'smp_processor_id'
date:   9 months ago
config: riscv-randconfig-s031-20210209 (attached as .config)
compiler: riscv64-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-215-g0fb77bb6-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ed1ed4c0da5447c5e322481ce2ef9f03336c6ffb
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout ed1ed4c0da5447c5e322481ce2ef9f03336c6ffb
        # 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=riscv 

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/scsi/bnx2i/bnx2i_hwi.c:220:9: sparse: sparse: cast from restricted __le32
   drivers/scsi/bnx2i/bnx2i_hwi.c:347:25: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] tsih @@     got restricted __be16 [usertype] tsih @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:347:25: sparse:     expected unsigned short [usertype] tsih
   drivers/scsi/bnx2i/bnx2i_hwi.c:347:25: sparse:     got restricted __be16 [usertype] tsih
   drivers/scsi/bnx2i/bnx2i_hwi.c:350:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] cid @@     got restricted __be16 [usertype] cid @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:350:24: sparse:     expected unsigned short [usertype] cid
   drivers/scsi/bnx2i/bnx2i_hwi.c:350:24: sparse:     got restricted __be16 [usertype] cid
   drivers/scsi/bnx2i/bnx2i_hwi.c:427:54: sparse: sparse: restricted itt_t degrades to integer
   drivers/scsi/bnx2i/bnx2i_hwi.c:430:39: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] ref_itt @@     got restricted itt_t [usertype] @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:430:39: sparse:     expected unsigned int [usertype] ref_itt
   drivers/scsi/bnx2i/bnx2i_hwi.c:430:39: sparse:     got restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:433:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:433:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:433:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:433:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:433:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:433:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:434:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:434:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:434:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:434:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:434:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:434:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:1350:48: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted itt_t [usertype] @@     got int @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1350:48: sparse:     expected restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1350:48: sparse:     got int
   drivers/scsi/bnx2i/bnx2i_hwi.c:1446:45: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted itt_t [usertype] @@     got int @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1446:45: sparse:     expected restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1446:45: sparse:     got int
   drivers/scsi/bnx2i/bnx2i_hwi.c:1513:50: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted itt_t [usertype] @@     got int @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1513:50: sparse:     expected restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1513:50: sparse:     got int
   drivers/scsi/bnx2i/bnx2i_hwi.c:1573:47: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted itt_t [usertype] @@     got int @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1573:47: sparse:     expected restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1573:47: sparse:     got int
   drivers/scsi/bnx2i/bnx2i_hwi.c:1612:46: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted itt_t [usertype] @@     got int @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1612:46: sparse:     expected restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1612:46: sparse:     got int
   drivers/scsi/bnx2i/bnx2i_hwi.c:1627:26: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] t2wait @@     got restricted __be32 [usertype] @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1627:26: sparse:     expected restricted __be16 [usertype] t2wait
   drivers/scsi/bnx2i/bnx2i_hwi.c:1627:26: sparse:     got restricted __be32 [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1628:28: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] t2retain @@     got restricted __be32 [usertype] @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1628:28: sparse:     expected restricted __be16 [usertype] t2retain
   drivers/scsi/bnx2i/bnx2i_hwi.c:1628:28: sparse:     got restricted __be32 [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1657:46: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted itt_t [usertype] @@     got int @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1657:46: sparse:     expected restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1657:46: sparse:     got int
   drivers/scsi/bnx2i/bnx2i_hwi.c:1707:29: sparse: sparse: cast from restricted itt_t
   drivers/scsi/bnx2i/bnx2i_hwi.c:1716:27: sparse: sparse: cast to restricted itt_t
   drivers/scsi/bnx2i/bnx2i_hwi.c:1812:25: sparse: sparse: cast from restricted itt_t
   drivers/scsi/bnx2i/bnx2i_hwi.c:1812:25: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted itt_t [usertype] @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1812:25: sparse:     expected unsigned int [usertype] val
   drivers/scsi/bnx2i/bnx2i_hwi.c:1812:25: sparse:     got restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1812:25: sparse: sparse: cast from restricted itt_t
   drivers/scsi/bnx2i/bnx2i_hwi.c:1812:25: sparse: sparse: cast from restricted itt_t
   drivers/scsi/bnx2i/bnx2i_hwi.c:1812:25: sparse: sparse: cast from restricted itt_t
   drivers/scsi/bnx2i/bnx2i_hwi.c:1812:25: sparse: sparse: cast from restricted itt_t
   drivers/scsi/bnx2i/bnx2i_hwi.c:1837:44: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted itt_t [usertype] @@     got int @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1837:44: sparse:     expected restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1837:44: sparse:     got int
   drivers/scsi/bnx2i/bnx2i_hwi.c:1909:43: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted itt_t [usertype] @@     got int @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1909:43: sparse:     expected restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1909:43: sparse:     got int
   drivers/scsi/bnx2i/bnx2i_hwi.c:1979:44: sparse: sparse: cast from restricted itt_t

vim +220 drivers/scsi/bnx2i/bnx2i_hwi.c

cf4e6363859d30 Michael Chan 2009-06-08  208  
cf4e6363859d30 Michael Chan 2009-06-08  209  
cf4e6363859d30 Michael Chan 2009-06-08  210  static void bnx2i_ring_577xx_doorbell(struct bnx2i_conn *conn)
cf4e6363859d30 Michael Chan 2009-06-08  211  {
cf4e6363859d30 Michael Chan 2009-06-08  212  	struct bnx2i_5771x_dbell dbell;
cf4e6363859d30 Michael Chan 2009-06-08  213  	u32 msg;
cf4e6363859d30 Michael Chan 2009-06-08  214  
cf4e6363859d30 Michael Chan 2009-06-08  215  	memset(&dbell, 0, sizeof(dbell));
cf4e6363859d30 Michael Chan 2009-06-08  216  	dbell.dbell.header = (B577XX_ISCSI_CONNECTION_TYPE <<
cf4e6363859d30 Michael Chan 2009-06-08  217  			      B577XX_DOORBELL_HDR_CONN_TYPE_SHIFT);
cf4e6363859d30 Michael Chan 2009-06-08  218  	msg = *((u32 *)&dbell);
cf4e6363859d30 Michael Chan 2009-06-08  219  	/* TODO : get doorbell register mapping */
cf4e6363859d30 Michael Chan 2009-06-08 @220  	writel(cpu_to_le32(msg), conn->ep->qp.ctx_base);
cf4e6363859d30 Michael Chan 2009-06-08  221  }
cf4e6363859d30 Michael Chan 2009-06-08  222  

:::::: The code at line 220 was first introduced by commit
:::::: cf4e6363859d30f24f8cd3e8930dbff399cc3550 [SCSI] bnx2i: Add bnx2i iSCSI driver.

:::::: TO: Michael Chan <mchan@broadcom.com>
:::::: CC: James Bottomley <James.Bottomley@HansenPartnership.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: 35065 bytes --]

                 reply	other threads:[~2021-02-09  3:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202102091145.CI8Xz82i-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=palmerdabbelt@google.com \
    --cc=wangkefeng.wang@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®