Re: [PATCH 3/3] x86/mm: Cleanup prctl_enable_tagged_addr() nr_bits error checking

From: Kirill A. Shutemov
Date: Tue Mar 12 2024 - 08:36:30 EST


On Tue, Mar 12, 2024 at 03:59:51AM +0000, Yosry Ahmed wrote:
> There are two separate checks in prctl_enable_tagged_addr() that nr_bits
> is in the correct range. The checks are arranged such the correct case
> is sandwiched between both error cases, which do exactly the same thing.
>
> Simplify the if condition and pull the correct case outside with the
> rest of the success code path.
>
> Signed-off-by: Yosry Ahmed <yosryahmed@xxxxxxxxxx>

Reviewed-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>

--
Kiryl Shutsemau / Kirill A. Shutemov