From patchwork Wed Aug 23 15:44:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 27821 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id AB5CD7D7F; Wed, 23 Aug 2017 17:44:56 +0200 (CEST) Received: from mail-pg0-f50.google.com (mail-pg0-f50.google.com [74.125.83.50]) by dpdk.org (Postfix) with ESMTP id 026587D4A for ; Wed, 23 Aug 2017 17:44:51 +0200 (CEST) Received: by mail-pg0-f50.google.com with SMTP id t3so1785542pgt.0 for ; Wed, 23 Aug 2017 08:44:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sd2/xQdY9Tlg/n5kuubeXzzRgcI2vMHJRe7Zl07dQuY=; b=LzC6jBIIuW63gOyTGUyvep/KKAdyzo4iBSg/U6Cbv+PFkg/GUFI4WJAHERcY3xs06k zUA39o0wW5LEMmB0/KsT33LK6KxULrc57kCjkK5LLqHW3feHKFBo7SUX2zAS6ZsvXAxN YGGobWHt5bZUnk4z4PDpGtpD9PErCXIbY/9t9j321oUFJh+C+20eJRcuzi1uFPHnbiWQ 9YQQ3XNd28Gixqz+z958UokAwZEhPL+Fe2czgcizQdngPk19icRi/A8GPyji9hMgfy24 kC58c/m19j2xVx/a4uqyZ3eL66geWmFvCCW5FyjOoNE3zXTYRSkXIxgjGf0EoBloLnb6 az1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sd2/xQdY9Tlg/n5kuubeXzzRgcI2vMHJRe7Zl07dQuY=; b=bZt0U515hMV9Trv0uzxV9Asi2e4rnaruYkaoJjx81wtMi8FAvFt9z8/LKgTqmE2YSM eSpSr2uW4Kyl2X1h0FtQZWK1ogQ29dPSPEGSIPGK5dJeQQL0LGcfnTMNhtVLPP80Kqqm bBs1eoxCIiNN6+fiMxnBJ4x5Z6a1mjwsfpktziaWc63tk8Y2aJjmDb7PXrGRYrrxK8SV UwbEEVDJhz5/WVzR2P3bydPW4ajLMVFh0wVjXoqEdeHNYzTU60WswLZEkv3s072v5zkb hU1Mf6A4LNhAB+xxcP1ZC7NLx6/lyYEuULKLmeF8tpKr8hwG61cHflDPJ6JU9KFeFX+X CAaA== X-Gm-Message-State: AHYfb5j/d/EzTs15Acmb9amUKkooLkI08WwqLKpqiUlsF80vprx6osKn i2fH3Iib6XEsvLOx4yYx9w== X-Received: by 10.99.122.89 with SMTP id j25mr3172603pgn.273.1503503089830; Wed, 23 Aug 2017 08:44:49 -0700 (PDT) Received: from xeon-e3.lan (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id 62sm3666232pfw.34.2017.08.23.08.44.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Aug 2017 08:44:48 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Wed, 23 Aug 2017 08:44:40 -0700 Message-Id: <20170823154445.19494-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170823154445.19494-1-stephen@networkplumber.org> References: <20170823154445.19494-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH 1/6] testpmd: remove unnecessary void casts 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 testpmd was doing old BSD lint style casts of rte_memcpy to (void). This is unnecessary. Signed-off-by: Stephen Hemminger Reviewed-by: Kirill Rybalchenko Acked-by: Jingjing Wu --- app/test-pmd/cmdline.c | 14 +++++++------- app/test-pmd/config.c | 4 ++-- app/test-pmd/testpmd.c | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index cd8c358509c2..5c533ffc0d41 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -6960,7 +6960,7 @@ cmd_set_vf_macvlan_parsed(void *parsed_result, memset(&filter, 0, sizeof(struct rte_eth_mac_filter)); - (void)rte_memcpy(&filter.mac_addr, &res->address, ETHER_ADDR_LEN); + rte_memcpy(&filter.mac_addr, &res->address, ETHER_ADDR_LEN); /* set VF MAC filter */ filter.is_vf = 1; @@ -8823,7 +8823,7 @@ cmd_ethertype_filter_parsed(void *parsed_result, memset(&filter, 0, sizeof(filter)); if (!strcmp(res->mac, "mac_addr")) { filter.flags |= RTE_ETHTYPE_FLAGS_MAC; - (void)rte_memcpy(&filter.mac_addr, &res->mac_addr, + rte_memcpy(&filter.mac_addr, &res->mac_addr, sizeof(struct ether_addr)); } if (!strcmp(res->drop, "drop")) @@ -9012,7 +9012,7 @@ do { \ #define IPV6_ADDR_TO_ARRAY(ip_addr, ip) \ do { \ if ((ip_addr).family == AF_INET6) \ - (void)rte_memcpy(&(ip), \ + rte_memcpy(&(ip), \ &((ip_addr).addr.ipv6), \ sizeof(struct in6_addr)); \ else { \ @@ -9144,12 +9144,12 @@ cmd_flow_director_filter_parsed(void *parsed_result, } if (fdir_conf.mode == RTE_FDIR_MODE_PERFECT_MAC_VLAN) - (void)rte_memcpy(&entry.input.flow.mac_vlan_flow.mac_addr, + rte_memcpy(&entry.input.flow.mac_vlan_flow.mac_addr, &res->mac_addr, sizeof(struct ether_addr)); if (fdir_conf.mode == RTE_FDIR_MODE_PERFECT_TUNNEL) { - (void)rte_memcpy(&entry.input.flow.tunnel_flow.mac_addr, + rte_memcpy(&entry.input.flow.tunnel_flow.mac_addr, &res->mac_addr, sizeof(struct ether_addr)); entry.input.flow.tunnel_flow.tunnel_type = @@ -9158,7 +9158,7 @@ cmd_flow_director_filter_parsed(void *parsed_result, rte_cpu_to_be_32(res->tunnel_id_value); } - (void)rte_memcpy(entry.input.flow_ext.flexbytes, + rte_memcpy(entry.input.flow_ext.flexbytes, flexbytes, RTE_ETH_FDIR_MAX_FLEXLEN); @@ -9856,7 +9856,7 @@ cmd_flow_director_flex_mask_parsed(void *parsed_result, memset(&port->dev_conf.fdir_conf.flex_conf.flex_mask[i], 0, sizeof(struct rte_eth_fdir_flex_mask)); port->dev_conf.fdir_conf.flex_conf.nb_flexmasks = 1; - (void)rte_memcpy(&port->dev_conf.fdir_conf.flex_conf.flex_mask[0], + rte_memcpy(&port->dev_conf.fdir_conf.flex_conf.flex_mask[0], &flex_mask, sizeof(struct rte_eth_fdir_flex_mask)); cmd_reconfig_device_queue(res->port_id, 1, 1); diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 3ae3e1cd8bc9..ca83eef99cb1 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -3004,7 +3004,7 @@ fdir_set_flex_mask(portid_t port_id, struct rte_eth_fdir_flex_mask *cfg) return; } } - (void)rte_memcpy(&flex_conf->flex_mask[idx], + rte_memcpy(&flex_conf->flex_mask[idx], cfg, sizeof(struct rte_eth_fdir_flex_mask)); } @@ -3034,7 +3034,7 @@ fdir_set_flex_payload(portid_t port_id, struct rte_eth_flex_payload_cfg *cfg) return; } } - (void)rte_memcpy(&flex_conf->flex_set[idx], + rte_memcpy(&flex_conf->flex_set[idx], cfg, sizeof(struct rte_eth_flex_payload_cfg)); diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 7d40139416c5..0af34473af3a 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2173,7 +2173,7 @@ init_port_dcb_config(portid_t pid, * Set the numbers of RX & TX queues to 0, so * the RX & TX queues will not be setup. */ - (void)rte_eth_dev_configure(pid, 0, 0, &port_conf); + rte_eth_dev_configure(pid, 0, 0, &port_conf); rte_eth_dev_info_get(pid, &rte_port->dev_info);