From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id C508F4BFE for ; Wed, 20 Mar 2013 17:07:44 +0100 (CET) Received: by mail-wg0-f46.google.com with SMTP id fg15so1444223wgb.1 for ; Wed, 20 Mar 2013 09:06:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:x-gm-message-state; bh=jHQpeRMvssE8zXCCIpm9E8BlQLnX6ZKRkRSAhMtDgU4=; b=e/+lU1OkkFVxC0SO03shRNj/Vi7OaFU9bzJCUxxKCK3boV0F5Sh40ER+CmtkNBHMbB UkN2BMgkryzhVJk98++6SQB9llQ1u0P/8Jnx/6+FbSkBlDNup/iK8A63iNrbhWI4+iNW +R8cjmEwWMaoHHgyVfwPAMbJ/EJ3FpIXedowE9GhikDXcyyEwTq+mVpJ05ztcQ1LVxZB bm7PYAjLBh1OAmHCBKde5rgnFnMIg0/N9fXu0IQNztNBExJj+5r4Y86ELq8iwyjBW1os WFfE8sR8U+3ly29xjU3T7lwPLrdmluREPqdL8o/iTuiOT7A8Lz2TUSeo6qXeEpvR2Y/J eY/w== X-Received: by 10.180.83.10 with SMTP id m10mr4907936wiy.5.1363795605882; Wed, 20 Mar 2013 09:06:45 -0700 (PDT) Received: from 6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPS id ex1sm4058881wib.7.2013.03.20.09.06.43 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 20 Mar 2013 09:06:45 -0700 (PDT) Received: by 6wind.com (sSMTP sendmail emulation); Wed, 20 Mar 2013 17:06:43 +0100 From: Thomas Monjalon To: dev@dpdk.org Date: Wed, 20 Mar 2013 17:05:00 +0100 Message-Id: X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQk+DyqtsbibnjtXvaFzqrCFWR0FjD3rESj9eaYpDHdKpTa0RAfqNhLkFC7k2u101YuiyqhE Subject: [dpdk-dev] [PATCH 12/22] lib: fix unused values 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: Wed, 20 Mar 2013 16:07:45 -0000 From: Zijie Pan Fix warnings of type "Value stored to 'xxx' is never read". Acked-by: Ivan Boule Acked-by: Adrien Mazarguil Signed-off-by: Zijie Pan --- lib/librte_cmdline/cmdline_parse_ipaddr.c | 1 - lib/librte_eal/linuxapp/eal/eal_thread.c | 2 -- lib/librte_lpm/rte_lpm.c | 2 +- lib/librte_pmd_igb/e1000_rxtx.c | 2 -- lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 4 ++++ 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/librte_cmdline/cmdline_parse_ipaddr.c b/lib/librte_cmdline/cmdline_parse_ipaddr.c index 66a1493..a7dcd2b 100644 --- a/lib/librte_cmdline/cmdline_parse_ipaddr.c +++ b/lib/librte_cmdline/cmdline_parse_ipaddr.c @@ -262,7 +262,6 @@ inet_pton6(const char *src, unsigned char *dst) inet_pton4(curtok, tp) > 0) { tp += INADDRSZ; saw_xdigit = 0; - count_xdigit = 0; break; /* '\0' was seen by inet_pton4(). */ } return (0); diff --git a/lib/librte_eal/linuxapp/eal/eal_thread.c b/lib/librte_eal/linuxapp/eal/eal_thread.c index 7409d28..d36030e 100644 --- a/lib/librte_eal/linuxapp/eal/eal_thread.c +++ b/lib/librte_eal/linuxapp/eal/eal_thread.c @@ -86,7 +86,6 @@ rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned slave_id) rte_panic("cannot write on configuration pipe\n"); /* wait ack */ - n = 0; do { n = read(s2m, &c, 1); } while (n < 0 && errno == EINTR); @@ -203,7 +202,6 @@ eal_thread_loop(__attribute__((unused)) void *arg) void *fct_arg; /* wait command */ - n = 0; do { n = read(m2s, &c, 1); } while (n < 0 && errno == EINTR); diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c index 4269b3c..bb1ec48 100644 --- a/lib/librte_lpm/rte_lpm.c +++ b/lib/librte_lpm/rte_lpm.c @@ -276,7 +276,7 @@ rule_add(struct rte_lpm *lpm, uint32_t ip_masked, uint8_t depth, last_rule = rule_gindex + lpm->used_rules_at_depth[depth - 1]; /* Scan through rule group to see if rule already exists. */ - for (rule_index = rule_gindex; rule_index < last_rule; rule_index++) { + for (; rule_index < last_rule; rule_index++) { /* If rule already exists update its next_hop and return. */ if (lpm->rules_tbl[rule_index].ip == ip_masked) { diff --git a/lib/librte_pmd_igb/e1000_rxtx.c b/lib/librte_pmd_igb/e1000_rxtx.c index a891d12..96b0682 100644 --- a/lib/librte_pmd_igb/e1000_rxtx.c +++ b/lib/librte_pmd_igb/e1000_rxtx.c @@ -1247,8 +1247,6 @@ eth_igb_tx_queue_setup(struct rte_eth_dev *dev, txq->tx_ring_phys_addr = (uint64_t) tz->phys_addr; txq->tx_ring = (union e1000_adv_tx_desc *) tz->addr; - size = sizeof(union e1000_adv_tx_desc) * nb_desc; - /* Allocate software ring */ txq->sw_ring = rte_zmalloc("txq->sw_ring", sizeof(struct igb_tx_entry) * nb_desc, diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c index f3b3cda..6f41fbe 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c @@ -507,6 +507,10 @@ eth_ixgbevf_dev_init(__attribute__((unused)) struct eth_driver *eth_drv, hw->mac.num_rar_entries = hw->mac.max_rx_queues; diag = hw->mac.ops.reset_hw(hw); + if (diag != IXGBE_SUCCESS) { + PMD_INIT_LOG(ERR, "VF Initialization Failure: %d", diag); + return (diag); + } /* Allocate memory for storing MAC addresses */ eth_dev->data->mac_addrs = rte_zmalloc("ixgbevf", ETHER_ADDR_LEN * -- 1.7.2.5