[openeuler:OLK-6.6 2331/2331] drivers/net/ethernet/huawei/hinic/hinic_hwif.c:46:16: sparse: sparse: incorrect type in argument 1 (different base types)

tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 66b0cef2a959be1562a528e3d8cc260dc3803e61 commit: 9c1c9598010fbb9daa1e2a67d23830092fb6246a [2331/2331] net/hinic: Update Huawei Intelligent Network Card Driver: hinic config: x86_64-randconfig-121-20250529 (https://download.01.org/0day-ci/archive/20250529/202505291520.bhlKqYqw-lkp@i...) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250529/202505291520.bhlKqYqw-lkp@i...) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505291520.bhlKqYqw-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) drivers/net/ethernet/huawei/hinic/hinic_hwif.c:40:16: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/huawei/hinic/hinic_hwif.c:46:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __be32 [usertype] @@ drivers/net/ethernet/huawei/hinic/hinic_hwif.c:46:16: sparse: expected unsigned int val drivers/net/ethernet/huawei/hinic/hinic_hwif.c:46:16: sparse: got restricted __be32 [usertype] drivers/net/ethernet/huawei/hinic/hinic_hwif.c:592:29: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned char [noderef] [usertype] __iomem *cfg_regs_base @@ got void *cfg_reg_base @@ drivers/net/ethernet/huawei/hinic/hinic_hwif.c:592:29: sparse: expected unsigned char [noderef] [usertype] __iomem *cfg_regs_base drivers/net/ethernet/huawei/hinic/hinic_hwif.c:592:29: sparse: got void *cfg_reg_base drivers/net/ethernet/huawei/hinic/hinic_hwif.c:593:30: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned char [noderef] [usertype] __iomem *intr_regs_base @@ got void *intr_reg_base @@ drivers/net/ethernet/huawei/hinic/hinic_hwif.c:593:30: sparse: expected unsigned char [noderef] [usertype] __iomem *intr_regs_base drivers/net/ethernet/huawei/hinic/hinic_hwif.c:593:30: sparse: got void *intr_reg_base drivers/net/ethernet/huawei/hinic/hinic_hwif.c:596:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned char [noderef] [usertype] __iomem *db_base @@ got void *db_base @@ drivers/net/ethernet/huawei/hinic/hinic_hwif.c:596:23: sparse: expected unsigned char [noderef] [usertype] __iomem *db_base drivers/net/ethernet/huawei/hinic/hinic_hwif.c:596:23: sparse: got void *db_base drivers/net/ethernet/huawei/hinic/hinic_hwif.c:664:64: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted gfp_t [usertype] gfp @@ got unsigned int flag @@ drivers/net/ethernet/huawei/hinic/hinic_hwif.c:664:64: sparse: expected restricted gfp_t [usertype] gfp drivers/net/ethernet/huawei/hinic/hinic_hwif.c:664:64: sparse: got unsigned int flag drivers/net/ethernet/huawei/hinic/hinic_hwif.c:679:64: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted gfp_t [usertype] gfp @@ got unsigned int flag @@ drivers/net/ethernet/huawei/hinic/hinic_hwif.c:679:64: sparse: expected restricted gfp_t [usertype] gfp drivers/net/ethernet/huawei/hinic/hinic_hwif.c:679:64: sparse: got unsigned int flag drivers/net/ethernet/huawei/hinic/hinic_hwif.c:984:17: sparse: sparse: cast to restricted __be32 drivers/net/ethernet/huawei/hinic/hinic_hwif.c:993:17: sparse: sparse: cast to restricted __be32
vim +46 drivers/net/ethernet/huawei/hinic/hinic_hwif.c 36 37 /* For UEFI driver, this function can only read BAR0 */ 38 u32 hinic_hwif_read_reg(struct hinic_hwif *hwif, u32 reg) 39 {
40 return be32_to_cpu(readl(hwif->cfg_regs_base + reg)); 41 } 42 43 /* For UEFI driver, this function can only write BAR0 */ 44 void hinic_hwif_write_reg(struct hinic_hwif *hwif, u32 reg, u32 val) 45 { 46 writel(cpu_to_be32(val), hwif->cfg_regs_base + reg); 47 } 48
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot