DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [PATCH 1/3] ethdev: fix missing cast for C++ compatibility
Date: Wed, 16 Feb 2022 11:01:01 +0000	[thread overview]
Message-ID: <YgzZbScY9l/YoQIj@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <69adf34b-6914-8b54-b35b-c968d72a1b33@intel.com>

On Wed, Feb 16, 2022 at 10:32:43AM +0000, Ferruh Yigit wrote:
> On 2/15/2022 5:30 PM, Bruce Richardson wrote:
> > 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.
> > 
> 
> I remember patches removing explicit "void *" cast, in the past,
> 
> to document, is the rule as following:
> - public and sdk headers should support c++, hence these files
>   must have explicit "void *" cast
> - .c files should NOT have explicit "void *" cast
> 
That would be my understanding yes. It's annoying they conflict, so I would
suggest softening the second rule to allow casts to be present. Thankfully
with chkincs support we should be able to detect violations of rule #1,
which is the more important of the two.

/Bruce

  reply	other threads:[~2022-02-16 11:01 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 ` [PATCH 1/3] ethdev: fix missing cast for C++ compatibility Bruce Richardson
2022-02-16 10:32   ` Ferruh Yigit
2022-02-16 11:01     ` Bruce Richardson [this message]
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=YgzZbScY9l/YoQIj@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stephen@networkplumber.org \
    --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).