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 653A745E03 for ; Mon, 2 Dec 2024 12:29:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59D1F4028E; Mon, 2 Dec 2024 12:29:59 +0100 (CET) Received: from dpdk.org (dpdk.org [92.243.24.197]) by mails.dpdk.org (Postfix) with ESMTP id 02F6D4028B for ; Mon, 2 Dec 2024 12:29:58 +0100 (CET) Received: by dpdk.org (Postfix, from userid 65534) id F338A124519; Mon, 2 Dec 2024 12:29:57 +0100 (CET) Subject: |WARNING| pw148969 [PATCH v1 17/21] net/iavf: use common Tx queue mbuf cleanup fn In-Reply-To: <20241202112444.1517416-18-bruce.richardson@intel.com> References: <20241202112444.1517416-18-bruce.richardson@intel.com> To: test-report@dpdk.org From: checkpatch@dpdk.org Cc: Bruce Richardson Message-Id: <20241202112957.F338A124519@dpdk.org> Date: Mon, 2 Dec 2024 12:29:57 +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/148969 _coding style issues_ CHECK:MACRO_ARG_REUSE: Macro argument reuse 'swr' - possible side-effects? #102: FILE: drivers/net/_common_intel/tx.h:275: +#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 #102: FILE: drivers/net/_common_intel/tx.h:275: +#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? #102: FILE: drivers/net/_common_intel/tx.h:275: +#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 #102: FILE: drivers/net/_common_intel/tx.h:275: +#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