Re: [PATCH] mm/mseal: use min/max in mseal_apply

From: David Laight

Date: Mon May 04 2026 - 08:36:57 EST


On Sun, 3 May 2026 21:58:57 +0100
Pedro Falcato <pfalcato@xxxxxxx> wrote:

> On Sun, May 03, 2026 at 01:59:16PM +0200, Thorsten Blum wrote:
> > Use the type-checked min()/max() macros instead of MIN()/MAX(), which
> > are supposed to be used "for obvious constants only".
>
> Gotta love these macros... FYI this isn't the only wrong usage in the kernel.

I failed to persuade Linus to include a test for __builtin_constant_p((a)|(b)) :-)

-- David

>
> >
> > Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
>
> Reviewed-by: Pedro Falcato <pfalcato@xxxxxxx>
>