DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Tyler Retzlaff <roretzla@linux.microsoft.com>, dev@dpdk.org
Cc: david.hunt@intel.com
Subject: Re: [dpdk-dev] [PATCH] eal, power: don't use '-' sign with unsigned literals
Date: Fri, 12 Mar 2021 12:51:46 +0000	[thread overview]
Message-ID: <9ab8e965-b2ec-d554-d167-e3ed62ed62de@intel.com> (raw)
In-Reply-To: <1615333490-15243-1-git-send-email-roretzla@linux.microsoft.com>

On 09-Mar-21 11:44 PM, Tyler Retzlaff wrote:
> use ~0ULL instead of -1ULL to avoid contridctory application of '-' sign
> to integer literal where the desired type is unsigned.
> 
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---

Not sure i agree. It's a very common pattern and is widely used and 
understood. I mean, if anything, seeing `~0` would have me stop and 
think as i've literally never seen such code before.

-- 
Thanks,
Anatoly

  reply	other threads:[~2021-03-12 12:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 23:44 Tyler Retzlaff
2021-03-12 12:51 ` Burakov, Anatoly [this message]
2021-03-12 17:05   ` Tyler Retzlaff
2021-03-12 17:37     ` Bruce Richardson
2021-03-12 18:36       ` Tyler Retzlaff
2021-03-12 18:40         ` Tyler Retzlaff
2021-03-13  9:05           ` Morten Brørup
2021-03-15 15:36 ` [dpdk-dev] [PATCH v2] eal, power: use UINT64_MAX instead of -1ULL Tyler Retzlaff
2021-03-16  0:13 ` [dpdk-dev] [PATCH v3] eal, power: use UINT64_MAX and UINT32_MAX Tyler Retzlaff
2021-03-16 11:06   ` Morten Brørup
2021-04-01 11:22   ` Burakov, Anatoly
2021-04-19  9:43     ` 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=9ab8e965-b2ec-d554-d167-e3ed62ed62de@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=roretzla@linux.microsoft.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 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).