From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Alexey Dobriyan <adobriyan@gmail.com>, akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, jani.nikula@linux.intel.com,
joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com,
intel-gfx@lists.freedesktop.org, rostedt@goodmis.org,
mingo@redhat.com
Subject: Re: [PATCH] Make is_signed_type() simpler
Date: Sun, 29 Sep 2019 22:21:48 +0200 [thread overview]
Message-ID: <f99ca43d-1ba2-95fb-b90f-6706a06f8ce6@rasmusvillemoes.dk> (raw)
In-Reply-To: <20190929200619.GA12851@avx2>
On 29/09/2019 22.06, Alexey Dobriyan wrote:
> * Simply compare -1 with 0,
> * Drop unnecessary parenthesis sets
>
> -#define is_signed_type(type) (((type)(-1)) < (type)1)
> +#define is_signed_type(type) ((type)-1 < 0)
NAK. I wrote it that way to avoid -Wtautological-compare when type is
unsigned.
Rasmus
next prev parent reply other threads:[~2019-09-29 20:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-29 20:06 [PATCH] Make is_signed_type() simpler Alexey Dobriyan
2019-09-29 20:15 ` Steven Rostedt
2019-09-29 20:44 ` Alexey Dobriyan
2019-09-29 21:16 ` Steven Rostedt
2019-09-29 20:21 ` Rasmus Villemoes [this message]
2019-09-29 21:09 ` Alexey Dobriyan
2019-09-30 6:16 ` Rasmus Villemoes
2019-09-30 18:34 ` [Intel-gfx] " Ruhl, Michael J
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=f99ca43d-1ba2-95fb-b90f-6706a06f8ce6@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rodrigo.vivi@intel.com \
--cc=rostedt@goodmis.org \
/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).