]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/cpum_sf: Use hwc as variable consistently
authorThomas Richter <tmricht@linux.ibm.com>
Thu, 25 Jul 2024 11:20:32 +0000 (13:20 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Wed, 7 Aug 2024 18:52:53 +0000 (20:52 +0200)
In hw_perf_event_update() and cpumsf_pmu_enable() use variable hwc
consistently to access event's hardware related data.
No functional change.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/perf_cpum_sf.c

index a481f53c3338bf6fac0357e7faa42b5842e8b4d6..1f9239d27da5d1a5f711d5e78a107c342eca0648 100644 (file)
@@ -1014,7 +1014,7 @@ static void cpumsf_pmu_enable(struct pmu *pmu)
                        extend_sampling_buffer(&cpuhw->sfb, hwc);
                }
                /* Rate may be adjusted with ioctl() */
-               cpuhw->lsctl.interval = SAMPL_RATE(&cpuhw->event->hw);
+               cpuhw->lsctl.interval = SAMPL_RATE(hwc);
        }
 
        /* (Re)enable the PMU and sampling facility */
@@ -1291,7 +1291,7 @@ static void hw_perf_event_update(struct perf_event *event, int flush_all)
         * AUX buffer is used when in diagnostic sampling mode.
         * No perf events/samples are created.
         */
-       if (SAMPL_DIAG_MODE(&event->hw))
+       if (SAMPL_DIAG_MODE(hwc))
                return;
 
        sdbt = (unsigned long *)TEAR_REG(hwc);