tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 26bfb7d9b0ef31487312e8e9e6eb097acaf5d739 commit: cf7415aa7aae0ef2c815ab271528a29a5ea68c51 [11566/22966] net: hns3: cae module now provides an independent pfc storm cfg feature config: arm64-randconfig-r111-20240615 (https://download.01.org/0day-ci/archive/20240619/202406190057.DrPNl3Zc-lkp@i...) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce: (https://download.01.org/0day-ci/archive/20240619/202406190057.DrPNl3Zc-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/202406190057.DrPNl3Zc-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:29:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 @@ got unsigned int [usertype] dir @@
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:29:22: sparse: expected restricted __le32 drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:29:22: sparse: got unsigned int [usertype] dir
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:30:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 @@ got unsigned int [usertype] enable @@
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:30:22: sparse: expected restricted __le32 drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:30:22: sparse: got unsigned int [usertype] enable
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:31:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 @@ got unsigned int [usertype] period_ms @@
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:31:22: sparse: expected restricted __le32 drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:31:22: sparse: got unsigned int [usertype] period_ms
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:32:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 @@ got unsigned int [usertype] times @@
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:32:22: sparse: expected restricted __le32 drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:32:22: sparse: got unsigned int [usertype] times
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:33:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 @@ got unsigned int [usertype] recovery_period_ms @@
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:33:22: sparse: expected restricted __le32 drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:33:22: sparse: got unsigned int [usertype] recovery_period_ms drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:74:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 @@ got unsigned int [usertype] dir @@ drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:74:22: sparse: expected restricted __le32 drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:74:22: sparse: got unsigned int [usertype] dir
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:84:48: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] enable @@ got restricted __le32 @@
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:84:48: sparse: expected unsigned int [usertype] enable drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:84:48: sparse: got restricted __le32
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:85:51: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] period_ms @@ got restricted __le32 @@
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:85:51: sparse: expected unsigned int [usertype] period_ms drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:85:51: sparse: got restricted __le32
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:86:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] times @@ got restricted __le32 @@
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:86:47: sparse: expected unsigned int [usertype] times drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:86:47: sparse: got restricted __le32
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:87:60: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] recovery_period_ms @@ got restricted __le32 @@
drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:87:60: sparse: expected unsigned int [usertype] recovery_period_ms drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c:87:60: sparse: got restricted __le32
vim +29 drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_pfc_storm.c
8 9 static int hns3_cae_set_pfc_storm_cfg(struct hns3_nic_priv *net_priv, 10 void *buf_in, u32 in_size) 11 { 12 struct cmd_pfc_storm_param *prelude_in; 13 struct net_device *netdev; 14 struct hclge_vport *vport; 15 struct hnae3_handle *h; 16 struct hclge_dev *hdev; 17 struct hclge_desc desc; 18 int ret; 19 20 prelude_in = (struct cmd_pfc_storm_param *)buf_in; 21 netdev = net_priv->netdev; 22 h = hns3_get_handle(netdev); 23 vport = hns3_cae_get_vport(h); 24 hdev = vport->back; 25 26 hns3_cae_cmd_setup_basic_desc(&desc, 27 HCLGE_OPC_CFG_PAUSE_STORM_PARA, 28 false);
29 desc.data[0] = prelude_in->pfc_storm_param_mkii.dir; 30 desc.data[1] = prelude_in->pfc_storm_param_mkii.enable; 31 desc.data[2] = prelude_in->pfc_storm_param_mkii.period_ms; 32 desc.data[3] = prelude_in->pfc_storm_param_mkii.times; 33 desc.data[4] = prelude_in->pfc_storm_param_mkii.recovery_period_ms;
34 ret = hns3_cae_cmd_send(hdev, &desc, 1); 35 if (ret) { 36 dev_err(&hdev->pdev->dev, "set pfc storm para failed %d\n", 37 ret); 38 return ret; 39 } 40 41 return 0; 42 } 43 44 static int hns3_cae_get_pfc_storm_cfg(struct hns3_nic_priv *net_priv, 45 void *buf_in, u32 in_size, void *buf_out, 46 u32 out_size) 47 { 48 struct cmd_pfc_storm_param *prelude_in; 49 struct cmd_pfc_storm_param *info_dstn; 50 struct net_device *netdev; 51 struct hclge_vport *vport; 52 struct hnae3_handle *h; 53 struct hclge_dev *hdev; 54 struct hclge_desc desc; 55 int check; 56 int ret; 57 58 check = !buf_out || out_size < sizeof(struct cmd_pfc_storm_param); 59 if (check) { 60 pr_err("input param buf_out error in %s.\n", __func__); 61 return -EFAULT; 62 } 63 64 prelude_in = (struct cmd_pfc_storm_param *)buf_in; 65 info_dstn = (struct cmd_pfc_storm_param *)buf_out; 66 netdev = net_priv->netdev; 67 h = hns3_get_handle(netdev); 68 vport = hns3_cae_get_vport(h); 69 hdev = vport->back; 70 71 hns3_cae_cmd_setup_basic_desc(&desc, 72 HCLGE_OPC_CFG_PAUSE_STORM_PARA, 73 true); 74 desc.data[0] = prelude_in->pfc_storm_param_mkii.dir; 75 ret = hns3_cae_cmd_send(hdev, &desc, 1); 76 if (ret) { 77 dev_err(&hdev->pdev->dev, "get pfc storm para failed %d\n", 78 ret); 79 return ret; 80 } 81 82 info_dstn->pfc_storm_param_mkii.dir = 83 prelude_in->pfc_storm_param_mkii.dir;
84 info_dstn->pfc_storm_param_mkii.enable = desc.data[1]; 85 info_dstn->pfc_storm_param_mkii.period_ms = desc.data[2]; 86 info_dstn->pfc_storm_param_mkii.times = desc.data[3]; 87 info_dstn->pfc_storm_param_mkii.recovery_period_ms = desc.data[4];
88 89 return 0; 90 } 91