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 9A446A04DD for ; Wed, 18 Nov 2020 18:00:31 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AB0AA5937; Wed, 18 Nov 2020 18:00:27 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 613EA4C90 for ; Wed, 18 Nov 2020 18:00:25 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from michaelba@nvidia.com) with SMTP; 18 Nov 2020 19:00:19 +0200 Received: from nvidia.com (pegasus07.mtr.labs.mlnx [10.210.16.112]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0AIH0IwY005874; Wed, 18 Nov 2020 19:00:18 +0200 From: Michael Baum To: dev@dpdk.org Cc: Matan Azrad , Raslan Darawsheh , Viacheslav Ovsiienko , stable@dpdk.org Date: Wed, 18 Nov 2020 17:00:07 +0000 Message-Id: <1605718811-18652-3-git-send-email-michaelba@nvidia.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1605718811-18652-1-git-send-email-michaelba@nvidia.com> References: <1605718811-18652-1-git-send-email-michaelba@nvidia.com> Subject: [dpdk-stable] [PATCH 3/7] regex/mlx5: fix unnecessary init in RXP handle X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" The rxp_poll_csr_for_value function defines a variable named ret. It is the return value of the function, and It is updated to 0 by default later in the function. Similarly the rxp_init_rtru function also defines a variable named ret. The function assigns into it return values from functions during the function. In both functions they initialize the ret variable when defining it. however, in both cases they do not use any ret variable before assigning into them different values, so the initializations are unnecessary. Clean the aforementioned unnecessary initializations. Fixes: e3dbbf718ebc ("regex/mlx5: support configuration") Fixes: b34d816363b5 ("regex/mlx5: support rules import") Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Ori Kam --- drivers/regex/mlx5/mlx5_rxp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regex/mlx5/mlx5_rxp.c b/drivers/regex/mlx5/mlx5_rxp.c index e54d2b8..41fbae7 100644 --- a/drivers/regex/mlx5/mlx5_rxp.c +++ b/drivers/regex/mlx5/mlx5_rxp.c @@ -225,7 +225,7 @@ uint32_t expected_mask, uint32_t timeout_ms, uint8_t id) { unsigned int i; - int ret = 0; + int ret; ret = -EBUSY; for (i = 0; i < timeout_ms; i++) { @@ -276,7 +276,7 @@ uint32_t poll_value; uint32_t expected_value; uint32_t expected_mask; - int ret = 0; + int ret; /* Read the rtru ctrl CSR. */ ret = mlx5_devx_regex_register_read(ctx, id, MLX5_RXP_RTRU_CSR_CTRL, -- 1.8.3.1