Re: [PATCH] x86: Use fallthrough pseudo-keyword

From: Borislav Petkov
Date: Mon Aug 17 2020 - 09:01:41 EST


On Tue, Jul 07, 2020 at 03:03:03PM -0500, Gustavo A. R. Silva wrote:
> Replace the existing /* fall through */ comments and its variants with
> the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
> fall-through markings when it is the case.
>
> [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

...

> @@ -362,7 +361,6 @@ static short get_segment_selector(struct pt_regs *regs, int seg_reg_idx)
> case INAT_SEG_REG_GS:
> return vm86regs->gs;
> case INAT_SEG_REG_IGNORE:
> - /* fall through */
> default:
> return -EINVAL;
> }
> @@ -386,7 +384,6 @@ static short get_segment_selector(struct pt_regs *regs, int seg_reg_idx)
> */
> return get_user_gs(regs);
> case INAT_SEG_REG_IGNORE:
> - /* fall through */
> default:
> return -EINVAL;
> }

What's the logic for those two to not get a fallthrough; marker?

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette