Commit 485527ba authored by Hendrik Brueckner's avatar Hendrik Brueckner Committed by Martin Schwidefsky

s390/cpum_cf: make hw_perf_event_update() a void function

The return code of hw_perf_event_update() is not evaluated by
its callers.  Hence, simplify the function by removing the
return code.
Reported-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 26f268ac
...@@ -462,7 +462,7 @@ static int hw_perf_event_reset(struct perf_event *event) ...@@ -462,7 +462,7 @@ static int hw_perf_event_reset(struct perf_event *event)
return err; return err;
} }
static int hw_perf_event_update(struct perf_event *event) static void hw_perf_event_update(struct perf_event *event)
{ {
u64 prev, new, delta; u64 prev, new, delta;
int err; int err;
...@@ -471,14 +471,12 @@ static int hw_perf_event_update(struct perf_event *event) ...@@ -471,14 +471,12 @@ static int hw_perf_event_update(struct perf_event *event)
prev = local64_read(&event->hw.prev_count); prev = local64_read(&event->hw.prev_count);
err = ecctr(event->hw.config, &new); err = ecctr(event->hw.config, &new);
if (err) if (err)
goto out; return;
} while (local64_cmpxchg(&event->hw.prev_count, prev, new) != prev); } while (local64_cmpxchg(&event->hw.prev_count, prev, new) != prev);
delta = (prev <= new) ? new - prev delta = (prev <= new) ? new - prev
: (-1ULL - prev) + new + 1; /* overflow */ : (-1ULL - prev) + new + 1; /* overflow */
local64_add(delta, &event->count); local64_add(delta, &event->count);
out:
return err;
} }
static void cpumf_pmu_read(struct perf_event *event) static void cpumf_pmu_read(struct perf_event *event)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment