From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8B668460C2 for ; Mon, 20 Jan 2025 13:05:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8749E4027A; Mon, 20 Jan 2025 13:05:09 +0100 (CET) Received: from dpdk.org (dpdk.org [92.243.24.197]) by mails.dpdk.org (Postfix) with ESMTP id 0EE5E4021E for ; Mon, 20 Jan 2025 13:05:08 +0100 (CET) Received: by dpdk.org (Postfix, from userid 65534) id E41D5126FE6; Mon, 20 Jan 2025 13:04:16 +0100 (CET) Subject: |WARNING| pw150277 [PATCH v5 18/25] net/iavf: use common Tx queue mbuf cleanup fn In-Reply-To: <20250120120016.1530274-19-bruce.richardson@intel.com> References: <20250120120016.1530274-19-bruce.richardson@intel.com> To: test-report@dpdk.org From: checkpatch@dpdk.org Cc: Bruce Richardson Message-Id: <20250120120416.E41D5126FE6@dpdk.org> Date: Mon, 20 Jan 2025 13:04:16 +0100 (CET) X-BeenThere: test-report@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: automatic DPDK test reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: test-report-bounces@dpdk.org Test-Label: checkpatch Test-Status: WARNING http://dpdk.org/patch/150277 _coding style issues_ CHECK:MACRO_ARG_REUSE: Macro argument reuse 'swr' - possible side-effects? #100: FILE: drivers/net/intel/common/tx.h:274: +#define IETH_FREE_BUFS_LOOP(swr, nb_desc, start, end) do { \ uint16_t i = start; \ + if (end < i) { \ + for (; i < nb_desc; i++) { \ rte_pktmbuf_free_seg(swr[i].mbuf); \ swr[i].mbuf = NULL; \ } \ i = 0; \ } \ + for (; i < end; i++) { \ rte_pktmbuf_free_seg(swr[i].mbuf); \ swr[i].mbuf = NULL; \ } \ } while (0) CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'nb_desc' may be better as '(nb_desc)' to avoid precedence issues #100: FILE: drivers/net/intel/common/tx.h:274: +#define IETH_FREE_BUFS_LOOP(swr, nb_desc, start, end) do { \ uint16_t i = start; \ + if (end < i) { \ + for (; i < nb_desc; i++) { \ rte_pktmbuf_free_seg(swr[i].mbuf); \ swr[i].mbuf = NULL; \ } \ i = 0; \ } \ + for (; i < end; i++) { \ rte_pktmbuf_free_seg(swr[i].mbuf); \ swr[i].mbuf = NULL; \ } \ } while (0) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'end' - possible side-effects? #100: FILE: drivers/net/intel/common/tx.h:274: +#define IETH_FREE_BUFS_LOOP(swr, nb_desc, start, end) do { \ uint16_t i = start; \ + if (end < i) { \ + for (; i < nb_desc; i++) { \ rte_pktmbuf_free_seg(swr[i].mbuf); \ swr[i].mbuf = NULL; \ } \ i = 0; \ } \ + for (; i < end; i++) { \ rte_pktmbuf_free_seg(swr[i].mbuf); \ swr[i].mbuf = NULL; \ } \ } while (0) CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'end' may be better as '(end)' to avoid precedence issues #100: FILE: drivers/net/intel/common/tx.h:274: +#define IETH_FREE_BUFS_LOOP(swr, nb_desc, start, end) do { \ uint16_t i = start; \ + if (end < i) { \ + for (; i < nb_desc; i++) { \ rte_pktmbuf_free_seg(swr[i].mbuf); \ swr[i].mbuf = NULL; \ } \ i = 0; \ } \ + for (; i < end; i++) { \ rte_pktmbuf_free_seg(swr[i].mbuf); \ swr[i].mbuf = NULL; \ } \ } while (0) total: 0 errors, 0 warnings, 4 checks, 287 lines checked