From: David Laight <david.laight.linux@gmail.com>
To: I Hsin Cheng <richard120310@gmail.com>
Cc: yury.norov@gmail.com, anshuman.khandual@arm.com, arnd@arndb.de,
linux-kernel@vger.kernel.org, jserv@ccns.ncku.edu.tw,
skhan@linuxfoundation.org, mka@chromium.org,
akpm@linux-foundation.org
Subject: Re: [PATCH v2] uapi: Revert "bitops: avoid integer overflow in GENMASK(_ULL)"
Date: Sat, 22 Feb 2025 09:11:28 +0000 [thread overview]
Message-ID: <20250222091128.5429f1c2@pumpkin> (raw)
In-Reply-To: <20250221074208.832153-1-richard120310@gmail.com>
On Fri, 21 Feb 2025 15:41:49 +0800
I Hsin Cheng <richard120310@gmail.com> wrote:
> This patch reverts 'commit c32ee3d9abd2("bitops: avoid integer overflow in
> GENMASK(_ULL)")'.
>
> The code generation can be shrink by over 1k by reverting the commit.
While you are setup for testing this (and me being lazy) does changing
the definition to be:
(2u << hi) - (1u << lo)
make it any smaller.
(A summary of the size summary would do, no point listing lots of '-1')
That can also be written:
((one + one) << hi) - (one << lo)
so an appropriately typed 'one' (1, 1u, 1ul, 1ull, (__uint128)1 etc) can
be passed.
David
next prev parent reply other threads:[~2025-02-22 9:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-21 7:41 [PATCH v2] uapi: Revert "bitops: avoid integer overflow in GENMASK(_ULL)" I Hsin Cheng
2025-02-21 17:00 ` I Hsin Cheng
2025-02-21 17:48 ` I Hsin Cheng
2025-02-21 19:03 ` Yury Norov
2025-02-23 18:59 ` I Hsin Cheng
2025-02-21 18:58 ` Yury Norov
2025-02-22 9:11 ` David Laight [this message]
2025-02-23 19:02 ` I Hsin Cheng
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=20250222091128.5429f1c2@pumpkin \
--to=david.laight.linux@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=arnd@arndb.de \
--cc=jserv@ccns.ncku.edu.tw \
--cc=linux-kernel@vger.kernel.org \
--cc=mka@chromium.org \
--cc=richard120310@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=yury.norov@gmail.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