From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AC9F3A0093 for ; Mon, 15 Jun 2020 04:08:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3C2941BF53; Mon, 15 Jun 2020 04:08:28 +0200 (CEST) Received: by dpdk.org (Postfix, from userid 1017) id 8F6CD1BF1B; Mon, 15 Jun 2020 04:08:22 +0200 (CEST) In-Reply-To: <20200615020515.1359-38-qi.z.zhang@intel.com> References: <20200615020515.1359-38-qi.z.zhang@intel.com> To: test-report@dpdk.org Cc: Qi Zhang Message-Id: <20200615020822.8F6CD1BF1B@dpdk.org> Date: Mon, 15 Jun 2020 04:08:22 +0200 (CEST) From: checkpatch@dpdk.org Subject: [dpdk-test-report] |WARNING| pw71569 [PATCH v3 37/53] net/ice/base: fix for memory leak X-BeenThere: test-report@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "test-report" Test-Label: checkpatch Test-Status: WARNING http://dpdk.org/patch/71569 _coding style issues_ CHECK:MACRO_ARG_REUSE: Macro argument reuse 'hw' - possible side-effects? #103: FILE: drivers/net/ice/base/ice_controlq.c:286: +#define ICE_FREE_CQ_BUFS(hw, qi, ring) \ +do { \ + /* free descriptors */ \ + if ((qi)->ring.r.ring##_bi) { \ + int i; \ + \ + for (i = 0; i < (qi)->num_##ring##_entries; i++) \ + if ((qi)->ring.r.ring##_bi[i].pa) \ + ice_free_dma_mem((hw), \ + &(qi)->ring.r.ring##_bi[i]); \ + } \ + /* free the buffer info list */ \ + if ((qi)->ring.cmd_buf) \ + ice_free(hw, (qi)->ring.cmd_buf); \ + /* free DMA head */ \ + ice_free(hw, (qi)->ring.dma_head); \ +} while (0) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'qi' - possible side-effects? #103: FILE: drivers/net/ice/base/ice_controlq.c:286: +#define ICE_FREE_CQ_BUFS(hw, qi, ring) \ +do { \ + /* free descriptors */ \ + if ((qi)->ring.r.ring##_bi) { \ + int i; \ + \ + for (i = 0; i < (qi)->num_##ring##_entries; i++) \ + if ((qi)->ring.r.ring##_bi[i].pa) \ + ice_free_dma_mem((hw), \ + &(qi)->ring.r.ring##_bi[i]); \ + } \ + /* free the buffer info list */ \ + if ((qi)->ring.cmd_buf) \ + ice_free(hw, (qi)->ring.cmd_buf); \ + /* free DMA head */ \ + ice_free(hw, (qi)->ring.dma_head); \ +} while (0) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'ring' - possible side-effects? #103: FILE: drivers/net/ice/base/ice_controlq.c:286: +#define ICE_FREE_CQ_BUFS(hw, qi, ring) \ +do { \ + /* free descriptors */ \ + if ((qi)->ring.r.ring##_bi) { \ + int i; \ + \ + for (i = 0; i < (qi)->num_##ring##_entries; i++) \ + if ((qi)->ring.r.ring##_bi[i].pa) \ + ice_free_dma_mem((hw), \ + &(qi)->ring.r.ring##_bi[i]); \ + } \ + /* free the buffer info list */ \ + if ((qi)->ring.cmd_buf) \ + ice_free(hw, (qi)->ring.cmd_buf); \ + /* free DMA head */ \ + ice_free(hw, (qi)->ring.dma_head); \ +} while (0) CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'ring' may be better as '(ring)' to avoid precedence issues #103: FILE: drivers/net/ice/base/ice_controlq.c:286: +#define ICE_FREE_CQ_BUFS(hw, qi, ring) \ +do { \ + /* free descriptors */ \ + if ((qi)->ring.r.ring##_bi) { \ + int i; \ + \ + for (i = 0; i < (qi)->num_##ring##_entries; i++) \ + if ((qi)->ring.r.ring##_bi[i].pa) \ + ice_free_dma_mem((hw), \ + &(qi)->ring.r.ring##_bi[i]); \ + } \ + /* free the buffer info list */ \ + if ((qi)->ring.cmd_buf) \ + ice_free(hw, (qi)->ring.cmd_buf); \ + /* free DMA head */ \ + ice_free(hw, (qi)->ring.dma_head); \ +} while (0) total: 0 errors, 0 warnings, 4 checks, 77 lines checked