mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Borislav Petkov <bp@alien8.de>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org, Oleg Nesterov <oleg@redhat.com>,
	"Gustavo A. R. Silva" <kernel.org@embeddedor>
Subject: Re: [PATCH] x86: Use fallthrough pseudo-keyword
Date: Mon, 17 Aug 2020 07:23:05 -0700	[thread overview]
Message-ID: <fafab4f8754a924a97e2115fbd95085dbf918a9b.camel@perches.com> (raw)
In-Reply-To: <20200817130227.GI549@zn.tnic>

On Mon, 2020-08-17 at 15:02 +0200, Borislav Petkov wrote:
> 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?

consecutive case labels do not need one.



  reply	other threads:[~2020-08-17 14:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07 20:03 Gustavo A. R. Silva
2020-08-17 13:02 ` Borislav Petkov
2020-08-17 14:23   ` Joe Perches [this message]
2020-08-17 14:39     ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fafab4f8754a924a97e2115fbd95085dbf918a9b.camel@perches.com \
    --to=joe@perches.com \
    --cc=bp@alien8.de \
    --cc=gustavoars@kernel.org \
    --cc=hpa@zytor.com \
    --cc=kernel.org@embeddedor \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=oleg@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®