[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180814103231.GC7268@redhat.com>
Date: Tue, 14 Aug 2018 12:32:32 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Jiri Olsa <jolsa@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
lkml <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
David Ahern <dsahern@...il.com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Milind Chabbi <chabbi.milind@...il.com>,
Frederic Weisbecker <frederic@...nel.org>
Subject: Re: [PATCH 5/5] perf/hw_breakpoint: Simplify breakpoint enable in
perf_event_modify_breakpoint
On 08/10, Jiri Olsa wrote:
>
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -2867,16 +2867,11 @@ static int perf_event_modify_breakpoint(struct perf_event *bp,
> _perf_event_disable(bp);
>
> err = modify_user_hw_breakpoint_check(bp, attr, true);
> - if (err) {
> - if (!bp->attr.disabled)
> - _perf_event_enable(bp);
>
> - return err;
> - }
> -
> - if (!attr->disabled)
> + if (!bp->attr.disabled)
> _perf_event_enable(bp);
> - return 0;
> +
> + return err;
> }
Acked-by: Oleg Nesterov <oleg@...hat.com>
Powered by blists - more mailing lists