[asahilinux:nvme/wip-clocks 14/17] drivers/nvme/host/apple-ans.c:289:19: sparse: sparse: incorrect type in assignment (different base types)
From: kernel test robot
Date: Tue Aug 24 2021 - 06:10:38 EST
tree: https://github.com/AsahiLinux/linux nvme/wip-clocks
head: 49b910337a28db951dd1a5259a3837f6d500031b
commit: 23eada9bb9af9edbdc8a212e1d8b7a7a0e7a0e9c [14/17] NVMe WIP
config: arm64-randconfig-s031-20210824 (attached as .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.3-348-gf0e6938b-dirty
# https://github.com/AsahiLinux/linux/commit/23eada9bb9af9edbdc8a212e1d8b7a7a0e7a0e9c
git remote add asahilinux https://github.com/AsahiLinux/linux
git fetch --no-tags asahilinux nvme/wip-clocks
git checkout 23eada9bb9af9edbdc8a212e1d8b7a7a0e7a0e9c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
sparse warnings: (new ones prefixed by >>)
>> drivers/nvme/host/apple-ans.c:289:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] prp1 @@ got restricted __le64 [usertype] prp1 @@
drivers/nvme/host/apple-ans.c:289:19: sparse: expected unsigned long long [usertype] prp1
drivers/nvme/host/apple-ans.c:289:19: sparse: got restricted __le64 [usertype] prp1
>> drivers/nvme/host/apple-ans.c:290:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] prp2 @@ got restricted __le64 [usertype] prp2 @@
drivers/nvme/host/apple-ans.c:290:19: sparse: expected unsigned long long [usertype] prp2
drivers/nvme/host/apple-ans.c:290:19: sparse: got restricted __le64 [usertype] prp2
>> drivers/nvme/host/apple-ans.c:291:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] length @@ got restricted __le16 [usertype] length @@
drivers/nvme/host/apple-ans.c:291:21: sparse: expected unsigned int [usertype] length
drivers/nvme/host/apple-ans.c:291:21: sparse: got restricted __le16 [usertype] length
vim +289 drivers/nvme/host/apple-ans.c
274
275 /**
276 * apple_nvme_submit_cmd() - Copy a command into a queue and ring the doorbell
277 * @nvmeq: The queue to use
278 * @cmd: The command to send
279 */
280 static void apple_nvme_submit_cmd(struct apple_nvme_queue *nvmeq, struct nvme_command *cmd)
281 {
282 u32 tag = cmd->common.command_id;
283 struct apple_nvmmu_tcb *tcb;
284
285 tcb = nvmeq->ans2_tcb_ptr + tag * sizeof(struct apple_nvmmu_tcb);
286 memset(tcb, 0, sizeof(*tcb));
287
288 tcb->opcode = cmd->common.opcode;
> 289 tcb->prp1 = cmd->common.dptr.prp1;
> 290 tcb->prp2 = cmd->common.dptr.prp2;
> 291 tcb->length = cmd->rw.length;
292 tcb->command_id = tag;
293
294 if (nvme_is_write(cmd))
295 tcb->dma_flags = APPLE_ANS2_TCB_DMA_TO_DEVICE;
296 else
297 tcb->dma_flags = APPLE_ANS2_TCB_DMA_FROM_DEVICE;
298
299 memcpy(nvmeq->sq_cmds + (tag << nvmeq->sqes), cmd, sizeof(*cmd));
300 writel(tag, nvmeq->ans2_q_db);
301 }
302
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip