tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 74cd1e5b892070aee2e2ce11eae993856552e98c commit: 8ad07513042c8fef5a03b404f0bbf066f603c101 [11555/22961] net: hns3: place dcqcn implementations in an ind file config: arm64-randconfig-r111-20240615 (https://download.01.org/0day-ci/archive/20240618/202406181426.ygyn6idN-lkp@i...) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce: (https://download.01.org/0day-ci/archive/20240618/202406181426.ygyn6idN-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/202406181426.ygyn6idN-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:39:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 @@ got unsigned int [usertype] @@
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:39:30: sparse: expected restricted __le32 drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:39:30: sparse: got unsigned int [usertype]
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:42:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 @@ got unsigned int @@
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:42:22: sparse: expected restricted __le32 drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:42:22: sparse: got unsigned int
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:43:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 @@ got int @@
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:43:22: sparse: expected restricted __le32 drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:43:22: sparse: got int drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:44:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 @@ got int @@ drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:44:22: sparse: expected restricted __le32 drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:44:22: sparse: got int
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:53:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 @@
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:53:23: sparse: expected unsigned int [usertype] drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:53:23: sparse: got restricted __le32
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:255:42: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] dcqcn_rx_cnt @@ got restricted __le32 @@
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:255:42: sparse: expected unsigned int [usertype] dcqcn_rx_cnt drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:255:42: sparse: got restricted __le32
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:256:42: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] dcqcn_tx_cnt @@ got restricted __le32 @@
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:256:42: sparse: expected unsigned int [usertype] dcqcn_tx_cnt drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:256:42: sparse: got restricted __le32
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:257:42: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] dcqcn_db_cnt @@ got restricted __le32 @@
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:257:42: sparse: expected unsigned int [usertype] dcqcn_db_cnt drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c:257:42: sparse: got restricted __le32
vim +39 drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_dcqcn.c
15 16 static int hns3_dcqcn_rw(struct hns3_nic_priv *net_priv, 17 u32 offset, u32 *data, u32 rw_type) 18 { 19 struct hnae3_handle *h = net_priv->ae_handle; 20 struct hclge_vport *vport; 21 struct hclge_dev *hdev; 22 struct hclge_desc desc; 23 int ret; 24 25 if (!data) 26 return -EFAULT; 27 28 vport = container_of(h, struct hclge_vport, nic); 29 hdev = vport->back; 30 31 if (rw_type == DEVMEM_CFG_READ) { 32 hns3_cae_cmd_setup_basic_desc(&desc, 33 HCLGE_OPC_DCQCN_TEMPLATE_CFG, 34 true); 35 } else { 36 hns3_cae_cmd_setup_basic_desc(&desc, 37 HCLGE_OPC_DCQCN_TEMPLATE_CFG, 38 false);
39 desc.data[2] = *data;
40 } 41
42 desc.data[0] = SCC_TEMP_LOW_ADDR + offset; 43 desc.data[1] = SCC_TEMP_HIGH_ADDR;
44 desc.data[4] = 32; 45 46 ret = hns3_cae_cmd_send(hdev, &desc, 1); 47 if (ret) { 48 dev_err(&hdev->pdev->dev, "disable net lane failed %d\n", ret); 49 return ret; 50 } 51 52 if (rw_type == DEVMEM_CFG_READ)
53 *data = desc.data[2];
54 55 return 0; 56 } 57