DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: "Morten Brørup" <mb@smartsharesystems.com>
Cc: <thomas@monjalon.net>, <david.marchand@redhat.com>, <dev@dpdk.org>
Subject: Re: [PATCH v3] eal: Pointer alignment check improvements
Date: Fri, 23 Sep 2022 09:24:03 +0100	[thread overview]
Message-ID: <Yy1tI8IqMpwB3RhK@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D87351@smartserver.smartshare.dk>

On Thu, Sep 22, 2022 at 10:54:38PM +0200, Morten Brørup wrote:
> > From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> > Sent: Thursday, 22 September 2022 15.39
> > 
> > On Thu, Sep 22, 2022 at 03:27:30PM +0200, Morten Brørup wrote:
> > > Checking a const pointer for alignment would emit a warning about the
> > > const qualifier being discarded.
> > >
> > > No need to calculate the aligned pointer; just check the last bits of
> > the
> > > pointer.
> > >
> > > v3:
> > > - Make the uintptr_t const to avoid potential future warnings.
> > (Bruce)
> > > v2:
> > > - Remove compiler attribute ((const)) from function;
> > >   it was a coding style issue.
> > >
> > > Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
> > 
> > Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> > 
> > Or perhaps it should be "Const-acked-by: ... " :-)
> 
> Unfortunately not as const as expected by both of us...
> 
> The v3 build fails at github [1] with:
> 
> ../lib/eal/include/rte_common.h: In function 'int rte_is_aligned(const void*, unsigned int)':
> ../lib/eal/include/rte_common.h:409:27: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]
>   409 |  return ((const uintptr_t)ptr & (align - 1)) == 0;
>       |                           ^~~
> 
> [1] http://mails.dpdk.org/archives/test-report/2022-September/308604.html
> 
> I don't understand what the problem is, so my solution is omitting the const, i.e. rolling back to v2, which doesn't fail building. Unless you can suggest a better solution, Bruce?
> 
> I have changed v2 status in Patchwork back to New and v3 to Superseded.
>
That is fine. I'll ack v2 so.

  reply	other threads:[~2022-09-23  8:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 14:28 [PATCH] " Morten Brørup
2022-09-22 11:44 ` [PATCH v2] " Morten Brørup
2022-09-22 11:52   ` Bruce Richardson
2022-09-22 11:59     ` Bruce Richardson
2022-09-22 13:00       ` Morten Brørup
2022-09-22 13:27         ` [PATCH v3] " Morten Brørup
2022-09-22 13:38           ` Bruce Richardson
2022-09-22 20:54             ` Morten Brørup
2022-09-23  8:24               ` Bruce Richardson [this message]
2022-09-23  8:25   ` [PATCH v2] " Bruce Richardson
2022-09-30  8:38     ` David Marchand

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=Yy1tI8IqMpwB3RhK@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=mb@smartsharesystems.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).