Hi Haoxiang, kernel test robot noticed the following build warnings:
[auto build test WARNING on tnguy-next-queue/dev-queue] [also build test WARNING on tnguy-net-queue/dev-queue linus/master v6.19-rc7 next-20260130] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Haoxiang-Li/i40e-add-an-error-handling-path-in-i40e_xsk_pool_enable/20260131-135447 base: https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git dev-queue patch link: https://lore.kernel.org/r/20260131055217.729048-1-lihaoxiang%40isrc.iscas.ac.cn patch subject: [Intel-wired-lan] [PATCH v2] i40e: add an error handling path in i40e_xsk_pool_enable() config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20260131/[email protected]/config) compiler: mips-linux-gcc (GCC) 15.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260131/[email protected]/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 <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All warnings (new ones prefixed by >>): drivers/net/ethernet/intel/i40e/i40e_xsk.c: In function 'i40e_xsk_pool_enable': drivers/net/ethernet/intel/i40e/i40e_xsk.c:130:9: error: implicit declaration of function 'i40e_xsk_pool_disable'; did you mean 'i40e_xsk_pool_enable'? [-Wimplicit-function-declaration] 130 | i40e_xsk_pool_disable(vsi, qid); | ^~~~~~~~~~~~~~~~~~~~~ | i40e_xsk_pool_enable drivers/net/ethernet/intel/i40e/i40e_xsk.c: At top level: drivers/net/ethernet/intel/i40e/i40e_xsk.c:141:12: error: conflicting types for 'i40e_xsk_pool_disable'; have 'int(struct i40e_vsi *, u16)' {aka 'int(struct i40e_vsi *, short unsigned int)'} 141 | static int i40e_xsk_pool_disable(struct i40e_vsi *vsi, u16 qid) | ^~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/intel/i40e/i40e_xsk.c:142:1: note: an argument type that has a default promotion cannot match an empty parameter name list declaration 142 | { | ^ drivers/net/ethernet/intel/i40e/i40e_xsk.c:130:9: note: previous implicit declaration of 'i40e_xsk_pool_disable' with type 'int()' 130 | i40e_xsk_pool_disable(vsi, qid); | ^~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/intel/i40e/i40e_xsk.c: In function 'i40e_xsk_pool_enable': >> drivers/net/ethernet/intel/i40e/i40e_xsk.c:131:1: warning: control reaches >> end of non-void function [-Wreturn-type] 131 | } | ^ vim +131 drivers/net/ethernet/intel/i40e/i40e_xsk.c aae425efdfd1b1 Jan Sokolowski 2022-10-12 72 0a714186d3c0f7 Björn Töpel 2018-08-28 73 /** 1742b3d528690a Magnus Karlsson 2020-08-28 74 * i40e_xsk_pool_enable - Enable/associate an AF_XDP buffer pool to a 1742b3d528690a Magnus Karlsson 2020-08-28 75 * certain ring/qid 0a714186d3c0f7 Björn Töpel 2018-08-28 76 * @vsi: Current VSI 1742b3d528690a Magnus Karlsson 2020-08-28 77 * @pool: buffer pool 1742b3d528690a Magnus Karlsson 2020-08-28 78 * @qid: Rx ring to associate buffer pool with 0a714186d3c0f7 Björn Töpel 2018-08-28 79 * 0a714186d3c0f7 Björn Töpel 2018-08-28 80 * Returns 0 on success, <0 on failure 0a714186d3c0f7 Björn Töpel 2018-08-28 81 **/ 1742b3d528690a Magnus Karlsson 2020-08-28 82 static int i40e_xsk_pool_enable(struct i40e_vsi *vsi, 1742b3d528690a Magnus Karlsson 2020-08-28 83 struct xsk_buff_pool *pool, 0a714186d3c0f7 Björn Töpel 2018-08-28 84 u16 qid) 0a714186d3c0f7 Björn Töpel 2018-08-28 85 { f3fef2b6e1cc80 Jan Sokolowski 2018-12-18 86 struct net_device *netdev = vsi->netdev; 0a714186d3c0f7 Björn Töpel 2018-08-28 87 bool if_running; 0a714186d3c0f7 Björn Töpel 2018-08-28 88 int err; 0a714186d3c0f7 Björn Töpel 2018-08-28 89 0a714186d3c0f7 Björn Töpel 2018-08-28 90 if (vsi->type != I40E_VSI_MAIN) 0a714186d3c0f7 Björn Töpel 2018-08-28 91 return -EINVAL; 0a714186d3c0f7 Björn Töpel 2018-08-28 92 0a714186d3c0f7 Björn Töpel 2018-08-28 93 if (qid >= vsi->num_queue_pairs) 0a714186d3c0f7 Björn Töpel 2018-08-28 94 return -EINVAL; 0a714186d3c0f7 Björn Töpel 2018-08-28 95 f3fef2b6e1cc80 Jan Sokolowski 2018-12-18 96 if (qid >= netdev->real_num_rx_queues || f3fef2b6e1cc80 Jan Sokolowski 2018-12-18 97 qid >= netdev->real_num_tx_queues) 0a714186d3c0f7 Björn Töpel 2018-08-28 98 return -EINVAL; 0a714186d3c0f7 Björn Töpel 2018-08-28 99 c4655761d3cf62 Magnus Karlsson 2020-08-28 100 err = xsk_pool_dma_map(pool, &vsi->back->pdev->dev, I40E_RX_DMA_ATTR); 0a714186d3c0f7 Björn Töpel 2018-08-28 101 if (err) 0a714186d3c0f7 Björn Töpel 2018-08-28 102 return err; 0a714186d3c0f7 Björn Töpel 2018-08-28 103 44ddd4f1709249 Björn Töpel 2019-02-12 104 set_bit(qid, vsi->af_xdp_zc_qps); 44ddd4f1709249 Björn Töpel 2019-02-12 105 0a714186d3c0f7 Björn Töpel 2018-08-28 106 if_running = netif_running(vsi->netdev) && i40e_enabled_xdp_vsi(vsi); 0a714186d3c0f7 Björn Töpel 2018-08-28 107 0a714186d3c0f7 Björn Töpel 2018-08-28 108 if (if_running) { 0a714186d3c0f7 Björn Töpel 2018-08-28 109 err = i40e_queue_pair_disable(vsi, qid); 0a714186d3c0f7 Björn Töpel 2018-08-28 110 if (err) a086001db7c4af Haoxiang Li 2026-01-31 111 goto err_out; 0a714186d3c0f7 Björn Töpel 2018-08-28 112 aae425efdfd1b1 Jan Sokolowski 2022-10-12 113 err = i40e_realloc_rx_xdp_bi(vsi->rx_rings[qid], true); aae425efdfd1b1 Jan Sokolowski 2022-10-12 114 if (err) a086001db7c4af Haoxiang Li 2026-01-31 115 goto err_out; aae425efdfd1b1 Jan Sokolowski 2022-10-12 116 0a714186d3c0f7 Björn Töpel 2018-08-28 117 err = i40e_queue_pair_enable(vsi, qid); 0a714186d3c0f7 Björn Töpel 2018-08-28 118 if (err) a086001db7c4af Haoxiang Li 2026-01-31 119 goto err_out; 14ffeb52f3693a Magnus Karlsson 2019-01-29 120 14ffeb52f3693a Magnus Karlsson 2019-01-29 121 /* Kick start the NAPI context so that receiving will start */ 9116e5e2b1fff7 Magnus Karlsson 2019-08-14 122 err = i40e_xsk_wakeup(vsi->netdev, qid, XDP_WAKEUP_RX); 14ffeb52f3693a Magnus Karlsson 2019-01-29 123 if (err) a086001db7c4af Haoxiang Li 2026-01-31 124 goto err_out; 0a714186d3c0f7 Björn Töpel 2018-08-28 125 } 0a714186d3c0f7 Björn Töpel 2018-08-28 126 0a714186d3c0f7 Björn Töpel 2018-08-28 127 return 0; a086001db7c4af Haoxiang Li 2026-01-31 128 a086001db7c4af Haoxiang Li 2026-01-31 129 err_out: a086001db7c4af Haoxiang Li 2026-01-31 130 i40e_xsk_pool_disable(vsi, qid); 0a714186d3c0f7 Björn Töpel 2018-08-28 @131 } 0a714186d3c0f7 Björn Töpel 2018-08-28 132 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
