From: Thomas Richter Date: Thu, 16 Nov 2023 09:43:14 +0000 (+0100) Subject: s390/pai_ext: rework function paiext_copy argments X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0dade41d16132ac11ac9e3ac0b0313d438037224;p=linux.git s390/pai_ext: rework function paiext_copy argments Change the function paiext_copy() parameter from a pointer to a structure to two pointers to memory areas referenced. The other members of that structure are not needed. Signed-off-by: Thomas Richter Acked-by: Mete Durlu Signed-off-by: Alexander Gordeev --- diff --git a/arch/s390/kernel/perf_pai_ext.c b/arch/s390/kernel/perf_pai_ext.c index 275d4fd3fe38b..e2e1ce2de695f 100644 --- a/arch/s390/kernel/perf_pai_ext.c +++ b/arch/s390/kernel/perf_pai_ext.c @@ -384,13 +384,12 @@ static void paiext_del(struct perf_event *event, int flags) * 2 bytes: Number of counter * 8 bytes: Value of counter */ -static size_t paiext_copy(struct paiext_map *cpump) +static size_t paiext_copy(struct pai_userdata *userdata, unsigned long *area) { - struct pai_userdata *userdata = cpump->save; int i, outidx = 0; for (i = 1; i <= paiext_cnt; i++) { - u64 val = paiext_getctr(cpump->area, i); + u64 val = paiext_getctr(area, i); if (val) { userdata[outidx].num = i; @@ -427,7 +426,7 @@ static int paiext_push_sample(void) size_t rawsize; int overflow; - rawsize = paiext_copy(cpump); + rawsize = paiext_copy(cpump->save, cpump->area); if (!rawsize) /* No incremented counters */ return 0;