[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250222091128.5429f1c2@pumpkin>
Date: Sat, 22 Feb 2025 09:11:28 +0000
From: David Laight <david.laight.linux@...il.com>
To: I Hsin Cheng <richard120310@...il.com>
Cc: yury.norov@...il.com, anshuman.khandual@....com, arnd@...db.de,
linux-kernel@...r.kernel.org, jserv@...s.ncku.edu.tw,
skhan@...uxfoundation.org, mka@...omium.org, akpm@...ux-foundation.org
Subject: Re: [PATCH v2] uapi: Revert "bitops: avoid integer overflow in
GENMASK(_ULL)"
On Fri, 21 Feb 2025 15:41:49 +0800
I Hsin Cheng <richard120310@...il.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
Powered by blists - more mailing lists