From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by dpdk.org (Postfix) with ESMTP id EB5BEC4A8 for ; Fri, 24 Jul 2015 19:06:32 +0200 (CEST) Received: by pachj5 with SMTP id hj5so17138939pac.3 for ; Fri, 24 Jul 2015 10:06:32 -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=MMmuWp2xHjxWcKTi0UEzS0jcX1Y6074zztWGJmJN3A4=; b=mZc2GVHk27HJ8E1YtFFjDFCXeJkncTEbXvx1/1escbFUS7VibRrXYwnMzuhVg1Vlvw tMJRPAIZzRz4jqQl9BQvI0+aR2tLgxqllLvWyAk64/M4YHvAyKqeNaHpA4mBabqAqlDe n3sHOPktOTwarczngi0FhatjaDGAzY4gYxo76a6j07WSQTawc1S7tlHBEHrDBRtzPDo2 0qJ26tHjiPYMhfEcLjjy9BHhxL5TrNpyffa77zwEFYK+MWhy4lbH1iw1mzI7WdaAVh8e joUxSR2ZSKS7oCGok32m08O8UdXmfO4DPUspxUOl8TSF4Nfa7AxkUIPcGB5vTLJRNUE0 mQoA== X-Gm-Message-State: ALoCoQlr3hv4ydG2/bLqAN7KJn+PbqWpBYxb6ZcubShQTefeUCo4fuKgj/c0QoQoqvJG5X4Cj7lv X-Received: by 10.70.48.98 with SMTP id k2mr33591697pdn.69.1437757592386; Fri, 24 Jul 2015 10:06:32 -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.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Jul 2015 10:06:30 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Date: Fri, 24 Jul 2015 10:06:24 -0700 Message-Id: <1437757584-15502-12-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 11/11] bond: remove useless cast 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:33 -0000 Found by coccinelle script. drivers/net/bonding/rte_eth_bond_pmd.c:1587:34-54: WARNING: casting value returned by memory allocation function to (struct bond_rx_queue *) is useless. drivers/net/bonding/rte_eth_bond_pmd.c:1611:35-55: WARNING: casting value returned by memory allocation function to (struct bond_tx_queue *) is useless. Signed-off-by: Stephen Hemminger --- drivers/net/bonding/rte_eth_bond_pmd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 9cafe65..5e8c447 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1584,9 +1584,9 @@ bond_ethdev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id, uint16_t nb_rx_desc, unsigned int socket_id __rte_unused, const struct rte_eth_rxconf *rx_conf, struct rte_mempool *mb_pool) { - struct bond_rx_queue *bd_rx_q = (struct bond_rx_queue *) - rte_zmalloc_socket(NULL, sizeof(struct bond_rx_queue), - 0, dev->pci_dev->numa_node); + struct bond_rx_queue *bd_rx_q + = rte_zmalloc_socket(NULL, sizeof(struct bond_rx_queue), + 0, dev->pci_dev->numa_node); if (bd_rx_q == NULL) return -1; @@ -1608,9 +1608,9 @@ bond_ethdev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id, uint16_t nb_tx_desc, unsigned int socket_id __rte_unused, const struct rte_eth_txconf *tx_conf) { - struct bond_tx_queue *bd_tx_q = (struct bond_tx_queue *) - rte_zmalloc_socket(NULL, sizeof(struct bond_tx_queue), - 0, dev->pci_dev->numa_node); + struct bond_tx_queue *bd_tx_q + = rte_zmalloc_socket(NULL, sizeof(struct bond_tx_queue), + 0, dev->pci_dev->numa_node); if (bd_tx_q == NULL) return -1; -- 2.1.4