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 E2E9845EFA for ; Fri, 20 Dec 2024 15:42:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DADB240290; Fri, 20 Dec 2024 15:42:50 +0100 (CET) Received: from dpdk.org (dpdk.org [92.243.24.197]) by mails.dpdk.org (Postfix) with ESMTP id 5674640156 for ; Fri, 20 Dec 2024 15:42:49 +0100 (CET) Received: by dpdk.org (Postfix, from userid 65534) id 9CBD5121F15; Fri, 20 Dec 2024 15:42:34 +0100 (CET) Subject: |WARNING| pw149347 [PATCH v4 17/24] net/iavf: use common Tx queue mbuf cleanup fn In-Reply-To: <20241220143925.609044-18-bruce.richardson@intel.com> References: <20241220143925.609044-18-bruce.richardson@intel.com> To: test-report@dpdk.org From: checkpatch@dpdk.org Cc: Bruce Richardson Message-Id: <20241220144234.9CBD5121F15@dpdk.org> Date: Fri, 20 Dec 2024 15:42:34 +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/149347 _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