LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [asahilinux:nvme/dev 17/17] drivers/nvme/host/pci.c:329:19: sparse: sparse: incorrect type in assignment (different base types)
@ 2021-08-06 12:13 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-06 12:13 UTC (permalink / raw)
  To: Sven Peter; +Cc: kbuild-all, linux-kernel

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

tree:   https://github.com/AsahiLinux/linux nvme/dev
head:   70ce58861f9029c98ddcfb26787a58bbac183cc2
commit: 70ce58861f9029c98ddcfb26787a58bbac183cc2 [17/17] WIP: apple NVMe
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-348-gf0e6938b-dirty
        # https://github.com/AsahiLinux/linux/commit/70ce58861f9029c98ddcfb26787a58bbac183cc2
        git remote add asahilinux https://github.com/AsahiLinux/linux
        git fetch --no-tags asahilinux nvme/dev
        git checkout 70ce58861f9029c98ddcfb26787a58bbac183cc2
        # 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/nvme/host/pci.c:329:19: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] prp1 @@     got restricted __le64 [usertype] prp1 @@
   drivers/nvme/host/pci.c:329:19: sparse:     expected unsigned long long [usertype] prp1
   drivers/nvme/host/pci.c:329:19: sparse:     got restricted __le64 [usertype] prp1
>> drivers/nvme/host/pci.c:330:19: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] prp2 @@     got restricted __le64 [usertype] prp2 @@
   drivers/nvme/host/pci.c:330:19: sparse:     expected unsigned long long [usertype] prp2
   drivers/nvme/host/pci.c:330:19: sparse:     got restricted __le64 [usertype] prp2
>> drivers/nvme/host/pci.c:331:21: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] length @@     got restricted __le16 [usertype] length @@
   drivers/nvme/host/pci.c:331:21: sparse:     expected unsigned int [usertype] length
   drivers/nvme/host/pci.c:331:21: sparse:     got restricted __le16 [usertype] length

vim +329 drivers/nvme/host/pci.c

   318	
   319	static void nvme_apple_submit_cmd(struct nvme_queue *nvmeq,
   320					  struct nvme_command *cmd)
   321	{
   322		u32 tag = cmd->common.command_id;
   323		struct apple_nvmmu_tcb *tcb;
   324	
   325		tcb = nvmeq->ans2_tcb_ptr + tag * sizeof(struct apple_nvmmu_tcb);
   326		memset(tcb, 0, sizeof(*tcb));
   327	
   328		tcb->opcode = cmd->common.opcode;
 > 329		tcb->prp1 = cmd->common.dptr.prp1;
 > 330		tcb->prp2 = cmd->common.dptr.prp2;
 > 331		tcb->length = cmd->rw.length;
   332		tcb->command_id = tag;
   333	
   334		if (nvme_is_write(cmd))
   335			tcb->dma_flags = APPLE_ANS2_TCB_DMA_TO_DEVICE;
   336		else
   337			tcb->dma_flags = APPLE_ANS2_TCB_DMA_FROM_DEVICE;
   338	
   339		memcpy(nvmeq->sq_cmds + (tag << nvmeq->sqes), cmd, sizeof(*cmd));
   340		writel(tag, nvmeq->ans2_q_db);
   341	}
   342	

---
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: 42162 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-06 12:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06 12:13 [asahilinux:nvme/dev 17/17] drivers/nvme/host/pci.c:329:19: sparse: sparse: incorrect type in assignment (different base types) kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).