From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753030AbbF2L16 (ORCPT ); Mon, 29 Jun 2015 07:27:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57036 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752451AbbF2L1w (ORCPT ); Mon, 29 Jun 2015 07:27:52 -0400 Date: Mon, 29 Jun 2015 13:27:45 +0200 From: Jiri Olsa To: Adrian Hunter Cc: Jiri Olsa , Arnaldo Carvalho de Melo , Kan Liang , lkml , David Ahern , Ingo Molnar , Namhyung Kim , Peter Zijlstra Subject: [PATCHv2 perf/core] perf tools: Add missing break for PERF_RECORD_ITRACE_START Message-ID: <20150629112745.GA21507@krava.brq.redhat.com> References: <1435576340-19346-1-git-send-email-jolsa@kernel.org> <5591293E.80308@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5591293E.80308@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 29, 2015 at 02:17:18PM +0300, Adrian Hunter wrote: > On 29/06/15 14:12, Jiri Olsa wrote: > > Missing switch break since introduction of new event: > > c4937a91ea56 perf tools: handle PERF_RECORD_LOST_SAMPLES > > > > Cc: Kan Liang > > Cc: Adrian Hunter > > Link: http://lkml.kernel.org/n/tip-e3gbrp2561x2s9tkqvf2wh9n@git.kernel.org > > Signed-off-by: Jiri Olsa > > --- > > tools/perf/util/machine.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c > > index 4744673aff1b..a08e38339cac 100644 > > --- a/tools/perf/util/machine.c > > +++ b/tools/perf/util/machine.c > > @@ -1448,7 +1448,7 @@ int machine__process_event(struct machine *machine, union perf_event *event, > > case PERF_RECORD_AUX: > > ret = machine__process_aux_event(machine, event); break; > > case PERF_RECORD_ITRACE_START: > > - ret = machine__process_itrace_start_event(machine, event); > > + ret = machine__process_itrace_start_event(machine, event); break; > > case PERF_RECORD_LOST_SAMPLES: > > ret = machine__process_lost_samples_event(machine, event, sample); break; > > break; > > But now you have break; break; hum, I did not see the PERF_RECORD_LOST_SAMPLES has 2 breaks already, anyway the one for PERF_RECORD_ITRACE_START is missing > Isn't putting 'break' on the end of the line making things harder to read? I guess, but looks like we dont have firm style in this.. attaching v2 with the extra break removal thanks, jirka --- Missing switch break since introduction of new event: c4937a91ea56 perf tools: handle PERF_RECORD_LOST_SAMPLES Also removing unneeded break for PERF_RECORD_LOST_SAMPLES. Cc: Kan Liang Cc: Adrian Hunter Link: http://lkml.kernel.org/n/tip-e3gbrp2561x2s9tkqvf2wh9n@git.kernel.org Signed-off-by: Jiri Olsa --- tools/perf/util/machine.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index 4744673aff1b..7ff682770fdb 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -1448,10 +1448,9 @@ int machine__process_event(struct machine *machine, union perf_event *event, case PERF_RECORD_AUX: ret = machine__process_aux_event(machine, event); break; case PERF_RECORD_ITRACE_START: - ret = machine__process_itrace_start_event(machine, event); + ret = machine__process_itrace_start_event(machine, event); break; case PERF_RECORD_LOST_SAMPLES: ret = machine__process_lost_samples_event(machine, event, sample); break; - break; default: ret = -1; break; -- 1.9.3