All of lore.kernel.org
 help / color / mirror / Atom feed
* [openeuler:OLK-5.10 14232/30000] drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:4413:46: warning: implicit conversion from 'enum hnae3_reset_type' to 'enum hnae3_event_type_custom'
@ 2024-10-27  0:19 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-27  0:19 UTC (permalink / raw)
  To: kernel, Jiantao Xiao; +Cc: oe-kbuild-all

Hi Tian,

FYI, the error/warning still remains.

tree:   https://gitee.com/openeuler/kernel.git OLK-5.10
head:   412556141b3c12f2f160acc3a09a40c937837ee3
commit: 62aede9feaf6f4729af43df72be267a32bda43d1 [14232/30000] net: hns3: add support customized exception handling interfaces.
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20241027/202410270825.dsHEmsVP-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241027/202410270825.dsHEmsVP-lkp@intel.com/reproduce)

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/202410270825.dsHEmsVP-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: In function 'hclge_reset_event':
>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:4413:46: warning: implicit conversion from 'enum hnae3_reset_type' to 'enum hnae3_event_type_custom' [-Wenum-conversion]
    4413 |         ret = hclge_ext_call_event(hdev, hdev->reset_level);
         |                                          ~~~~^~~~~~~~~~~~~
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: In function 'hclge_get_strings':
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:668:50: warning: '%s' directive output may be truncated writing up to 4895 bytes into a region of size 32 [-Wformat-truncation=]
     668 |                 snprintf(buff, ETH_GSTRING_LEN, "%s", strs[i].desc);
         |                                                  ^~
   In function 'hclge_comm_get_strings',
       inlined from 'hclge_get_strings' at drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:781:7:
   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:668:17: note: 'snprintf' output between 1 and 4896 bytes into a destination of size 32
     668 |                 snprintf(buff, ETH_GSTRING_LEN, "%s", strs[i].desc);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-27  0:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-27  0:19 [openeuler:OLK-5.10 14232/30000] drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:4413:46: warning: implicit conversion from 'enum hnae3_reset_type' to 'enum hnae3_event_type_custom' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.