tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 62aede9feaf6f4729af43df72be267a32bda43d1 [14637/30000] net: hns3: add support customized exception handling interfaces. config: arm64-randconfig-r131-20240925 (https://download.01.org/0day-ci/archive/20240928/202409281736.VfwcJjb4-lkp@i...) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240928/202409281736.VfwcJjb4-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/202409281736.VfwcJjb4-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:4413:46: sparse: sparse: mixing different enum types:
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:4413:46: sparse: unsigned int enum hnae3_reset_type drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:4413:46: sparse: unsigned int enum hnae3_event_type_custom drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:5902:37: sparse: sparse: restricted __le32 degrades to integer drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:5903:37: sparse: sparse: restricted __le32 degrades to integer drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6137:17: sparse: sparse: restricted __be32 degrades to integer drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6231:17: sparse: sparse: restricted __be32 degrades to integer
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:13772:21: sparse: sparse: symbol 'hclge_ops' was not declared. Should it be static?
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:5473:31: sparse: sparse: context imbalance in 'hclge_sync_fd_user_def_cfg' - unexpected unlock drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:12714:23: sparse: sparse: memset with byte count of 131072
vim +4413 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
4374 4375 void hclge_reset_event(struct pci_dev *pdev, struct hnae3_handle *handle) 4376 { 4377 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(pdev); 4378 struct hclge_dev *hdev = ae_dev->priv; 4379 int ret; 4380 4381 /* We might end up getting called broadly because of 2 below cases: 4382 * 1. Recoverable error was conveyed through APEI and only way to bring 4383 * normalcy is to reset. 4384 * 2. A new reset request from the stack due to timeout 4385 * 4386 * check if this is a new reset request and we are not here just because 4387 * last reset attempt did not succeed and watchdog hit us again. We will 4388 * know this if last reset request did not occur very recently (watchdog 4389 * timer = 5*HZ, let us check after sufficiently large time, say 4*5*Hz) 4390 * In case of new request we reset the "reset level" to PF reset. 4391 * And if it is a repeat reset request of the most recent one then we 4392 * want to make sure we throttle the reset request. Therefore, we will 4393 * not allow it again before 3*HZ times. 4394 */ 4395 4396 if (time_before(jiffies, (hdev->last_reset_time + 4397 HCLGE_RESET_INTERVAL))) { 4398 mod_timer(&hdev->reset_timer, jiffies + HCLGE_RESET_INTERVAL); 4399 return; 4400 } 4401 4402 if (hdev->default_reset_request) { 4403 hdev->reset_level = 4404 hclge_get_reset_level(ae_dev, 4405 &hdev->default_reset_request); 4406 } else if (time_after(jiffies, (hdev->last_reset_time + 4 * 5 * HZ))) { 4407 hdev->reset_level = HNAE3_FUNC_RESET; 4408 } 4409 4410 dev_info(&hdev->pdev->dev, "received reset event, reset type is %d\n", 4411 hdev->reset_level); 4412
4413 ret = hclge_ext_call_event(hdev, hdev->reset_level);
4414 if (ret) { 4415 /* request reset & schedule reset task */ 4416 set_bit(hdev->reset_level, &hdev->reset_request); 4417 hclge_reset_task_schedule(hdev); 4418 } 4419 4420 if (hdev->reset_level < HNAE3_GLOBAL_RESET) 4421 hdev->reset_level++; 4422 } 4423