All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH 1/6] testpmd: remove unnecessary void casts
Date: Wed, 23 Aug 2017 08:44:40 -0700	[thread overview]
Message-ID: <20170823154445.19494-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20170823154445.19494-1-stephen@networkplumber.org>

The testpmd was doing old BSD lint style casts of rte_memcpy
to (void). This is unnecessary.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 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);
 
-- 
2.11.0

  reply	other threads:[~2017-08-23 15:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23 15:44 [PATCH 0/6] remove unncessary void cast Stephen Hemminger
2017-08-23 15:44 ` Stephen Hemminger [this message]
2017-09-04 11:39   ` [PATCH 1/6] testpmd: remove unnecessary void casts Rybalchenko, Kirill
2017-09-07  8:36   ` Wu, Jingjing
2017-09-11 12:44   ` Ferruh Yigit
2017-08-23 15:44 ` [PATCH 2/6] bnx2x: remove unnecssary void cast of rte_memcpy Stephen Hemminger
2017-09-04 11:50   ` Rybalchenko, Kirill
2017-08-23 15:44 ` [PATCH 3/6] sfc: remove unnecessary " Stephen Hemminger
2017-09-04 12:39   ` Rybalchenko, Kirill
2017-08-23 15:44 ` [PATCH 4/6] e1000: " Stephen Hemminger
2017-09-04 12:40   ` Rybalchenko, Kirill
2017-08-23 15:44 ` [PATCH 5/6] i40e: " Stephen Hemminger
2017-09-04 12:45   ` Rybalchenko, Kirill
2017-09-09  3:24   ` Wu, Jingjing
2017-08-23 15:44 ` [PATCH 6/6] ixgbe: " Stephen Hemminger
2017-09-04 12:49   ` Rybalchenko, Kirill
2017-09-11 12:44 ` [PATCH 0/6] remove unncessary void cast Ferruh Yigit
2017-09-11 13:32   ` Ferruh Yigit
2017-09-11 13:00 ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170823154445.19494-2-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.