tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 7906c655c7b6e8bd68a7e7ee2455d9a8d8622fa9 [21044/30000] net: hns3: add command queue trace for hns3 config: arm64-randconfig-r131-20240925 (https://download.01.org/0day-ci/archive/20240929/202409290215.32P52XtH-lkp@i...) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240929/202409290215.32P52XtH-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/202409290215.32P52XtH-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c:478:68: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] opcode @@ got restricted __le16 [usertype] opcode @@
drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c:478:68: sparse: expected unsigned short [usertype] opcode drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c:478:68: sparse: got restricted __le16 [usertype] opcode drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c:514:67: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] opcode @@ got restricted __le16 [usertype] opcode @@ drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c:514:67: sparse: expected unsigned short [usertype] opcode drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c:514:67: sparse: got restricted __le16 [usertype] opcode -- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c: note: in included file (through include/trace/trace_events.h, include/trace/define_trace.h, ...):
drivers/net/ethernet/hisilicon/hns3/hns3pf/./hclge_trace.h:132:1: sparse: sparse: cast to restricted __le32
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c: note: in included file (through include/trace/perf.h, include/trace/define_trace.h, drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_trace.h):
drivers/net/ethernet/hisilicon/hns3/hns3pf/./hclge_trace.h:132:1: sparse: sparse: cast to restricted __le32
vim +478 drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c
461 462 /** 463 * hclge_comm_cmd_send - send command to command queue 464 * @hw: pointer to the hw struct 465 * @desc: prefilled descriptor for describing the command 466 * @num : the number of descriptors to be sent 467 * 468 * This is the main send command for command queue, it 469 * sends the queue, cleans the queue, etc 470 **/ 471 int hclge_comm_cmd_send(struct hclge_comm_hw *hw, struct hclge_desc *desc, 472 int num) 473 { 474 struct hclge_comm_cmq_ring *csq = &hw->cmq.csq; 475 int ret; 476 int ntc; 477 trace_hclge_comm_cmd_send(hw, desc, num,
478 hclge_comm_is_special_opcode(desc->opcode));
479 480 spin_lock_bh(&hw->cmq.csq.lock); 481 482 if (test_bit(HCLGE_COMM_STATE_CMD_DISABLE, &hw->comm_state)) { 483 spin_unlock_bh(&hw->cmq.csq.lock); 484 return -EBUSY; 485 } 486 487 if (num > hclge_comm_ring_space(&hw->cmq.csq)) { 488 /* If CMDQ ring is full, SW HEAD and HW HEAD may be different, 489 * need update the SW HEAD pointer csq->next_to_clean 490 */ 491 csq->next_to_clean = 492 hclge_comm_read_dev(hw, HCLGE_COMM_NIC_CSQ_HEAD_REG); 493 spin_unlock_bh(&hw->cmq.csq.lock); 494 return -EBUSY; 495 } 496 497 /** 498 * Record the location of desc in the ring for this time 499 * which will be use for hardware to write back 500 */ 501 ntc = hw->cmq.csq.next_to_use; 502 503 hclge_comm_cmd_copy_desc(hw, desc, num); 504 505 /* Write to hardware */ 506 hclge_comm_write_dev(hw, HCLGE_COMM_NIC_CSQ_TAIL_REG, 507 hw->cmq.csq.next_to_use); 508 509 ret = hclge_comm_cmd_check_result(hw, desc, num, ntc); 510 511 spin_unlock_bh(&hw->cmq.csq.lock); 512 513 trace_hclge_comm_cmd_get(hw, desc, num, 514 hclge_comm_is_special_opcode(desc->opcode)); 515 return ret; 516 } 517