* drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:570:21: sparse: sparse: cast to restricted __be32
@ 2020-10-03 5:58 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-10-03 5:58 UTC (permalink / raw)
To: Luo bin; +Cc: kbuild-all, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 6104 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d3d45f8220d60a0b2aaaacf8fb2be4e6ffd9008e
commit: 088c5f0d1a7c7f01e668d9d2d75e7d93b43b7690 hinic: add generating mailbox random index support
date: 8 weeks ago
config: x86_64-randconfig-s022-20201003 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=088c5f0d1a7c7f01e668d9d2d75e7d93b43b7690
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 088c5f0d1a7c7f01e668d9d2d75e7d93b43b7690
# 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>
echo
echo "sparse warnings: (new ones prefixed by >>)"
echo
>> drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:570:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:570:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:570:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:570:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:570:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:570:21: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:648:54: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned char [usertype] * @@
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:648:54: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:648:54: sparse: got unsigned char [usertype] *
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:671:58: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned char [usertype] * @@
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:671:58: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:671:58: sparse: got unsigned char [usertype] *
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:1164:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned char [usertype] *data @@ got void [noderef] __iomem * @@
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:1164:25: sparse: expected unsigned char [usertype] *data
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:1164:25: sparse: got void [noderef] __iomem *
vim +570 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c
541
542 static bool check_vf_mbox_random_id(struct hinic_mbox_func_to_func *func_to_func,
543 u8 *header)
544 {
545 struct hinic_hwdev *hwdev = func_to_func->hwdev;
546 struct hinic_mbox_work *mbox_work = NULL;
547 u64 mbox_header = *((u64 *)header);
548 u16 offset, src;
549 u32 random_id;
550 int vf_in_pf;
551
552 src = HINIC_MBOX_HEADER_GET(mbox_header, SRC_GLB_FUNC_IDX);
553
554 if (IS_PF_OR_PPF_SRC(src) || !func_to_func->support_vf_random)
555 return true;
556
557 if (!HINIC_IS_PPF(hwdev->hwif)) {
558 offset = hinic_glb_pf_vf_offset(hwdev->hwif);
559 vf_in_pf = src - offset;
560
561 if (vf_in_pf < 1 || vf_in_pf > hwdev->nic_cap.max_vf) {
562 dev_warn(&hwdev->hwif->pdev->dev,
563 "Receive vf id(0x%x) is invalid, vf id should be from 0x%x to 0x%x\n",
564 src, offset + 1,
565 hwdev->nic_cap.max_vf + offset);
566 return false;
567 }
568 }
569
> 570 random_id = be32_to_cpu(*(u32 *)(header + MBOX_SEG_LEN +
571 MBOX_HEADER_SZ));
572
573 if (random_id == func_to_func->vf_mbx_rand_id[src] ||
574 random_id == func_to_func->vf_mbx_old_rand_id[src])
575 return true;
576
577 dev_warn(&hwdev->hwif->pdev->dev,
578 "The mailbox random id(0x%x) of func_id(0x%x) doesn't match with pf reservation(0x%x)\n",
579 random_id, src, func_to_func->vf_mbx_rand_id[src]);
580
581 mbox_work = kzalloc(sizeof(*mbox_work), GFP_KERNEL);
582 if (!mbox_work)
583 return false;
584
585 mbox_work->func_to_func = func_to_func;
586 mbox_work->src_func_idx = src;
587
588 INIT_WORK(&mbox_work->work, update_random_id_work_handler);
589 queue_work(func_to_func->workq, &mbox_work->work);
590
591 return false;
592 }
593
---
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: 36125 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:570:21: sparse: sparse: cast to restricted __be32
@ 2020-11-10 22:21 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-11-10 22:21 UTC (permalink / raw)
To: Luo bin; +Cc: kbuild-all, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 4837 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: eccc876724927ff3b9ff91f36f7b6b159e948f0c
commit: 088c5f0d1a7c7f01e668d9d2d75e7d93b43b7690 hinic: add generating mailbox random index support
date: 3 months ago
config: arm64-randconfig-s031-20201110 (attached as .config)
compiler: aarch64-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-76-gf680124b-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=088c5f0d1a7c7f01e668d9d2d75e7d93b43b7690
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 088c5f0d1a7c7f01e668d9d2d75e7d93b43b7690
# 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=arm64
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/net/ethernet/huawei/hinic/hinic_hw_mbox.c:570:21: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:648:54: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned char [usertype] * @@
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:648:54: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:648:54: sparse: got unsigned char [usertype] *
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:671:58: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned char [usertype] * @@
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:671:58: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:671:58: sparse: got unsigned char [usertype] *
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:1164:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned char [usertype] *data @@ got void [noderef] __iomem * @@
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:1164:25: sparse: expected unsigned char [usertype] *data
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:1164:25: sparse: got void [noderef] __iomem *
vim +570 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c
541
542 static bool check_vf_mbox_random_id(struct hinic_mbox_func_to_func *func_to_func,
543 u8 *header)
544 {
545 struct hinic_hwdev *hwdev = func_to_func->hwdev;
546 struct hinic_mbox_work *mbox_work = NULL;
547 u64 mbox_header = *((u64 *)header);
548 u16 offset, src;
549 u32 random_id;
550 int vf_in_pf;
551
552 src = HINIC_MBOX_HEADER_GET(mbox_header, SRC_GLB_FUNC_IDX);
553
554 if (IS_PF_OR_PPF_SRC(src) || !func_to_func->support_vf_random)
555 return true;
556
557 if (!HINIC_IS_PPF(hwdev->hwif)) {
558 offset = hinic_glb_pf_vf_offset(hwdev->hwif);
559 vf_in_pf = src - offset;
560
561 if (vf_in_pf < 1 || vf_in_pf > hwdev->nic_cap.max_vf) {
562 dev_warn(&hwdev->hwif->pdev->dev,
563 "Receive vf id(0x%x) is invalid, vf id should be from 0x%x to 0x%x\n",
564 src, offset + 1,
565 hwdev->nic_cap.max_vf + offset);
566 return false;
567 }
568 }
569
> 570 random_id = be32_to_cpu(*(u32 *)(header + MBOX_SEG_LEN +
571 MBOX_HEADER_SZ));
572
573 if (random_id == func_to_func->vf_mbx_rand_id[src] ||
574 random_id == func_to_func->vf_mbx_old_rand_id[src])
575 return true;
576
577 dev_warn(&hwdev->hwif->pdev->dev,
578 "The mailbox random id(0x%x) of func_id(0x%x) doesn't match with pf reservation(0x%x)\n",
579 random_id, src, func_to_func->vf_mbx_rand_id[src]);
580
581 mbox_work = kzalloc(sizeof(*mbox_work), GFP_KERNEL);
582 if (!mbox_work)
583 return false;
584
585 mbox_work->func_to_func = func_to_func;
586 mbox_work->src_func_idx = src;
587
588 INIT_WORK(&mbox_work->work, update_random_id_work_handler);
589 queue_work(func_to_func->workq, &mbox_work->work);
590
591 return false;
592 }
593
---
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: 40507 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:570:21: sparse: sparse: cast to restricted __be32
@ 2020-09-02 3:33 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-09-02 3:33 UTC (permalink / raw)
To: Luo bin; +Cc: kbuild-all, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 6112 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b765a32a2e9170702467747e290614be072c4f76
commit: 088c5f0d1a7c7f01e668d9d2d75e7d93b43b7690 hinic: add generating mailbox random index support
date: 4 weeks ago
config: i386-randconfig-s001-20200902 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
git checkout 088c5f0d1a7c7f01e668d9d2d75e7d93b43b7690
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
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/net/ethernet/huawei/hinic/hinic_hw_mbox.c:570:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:570:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:570:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:570:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:570:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:570:21: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:648:54: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned char [usertype] * @@
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:648:54: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:648:54: sparse: got unsigned char [usertype] *
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:671:58: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned char [usertype] * @@
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:671:58: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:671:58: sparse: got unsigned char [usertype] *
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:723:22: sparse: sparse: cast to restricted __be64
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:1164:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned char [usertype] *data @@ got void [noderef] __iomem * @@
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:1164:25: sparse: expected unsigned char [usertype] *data
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:1164:25: sparse: got void [noderef] __iomem *
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=088c5f0d1a7c7f01e668d9d2d75e7d93b43b7690
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 088c5f0d1a7c7f01e668d9d2d75e7d93b43b7690
vim +570 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c
541
542 static bool check_vf_mbox_random_id(struct hinic_mbox_func_to_func *func_to_func,
543 u8 *header)
544 {
545 struct hinic_hwdev *hwdev = func_to_func->hwdev;
546 struct hinic_mbox_work *mbox_work = NULL;
547 u64 mbox_header = *((u64 *)header);
548 u16 offset, src;
549 u32 random_id;
550 int vf_in_pf;
551
552 src = HINIC_MBOX_HEADER_GET(mbox_header, SRC_GLB_FUNC_IDX);
553
554 if (IS_PF_OR_PPF_SRC(src) || !func_to_func->support_vf_random)
555 return true;
556
557 if (!HINIC_IS_PPF(hwdev->hwif)) {
558 offset = hinic_glb_pf_vf_offset(hwdev->hwif);
559 vf_in_pf = src - offset;
560
561 if (vf_in_pf < 1 || vf_in_pf > hwdev->nic_cap.max_vf) {
562 dev_warn(&hwdev->hwif->pdev->dev,
563 "Receive vf id(0x%x) is invalid, vf id should be from 0x%x to 0x%x\n",
564 src, offset + 1,
565 hwdev->nic_cap.max_vf + offset);
566 return false;
567 }
568 }
569
> 570 random_id = be32_to_cpu(*(u32 *)(header + MBOX_SEG_LEN +
571 MBOX_HEADER_SZ));
572
573 if (random_id == func_to_func->vf_mbx_rand_id[src] ||
574 random_id == func_to_func->vf_mbx_old_rand_id[src])
575 return true;
576
577 dev_warn(&hwdev->hwif->pdev->dev,
578 "The mailbox random id(0x%x) of func_id(0x%x) doesn't match with pf reservation(0x%x)\n",
579 random_id, src, func_to_func->vf_mbx_rand_id[src]);
580
581 mbox_work = kzalloc(sizeof(*mbox_work), GFP_KERNEL);
582 if (!mbox_work)
583 return false;
584
585 mbox_work->func_to_func = func_to_func;
586 mbox_work->src_func_idx = src;
587
588 INIT_WORK(&mbox_work->work, update_random_id_work_handler);
589 queue_work(func_to_func->workq, &mbox_work->work);
590
591 return false;
592 }
593
---
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: 45545 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-10 22:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-03 5:58 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:570:21: sparse: sparse: cast to restricted __be32 kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2020-11-10 22:21 kernel test robot
2020-09-02 3:33 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).