Patch "perf intel-pt: Use __fallthrough" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
perf intel-pt: Use __fallthrough
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
perf-intel-pt-use-__fallthrough.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
7ea6856d6f5629d742edc23b8b76e6263371ef45Mon Sep 17 00:00:00 2001
From: Arnaldo Carvalho de Melo <[email protected]>
Date: Thu, 9 Feb 2017 15:22:22 -0300
Subject: perf intel-pt: Use __fallthrough
From: Arnaldo Carvalho de Melo <[email protected]>
commit 7ea6856d6f5629d742edc23b8b76e6263371ef45 upstream.
To address new warnings emmited by gcc 7, e.g.::
CC /tmp/build/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.o
CC /tmp/build/perf/tests/parse-events.o
util/intel-pt-decoder/intel-pt-pkt-decoder.c: In function 'intel_pt_pkt_desc':
util/intel-pt-decoder/intel-pt-pkt-decoder.c:499:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
if (!(packet->count))
^
util/intel-pt-decoder/intel-pt-pkt-decoder.c:501:2: note: here
case INTEL_PT_CYC:
^~~~
CC /tmp/build/perf/util/intel-pt-decoder/intel-pt-decoder.occ1: all warnings being treated as errors
--- tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 5 +++++ tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c | 2 ++ 2 files changed, 7 insertions(+)
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c +5 -0
@@ -22,6 +22,7 @@#include <errno.h> #include <stdint.h> #include <inttypes.h> +#include <linux/compiler.h> #include "../cache.h" #include "../util.h"
@@ -1708,6 +1709,7 @@ static int intel_pt_walk_psb(struct inteswitch (decoder->packet.type) {case INTEL_PT_TIP_PGD : decoder->continuous_period = false; + __fallthrough;case INTEL_PT_TIP_PGE :case INTEL_PT_TIP :intel_pt_log ("ERROR: Unexpected packet\n" );
@@ -1762,6 +1764,8 @@ static int intel_pt_walk_psb(struct inte decoder->pge = false; decoder->continuous_period = false;intel_pt_clear_tx_flags (decoder); + __fallthrough; +case INTEL_PT_TNT : decoder->have_tma = false;intel_pt_log ("ERROR: Unexpected packet\n" );
@@ -1802,6 +1806,7 @@ static int intel_pt_walk_to_ip(struct inswitch (decoder->packet.type) {case INTEL_PT_TIP_PGD : decoder->continuous_period = false; + __fallthrough;case INTEL_PT_TIP_PGE :case INTEL_PT_TIP : decoder->pge = decoder->packet.type !=INTEL_PT_TIP_PGD ;
tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c +2 -0
@@ -17,6 +17,7 @@#include <string.h> #include <endian.h> #include <byteswap.h> +#include <linux/compiler.h> #include "intel-pt-pkt-decoder.h"
@@ -488,6 +489,7 @@ int intel_pt_pkt_desc(const struct intelcase INTEL_PT_FUP :if (!(packet->count))return snprintf (buf, buf_len,"%s no ip" , name); + __fallthrough;case INTEL_PT_CYC :case INTEL_PT_VMCS :case INTEL_PT_MTC :
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/perf-tools-use-readdir-instead-of-deprecated-readdir_r.patch queue-4.4/perf-thread_map-correctly-size-buffer-used-with-dirent-dt_name.patch queue-4.4/perf-tests-remove-wrong-semicolon-in-while-loop-in-cqm-test.patch queue-4.4/perf-annotate-browser-fix-behaviour-of-shift-tab-with-nothing-focussed.patch queue-4.4/perf-tests-avoid-possible-truncation-with-dirent-d_name-snprintf.patch queue-4.4/perf-top-use-__fallthrough.patch queue-4.4/perf-scripting-perl-fix-compile-error-with-some-perl5-versions.patch queue-4.4/perf-bench-numa-avoid-possible-truncation-when-using-snprintf.patch queue-4.4/perf-tools-use-readdir-instead-of-deprecated-readdir_r-again.patch queue-4.4/perf-thread_map-use-readdir-instead-of-deprecated-readdir_r.patch queue-4.4/perf-tools-remove-duplicate-const-qualifier.patch queue-4.4/tools-string-use-__fallthrough-in-perf_atoll.patch queue-4.4/perf-intel-pt-use-__fallthrough.patch queue-4.4/perf-script-use-readdir-instead-of-deprecated-readdir_r.patch queue-4.4/tools-include-add-a-__fallthrough-statement.patch queue-4.4/tools-strfilter-use-__fallthrough.patch queue-4.4/perf-dwarf-guard-x86_64-definitions-under-ifdef-else-clause.patch queue-4.4/perf-pmu-fix-misleadingly-indented-assignment-whitespace.patch queue-4.4/perf-trace-do-not-process-perf_record_lost-twice.patch