tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 05607873db411ec3c614313b43cec60138c26a99 commit: 285f988e9d3a42d5aebb6c5012937771a7dbd4f7 [6892/7311] net: hns3: add queue bonding mode support for VF config: loongarch-randconfig-r113-20240408 (https://download.01.org/0day-ci/archive/20240409/202404090038.WzHqywzr-lkp@i...) compiler: loongarch64-linux-gcc (GCC) 13.2.0 reproduce: (https://download.01.org/0day-ci/archive/20240409/202404090038.WzHqywzr-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/202404090038.WzHqywzr-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c:392:58: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [usertype] qb_state @@ got restricted __le16 [usertype] @@
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c:392:58: sparse: expected unsigned short [usertype] qb_state drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c:392:58: sparse: got restricted __le16 [usertype] drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, ...): include/linux/page-flags.h:245:46: sparse: sparse: self-comparison always evaluates to false
vim +392 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c
312 313 void hclgevf_mbx_async_handler(struct hclgevf_dev *hdev) 314 { 315 struct hclge_mbx_port_base_vlan *vlan_info; 316 struct hclge_mbx_link_status *link_info; 317 struct hclge_mbx_link_mode *link_mode; 318 enum hnae3_reset_type reset_type; 319 u16 link_status, state; 320 __le16 *msg_q; 321 u16 opcode; 322 u8 duplex; 323 u32 speed; 324 u32 tail; 325 u8 flag; 326 u16 idx; 327 328 tail = hdev->arq.tail; 329 330 /* process all the async queue messages */ 331 while (tail != hdev->arq.head) { 332 if (test_bit(HCLGE_COMM_STATE_CMD_DISABLE, 333 &hdev->hw.hw.comm_state)) { 334 dev_info(&hdev->pdev->dev, 335 "vf crq need init in async\n"); 336 return; 337 } 338 339 msg_q = hdev->arq.msg_q[hdev->arq.head]; 340 opcode = le16_to_cpu(msg_q[0]); 341 switch (opcode) { 342 case HCLGE_MBX_LINK_STAT_CHANGE: 343 link_info = (struct hclge_mbx_link_status *)(msg_q + 1); 344 link_status = le16_to_cpu(link_info->link_status); 345 speed = le32_to_cpu(link_info->speed); 346 duplex = (u8)le16_to_cpu(link_info->duplex); 347 flag = link_info->flag; 348 349 /* update upper layer with new link link status */ 350 hclgevf_update_speed_duplex(hdev, speed, duplex); 351 hclgevf_update_link_status(hdev, link_status); 352 353 if (flag & HCLGE_MBX_PUSH_LINK_STATUS_EN) 354 set_bit(HCLGEVF_STATE_PF_PUSH_LINK_STATUS, 355 &hdev->state); 356 357 break; 358 case HCLGE_MBX_LINK_STAT_MODE: 359 link_mode = (struct hclge_mbx_link_mode *)(msg_q + 1); 360 idx = le16_to_cpu(link_mode->idx); 361 if (idx) 362 hdev->hw.mac.supported = 363 le64_to_cpu(link_mode->link_mode); 364 else 365 hdev->hw.mac.advertising = 366 le64_to_cpu(link_mode->link_mode); 367 break; 368 case HCLGE_MBX_ASSERTING_RESET: 369 /* PF has asserted reset hence VF should go in pending 370 * state and poll for the hardware reset status till it 371 * has been completely reset. After this stack should 372 * eventually be re-initialized. 373 */ 374 reset_type = 375 (enum hnae3_reset_type)le16_to_cpu(msg_q[1]); 376 set_bit(reset_type, &hdev->reset_pending); 377 set_bit(HCLGEVF_RESET_PENDING, &hdev->reset_state); 378 hclgevf_reset_task_schedule(hdev); 379 380 break; 381 case HCLGE_MBX_PUSH_VLAN_INFO: 382 vlan_info = 383 (struct hclge_mbx_port_base_vlan *)(msg_q + 1); 384 state = le16_to_cpu(vlan_info->state); 385 hclgevf_update_port_base_vlan_info(hdev, state, 386 vlan_info); 387 break; 388 case HCLGE_MBX_PUSH_PROMISC_INFO: 389 hclgevf_parse_promisc_info(hdev, le16_to_cpu(msg_q[1])); 390 break; 391 case HCLGE_MBX_PUSH_QB_STATE:
392 hclgevf_parse_qb_info(hdev, msg_q[1]);