From patchwork Wed Jun 24 13:44:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Baum X-Patchwork-Id: 72140 X-Patchwork-Delegate: rasland@nvidia.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 48AB2A0350; Wed, 24 Jun 2020 15:44:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0B3401D95C; Wed, 24 Jun 2020 15:44:47 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id C0D6B1D95A for ; Wed, 24 Jun 2020 15:44:45 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from matan@mellanox.com) with SMTP; 24 Jun 2020 16:44:40 +0300 Received: from pegasus07.mtr.labs.mlnx (pegasus07.mtr.labs.mlnx [10.210.16.112]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 05ODiUXa013703; Wed, 24 Jun 2020 16:44:30 +0300 From: Michael Baum To: dev@dpdk.org Cc: matan@mellanox.com, viacheslavo@mellanox.com Date: Wed, 24 Jun 2020 13:44:27 +0000 Message-Id: <1593006267-6159-1-git-send-email-michaelba@mellanox.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] net/mlx4: remove useless assignment X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The mlx4_ibv_device_to_pci_addr function defines a variable called ret inside a loop and uses it. During the loop, the function assigns a value within the variable and breaks from the loop, so that this assigning has done nothing and is actually unnecessary. Remove the unnecessary assigning. Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx4/mlx4.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index ff270b4..1657ea3 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -492,7 +492,6 @@ struct mlx4_conf { &pci_addr->bus, &pci_addr->devid, &pci_addr->function) == 4) { - ret = 0; break; } }