s390/pai_ext: rework function paiext_copy argments
authorThomas Richter <tmricht@linux.ibm.com>
Thu, 16 Nov 2023 09:43:14 +0000 (10:43 +0100)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Fri, 12 Jan 2024 13:23:26 +0000 (14:23 +0100)
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 <tmricht@linux.ibm.com>
Acked-by: Mete Durlu <meted@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/kernel/perf_pai_ext.c

index 275d4fd3fe38b3e10b285b6eca76494670f865a7..e2e1ce2de695fe9e9112b237bd1287fd1749c8de 100644 (file)
@@ -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;