All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: "Chen, Jing D" <jing.d.chen@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Jerin Jacob <jerin.jacob@caviumnetworks.com>,
	"Liang, Cunming" <cunming.liang@intel.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	Thomas Monjalon <thomas.monjalon@6wind.com>
Subject: Re: [PATCH v3] net: fix build error with clang
Date: Wed, 28 Sep 2016 08:09:08 +0800	[thread overview]
Message-ID: <20160928000908.GB1597@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <4341B239C0EFF9468EE453F9E9F4604D3A384822@shsmsx102.ccr.corp.intel.com>

On Tue, Sep 27, 2016 at 05:24:35PM +0000, Chen, Jing D wrote:
> > On Mon, Sep 26, 2016 at 12:29:13PM +0800, Yuanhan Liu wrote:
> > > Interestingly, clang and gcc has different prototype for _mm_prefetch().
> > > For gcc, we have
> > >
> > >    _mm_prefetch (const void *__P, enum _mm_hint __I)
> > >
> > > While for clang, it's
> > >
> > >    #define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0,
> > > (sel)))
> > >
> > > That's how the following error comes with clang:
> > >
> > >    error: cast from 'const void *' to 'void *' drops const qualifier
> > >    [-Werror,-Wcast-qual]
> > >            _mm_prefetch((const void *)rused, _MM_HINT_T0);
> > >    /usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include/xmmintrin.h:684:58:
> > >    note: expanded from macro '_mm_prefetch'
> > >             #define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a),
> > >                                           0, (sel)))
> > >
> > > What's weird is that the build was actaully Okay before. I met it
> > > while apply Jerin's vector support for ARM patch set: he just move
> > > this peiece of code to another file, nothing else changed.
> > >
> > > This patch fix the issue when Jerin's patchset is applied. Thus, I
> > > think it's still needed.
> > >
> > > Similarly, make the same change to other _mm_prefetch users, just in
> > > case this weird issue shows up again somehow later.
...
> > > Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> Acked-by: Jing Chen <jing.d.chen@intel.com>

Mark, thank you!

Applied to dpdk-next-virtio.

	--yliu

      reply	other threads:[~2016-09-28  0:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-23  7:40 [PATCH] net/virtio: fix build error with clang Yuanhan Liu
2016-09-23  6:11 ` Yuanhan Liu
2016-09-23  6:15 ` [PATCH v2] " Yuanhan Liu
2016-09-23  6:35   ` Jerin Jacob
2016-09-23  6:43     ` Yuanhan Liu
2016-09-23  8:31   ` Thomas Monjalon
2016-09-23  9:17     ` Yuanhan Liu
2016-09-26  4:29   ` [PATCH v3] net: " Yuanhan Liu
2016-09-27 12:19     ` Yuanhan Liu
2016-09-27 17:24       ` Chen, Jing D
2016-09-28  0:09         ` Yuanhan Liu [this message]

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=20160928000908.GB1597@yliu-dev.sh.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=cunming.liang@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=jing.d.chen@intel.com \
    --cc=thomas.monjalon@6wind.com \
    /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.