DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [dpdk-dev] [PATCH 01/12] net/atlantic: remove unnecessary cast
Date: Wed, 29 May 2019 12:14:50 -0700	[thread overview]
Message-ID: <20190529191501.19053-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20190529191501.19053-1-stephen@networkplumber.org>

The device private pointer (dev_private) is of type void *
therefore no cast is necessary in C.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/atlantic/atl_ethdev.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index d110e351ec03..fdc0a7f2db96 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -371,8 +371,7 @@ atl_disable_intr(struct aq_hw_s *hw)
 static int
 eth_atl_dev_init(struct rte_eth_dev *eth_dev)
 {
-	struct atl_adapter *adapter =
-		(struct atl_adapter *)eth_dev->data->dev_private;
+	struct atl_adapter *adapter = eth_dev->data->dev_private;
 	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
 	struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
 	struct aq_hw_s *hw = ATL_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
@@ -1015,8 +1014,7 @@ static int
 atl_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
 		   unsigned int n)
 {
-	struct atl_adapter *adapter =
-	(struct atl_adapter *)dev->data->dev_private;
+	struct atl_adapter *adapter = dev->data->dev_private;
 	struct aq_hw_s *hw = &adapter->hw;
 	struct get_stats req = { 0 };
 	struct macsec_msg_fw_request msg = { 0 };
@@ -1352,8 +1350,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev,
 {
 	struct atl_interrupt *intr =
 		ATL_DEV_PRIVATE_TO_INTR(dev->data->dev_private);
-	struct atl_adapter *adapter =
-		(struct atl_adapter *)dev->data->dev_private;
+	struct atl_adapter *adapter = dev->data->dev_private;
 	struct aq_hw_s *hw = &adapter->hw;
 
 	if (!(intr->flags & ATL_FLAG_NEED_LINK_UPDATE))
-- 
2.20.1


  reply	other threads:[~2019-05-29 19:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29 19:14 [dpdk-dev] [PATCH 00/12] cleanup useless casts of void * Stephen Hemminger
2019-05-29 19:14 ` Stephen Hemminger [this message]
2019-05-29 19:14 ` [dpdk-dev] [PATCH 02/12] net/ark: remove unnecessary cast Stephen Hemminger
2019-05-29 19:14 ` [dpdk-dev] [PATCH 03/12] net/axgbe: " Stephen Hemminger
2019-05-29 19:14 ` [dpdk-dev] [PATCH 04/12] net/bnxt: " Stephen Hemminger
2019-06-04 13:27   ` Lance Richardson
2019-05-29 19:14 ` [dpdk-dev] [PATCH 05/12] net/bonding: " Stephen Hemminger
2019-05-29 19:14 ` [dpdk-dev] [PATCH 06/12] net/cxgbe: " Stephen Hemminger
2019-05-29 19:14 ` [dpdk-dev] [PATCH 07/12] net/e1000: remove unnecessary cast of void * Stephen Hemminger
2019-05-29 19:14 ` [dpdk-dev] [PATCH 08/12] net/ena: remove unnecessary cast Stephen Hemminger
2019-06-05 14:28   ` Ferruh Yigit
2019-05-29 19:14 ` [dpdk-dev] [PATCH 09/12] net/enic: " Stephen Hemminger
2019-05-29 19:14 ` [dpdk-dev] [PATCH 10/12] net/i40e: " Stephen Hemminger
2019-05-29 19:15 ` [dpdk-dev] [PATCH 11/12] net/ixgbe: " Stephen Hemminger
2019-06-05 14:28   ` Ferruh Yigit
2019-05-29 19:15 ` [dpdk-dev] [PATCH 12/12] net/mlx5: " Stephen Hemminger
2019-06-05 14:28 ` [dpdk-dev] [PATCH 00/12] cleanup useless casts of void * 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=20190529191501.19053-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).