summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>2017-02-20 16:10:38 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2017-03-31 07:53:35 +0200
commit485527ba578254bb1171b13c55394257fd63cd59 (patch)
tree9d6af0f2aa5b84fee8404d4714c966ef0977f04f /arch/s390/kernel
parent26f268ac682854345531325c7c0d803b8c573228 (diff)
downloadop-kernel-dev-485527ba578254bb1171b13c55394257fd63cd59.zip
op-kernel-dev-485527ba578254bb1171b13c55394257fd63cd59.tar.gz
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: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/perf_cpum_cf.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/s390/kernel/perf_cpum_cf.c b/arch/s390/kernel/perf_cpum_cf.c
index 52a9ae0..746d034 100644
--- a/arch/s390/kernel/perf_cpum_cf.c
+++ b/arch/s390/kernel/perf_cpum_cf.c
@@ -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)
OpenPOWER on IntegriCloud