From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by dpdk.org (Postfix) with ESMTP id 7E6C7C482 for ; Fri, 24 Jul 2015 19:06:23 +0200 (CEST) Received: by pacan13 with SMTP id an13so17465611pac.1 for ; Fri, 24 Jul 2015 10:06:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=yM6p874EkgVGI1ImGObBqBxsiLxi7TGiR+/B1p+hCTc=; b=IG4sJO0EfNxJynTl5Pun8Bcr8PvpaBz9IHLagrdlj1mpIHcVGHl4g6ljq5iF9gSvWC 3Fpyciy/A0bI6ndrq+zE0mQ/bDLzcYvUHbo16xdx5yJe8hRKPRjddknn9sq2xJz+VIh6 jzQSV1cA8qPJDlius0e+NR5KJibQGTe0OwYald+wAP1pVq2BWvdmcT0snpMoD6jV1SQY Wl/rfT039GZ4hcvtTkb9QRtzuLAJQGcfcxs0vFq1fhikBOLWg7qc4gvVE50bxwB8+R4M 69rUw6qhldS4/BdK7cdTM/g3XnKJQCzsrNw5vQSZ6q3egAYbGnsHji+IEM+5KgI2XCHa DKCQ== X-Gm-Message-State: ALoCoQnJ/p9OqWmgVW3WhZmy8uIFX1LPeHEOkbocLPdZTaarZ/jECD6HNicH4aWTmdrs9xeEUI/X X-Received: by 10.70.132.135 with SMTP id ou7mr33181026pdb.112.1437757582823; Fri, 24 Jul 2015 10:06:22 -0700 (PDT) Received: from urahara.home.lan (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id ra10sm15635403pab.19.2015.07.24.10.06.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Jul 2015 10:06:22 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Date: Fri, 24 Jul 2015 10:06:17 -0700 Message-Id: <1437757584-15502-5-git-send-email-stephen@networkplumber.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1437757584-15502-1-git-send-email-stephen@networkplumber.org> References: <1437757584-15502-1-git-send-email-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH 04/11] eth: remove unnecessary return value X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jul 2015 17:06:24 -0000 Eliminate unnecessary variable for return value Found with returnvar.cocci Signed-off-by: Stephen Hemminger --- lib/librte_ether/rte_ethdev.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index a96cd4f..d72fa8e 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -1892,7 +1892,6 @@ int rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask) { struct rte_eth_dev *dev; - int ret = 0; int mask = 0; int cur, org = 0; @@ -1921,14 +1920,14 @@ rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask) mask |= ETH_VLAN_EXTEND_MASK; } - /*no change*/ + /* no change */ if (mask == 0) - return ret; + return 0; FUNC_PTR_OR_ERR_RET(*dev->dev_ops->vlan_offload_set, -ENOTSUP); (*dev->dev_ops->vlan_offload_set)(dev, mask); - return ret; + return 0; } int -- 2.1.4