DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: [PATCH 1/3] ethdev: fix missing cast for C++ compatibility
Date: Tue, 15 Feb 2022 17:30:27 +0000	[thread overview]
Message-ID: <20220215173029.1893710-2-bruce.richardson@intel.com> (raw)
In-Reply-To: <20220215173029.1893710-1-bruce.richardson@intel.com>

C++ does not allow implicit conversion to/from void*, so we need an
explicit cast to allow the driver sdk header to be included from C++
code.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/ethdev/ethdev_pci.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/ethdev/ethdev_pci.h b/lib/ethdev/ethdev_pci.h
index 71aa4b2e98..d2bc3fe5e0 100644
--- a/lib/ethdev/ethdev_pci.h
+++ b/lib/ethdev/ethdev_pci.h
@@ -46,8 +46,9 @@ rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev,
 }
 
 static inline int
-eth_dev_pci_specific_init(struct rte_eth_dev *eth_dev, void *bus_device) {
-	struct rte_pci_device *pci_dev = bus_device;
+eth_dev_pci_specific_init(struct rte_eth_dev *eth_dev, void *bus_device)
+{
+	struct rte_pci_device *pci_dev = (struct rte_pci_device *)bus_device;
 
 	if (!pci_dev)
 		return -ENODEV;
-- 
2.32.0


  reply	other threads:[~2022-02-15 17:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 17:30 [PATCH 0/3] extend C++ compatibility checks Bruce Richardson
2022-02-15 17:30 ` Bruce Richardson [this message]
2022-02-16 10:32   ` [PATCH 1/3] ethdev: fix missing cast for C++ compatibility Ferruh Yigit
2022-02-16 11:01     ` Bruce Richardson
2022-02-15 17:30 ` [PATCH 2/3] buildtools/chkincs: check sdk headers " Bruce Richardson
2022-02-15 17:30 ` [PATCH 3/3] buildtools/chkincs: add checks for missing C++ guards Bruce Richardson
2022-02-17  8:06 ` [PATCH 0/3] extend C++ compatibility checks Tyler Retzlaff
2022-02-22 14:21   ` Thomas Monjalon

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=20220215173029.1893710-2-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=thomas@monjalon.net \
    /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).