Re: [PATCH 07/22] x86/srso: Remove default case in srso_select_mitigation()
From: Borislav Petkov
Date: Wed Aug 23 2023 - 02:18:22 EST
On Sun, Aug 20, 2023 at 06:19:04PM -0700, Josh Poimboeuf wrote:
> Remove the default case so a compiler warning gets printed
There are other similar cases in this file. We should make it an
explicit rule that this file - being special and security-sensitive and
all - should handle all switch cases explicitly so that it is obvious
what gets selected and that people think about every possible option
when doing a switch-case.
> if we forget one of the enums.
No "we" please - make that passive voice.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette