public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "tip-bot for Gustavo A. R. Silva" <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
	mingo@redhat.com, peterz@infradead.org, keescook@chromium.org,
	hpa@zytor.com, x86@kernel.org, gustavo@embeddedor.com,
	qianyue.zj@alibaba-inc.com, jacek.tomaka@poczta.fm,
	jolsa@kernel.org, ak@linux.intel.com, mingo@kernel.org,
	bp@suse.de, kan.liang@linux.intel.com
Subject: [tip:x86/cleanups] x86/events: Mark expected switch-case fall-throughs
Date: Tue, 29 Jan 2019 07:27:57 -0800	[thread overview]
Message-ID: <tip-2b0fc3742bc77687f58d389c902ee092df6f8669@git.kernel.org> (raw)
In-Reply-To: <20190125184917.GA7289@embeddedor>

Commit-ID:  2b0fc3742bc77687f58d389c902ee092df6f8669
Gitweb:     https://git.kernel.org/tip/2b0fc3742bc77687f58d389c902ee092df6f8669
Author:     Gustavo A. R. Silva <gustavo@embeddedor.com>
AuthorDate: Fri, 25 Jan 2019 12:49:17 -0600
Committer:  Borislav Petkov <bp@suse.de>
CommitDate: Tue, 29 Jan 2019 16:23:47 +0100

x86/events: Mark expected switch-case fall-throughs

In preparation to enable -Wimplicit-fallthrough by default, mark
switch-case statements where fall-through is intentional, explicitly in
order to fix a couple of -Wimplicit-fallthrough warnings.

Warning level 3 was used: -Wimplicit-fallthrough=3.

 [ bp: Massasge and trim commit message. ]

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jacek Tomaka <jacek.tomaka@poczta.fm>
Cc: Jia Zhang <qianyue.zj@alibaba-inc.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20190125184917.GA7289@embeddedor
---
 arch/x86/events/intel/core.c | 2 ++
 arch/x86/events/intel/lbr.c  | 1 +
 2 files changed, 3 insertions(+)

diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index 40e12cfc87f6..ece43e7e4569 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -4168,6 +4168,8 @@ __init int intel_pmu_init(void)
 
 	case INTEL_FAM6_CORE2_MEROM:
 		x86_add_quirk(intel_clovertown_quirk);
+		/* fall through */
+
 	case INTEL_FAM6_CORE2_MEROM_L:
 	case INTEL_FAM6_CORE2_PENRYN:
 	case INTEL_FAM6_CORE2_DUNNINGTON:
diff --git a/arch/x86/events/intel/lbr.c b/arch/x86/events/intel/lbr.c
index c88ed39582a1..580c1b91c454 100644
--- a/arch/x86/events/intel/lbr.c
+++ b/arch/x86/events/intel/lbr.c
@@ -931,6 +931,7 @@ static int branch_type(unsigned long from, unsigned long to, int abort)
 			ret = X86_BR_ZERO_CALL;
 			break;
 		}
+		/* fall through */
 	case 0x9a: /* call far absolute */
 		ret = X86_BR_CALL;
 		break;

      parent reply	other threads:[~2019-01-29 15:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25 18:49 [PATCH] x86/events: Mark expected switch fall-throughs Gustavo A. R. Silva
2019-01-29 15:25 ` Borislav Petkov
2019-01-29 15:58   ` Gustavo A. R. Silva
2019-01-29 16:07     ` Borislav Petkov
2019-01-29 16:19       ` Gustavo A. R. Silva
2019-01-29 17:04         ` Borislav Petkov
2019-01-29 17:09           ` Gustavo A. R. Silva
2019-01-29 15:27 ` tip-bot for Gustavo A. R. Silva [this message]

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=tip-2b0fc3742bc77687f58d389c902ee092df6f8669@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=ak@linux.intel.com \
    --cc=bp@suse.de \
    --cc=gustavo@embeddedor.com \
    --cc=hpa@zytor.com \
    --cc=jacek.tomaka@poczta.fm \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=qianyue.zj@alibaba-inc.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