]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/cpu: Use max() for CPUID leaf 0x2 TLB descriptors parsing
authorAhmed S. Darwish <darwi@linutronix.de>
Tue, 4 Mar 2025 08:51:17 +0000 (09:51 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 4 Mar 2025 10:17:33 +0000 (11:17 +0100)
commitcb5f4c76b2a9314c35e00c67c98ccd03542c2634
treed39dbd13664498f328b833afc159d094cd97db4c
parentdec7fdc0b79c2ae0a537343b17f5ba1c6c47e1ca
x86/cpu: Use max() for CPUID leaf 0x2 TLB descriptors parsing

The conditional statement "if (x < y) { x = y; }" appears 22 times at
the Intel leaf 0x2 descriptors parsing logic.

Replace each of such instances with a max() expression to simplify
the code.

Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20250304085152.51092-7-darwi@linutronix.de
arch/x86/kernel/cpu/intel.c