提交 485527ba 编写于 作者: H Hendrik Brueckner 提交者: 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: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 26f268ac
......@@ -462,7 +462,7 @@ static int hw_perf_event_reset(struct perf_event *event)
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;
int err;
......@@ -471,14 +471,12 @@ static int hw_perf_event_update(struct perf_event *event)
prev = local64_read(&event->hw.prev_count);
err = ecctr(event->hw.config, &new);
if (err)
goto out;
return;
} while (local64_cmpxchg(&event->hw.prev_count, prev, new) != prev);
delta = (prev <= new) ? new - prev
: (-1ULL - prev) + new + 1; /* overflow */
local64_add(delta, &event->count);
out:
return err;
}
static void cpumf_pmu_read(struct perf_event *event)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册