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 A2E0745E7A for ; Wed, 11 Dec 2024 18:36:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 960EF402BD; Wed, 11 Dec 2024 18:36:48 +0100 (CET) Received: from dpdk.org (dpdk.org [92.243.24.197]) by mails.dpdk.org (Postfix) with ESMTP id AF588402D6 for ; Wed, 11 Dec 2024 18:36:47 +0100 (CET) Received: by dpdk.org (Postfix, from userid 65534) id 72907121F12; Wed, 11 Dec 2024 18:36:43 +0100 (CET) Subject: |WARNING| pw149178 [PATCH v3 17/22] net/iavf: use common Tx queue mbuf cleanup fn In-Reply-To: <20241211173331.65262-18-bruce.richardson@intel.com> References: <20241211173331.65262-18-bruce.richardson@intel.com> To: test-report@dpdk.org From: checkpatch@dpdk.org Cc: Bruce Richardson Message-Id: <20241211173643.72907121F12@dpdk.org> Date: Wed, 11 Dec 2024 18:36:43 +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/149178 _coding style issues_ CHECK:MACRO_ARG_REUSE: Macro argument reuse 'swr' - possible side-effects? #101: FILE: drivers/net/_common_intel/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 #101: FILE: drivers/net/_common_intel/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? #101: FILE: drivers/net/_common_intel/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 #101: FILE: drivers/net/_common_intel/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