diff options
| author | Jiri Olsa <jolsa@kernel.org> | 2018-08-27 05:12:26 -0400 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-08-30 13:49:23 -0400 |
| commit | cb45302d7c5e20f0c0598cdbd7753fa44daceb2a (patch) | |
| tree | 4c967972893d85b5d937e531d21a3ee0c3b5fba7 | |
| parent | bd14406b78e6daa1ea3c1673bda1ffc9efdeead0 (diff) | |
perf/hw_breakpoint: Remove superfluous bp->attr.disabled = 0
Once the breakpoint was succesfully modified, the attr->disabled value
is in bp->attr.disabled. So there's no reason to set it again, removing
that.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Milind Chabbi <chabbi.milind@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180827091228.2878-4-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
| -rw-r--r-- | kernel/events/hw_breakpoint.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c index fb229d9c7f3c..3e560d7609fd 100644 --- a/kernel/events/hw_breakpoint.c +++ b/kernel/events/hw_breakpoint.c | |||
| @@ -526,10 +526,9 @@ int modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *att | |||
| 526 | if (err) | 526 | if (err) |
| 527 | return err; | 527 | return err; |
| 528 | 528 | ||
| 529 | if (!attr->disabled) { | 529 | if (!attr->disabled) |
| 530 | perf_event_enable(bp); | 530 | perf_event_enable(bp); |
| 531 | bp->attr.disabled = 0; | 531 | |
| 532 | } | ||
| 533 | return 0; | 532 | return 0; |
| 534 | } | 533 | } |
| 535 | EXPORT_SYMBOL_GPL(modify_user_hw_breakpoint); | 534 | EXPORT_SYMBOL_GPL(modify_user_hw_breakpoint); |
