Re: [PATCH next 01/14] overflow: Reduce expansion of __type_max()
From: Kees Cook
Date: Wed Jan 21 2026 - 16:12:14 EST
On Wed, Jan 21, 2026 at 02:57:18PM +0000, david.laight.linux@xxxxxxxxx wrote:
> From: David Laight <david.laight.linux@xxxxxxxxx>
>
> Change '(x - 1) + x' to '2 * (x - 1) + 1' to avoid expanding the
> non-trivial __type_half_max() twice.
>
> Signed-off-by: David Laight <david.laight.linux@xxxxxxxxx>
Sure!
Reviewed-by: Kees Cook <kees@xxxxxxxxxx>
--
Kees Cook