[openeuler:OLK-6.6 2700/2700] drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:1652:44: warning: variable 'req3' set but not used

tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 65a146fa77b5cff9bb07725ed7ccabb9670bfb54 commit: bc1a3cc2f19671a50ec92172b875e9b0344b7b54 [2700/2700] net: hns3: refactor the debugfs for dumping FD tcam config: x86_64-buildonly-randconfig-2001-20250821 (https://download.01.org/0day-ci/archive/20250821/202508211956.9IhbkZmD-lkp@i...) compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250821/202508211956.9IhbkZmD-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/202508211956.9IhbkZmD-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c: In function 'hclge_query_rules_valid':
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:1652:44: warning: variable 'req3' set but not used [-Wunused-but-set-variable] 1652 | struct hclge_fd_tcam_config_3_cmd *req3; | ^~~~ drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:1651:44: warning: variable 'req2' set but not used [-Wunused-but-set-variable] 1651 | struct hclge_fd_tcam_config_2_cmd *req2; | ^~~~
vim +/req3 +1652 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c 1646 1647 static int hclge_query_rules_valid(struct hclge_dev *hdev, u8 stage, u32 loc) 1648 { 1649 #define HCLGE_TCAM_SELECTION_X 1 1650 struct hclge_fd_tcam_config_1_cmd *req1;
1651 struct hclge_fd_tcam_config_2_cmd *req2; 1652 struct hclge_fd_tcam_config_3_cmd *req3; 1653 struct hclge_desc desc[3]; 1654 int ret; 1655 1656 hclge_cmd_setup_basic_desc(&desc[0], HCLGE_OPC_FD_TCAM_OP, true); 1657 desc[0].flag |= cpu_to_le16(HCLGE_COMM_CMD_FLAG_NEXT); 1658 hclge_cmd_setup_basic_desc(&desc[1], HCLGE_OPC_FD_TCAM_OP, true); 1659 desc[1].flag |= cpu_to_le16(HCLGE_COMM_CMD_FLAG_NEXT); 1660 hclge_cmd_setup_basic_desc(&desc[2], HCLGE_OPC_FD_TCAM_OP, true); 1661 1662 req1 = (struct hclge_fd_tcam_config_1_cmd *)desc[0].data; 1663 req2 = (struct hclge_fd_tcam_config_2_cmd *)desc[1].data; 1664 req3 = (struct hclge_fd_tcam_config_3_cmd *)desc[2].data; 1665 1666 req1->stage = stage; 1667 req1->xy_sel = HCLGE_TCAM_SELECTION_X; 1668 req1->index = cpu_to_le32(loc); 1669 1670 ret = hclge_cmd_send(&hdev->hw, desc, 3); 1671 if (ret) { 1672 dev_err(&hdev->pdev->dev, 1673 "failed to read tcam status, ret = %d\n", ret); 1674 return ret; 1675 } 1676 1677 return req1->entry_vld; 1678 } 1679
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot