]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
s390/cpum_sf: Remove WARN_ON_ONCE statements
authorThomas Richter <tmricht@linux.ibm.com>
Wed, 10 Jul 2024 10:23:47 +0000 (12:23 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Thu, 22 Aug 2024 17:28:11 +0000 (19:28 +0200)
Remove WARN_ON_ONCE statements. These have not triggered in the
past.

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 8d49f24f1bf6ad52a8b9636a8d186b4c88bbf623..5b765e3ccf0cadc837afcf25c6ba19fb6389472e 100644 (file)
@@ -1359,7 +1359,7 @@ static int aux_output_begin(struct perf_output_handle *handle,
        unsigned long range, i, range_scan, idx, head, base, offset;
        struct hws_trailer_entry *te;
 
-       if (WARN_ON_ONCE(handle->head & ~PAGE_MASK))
+       if (handle->head & ~PAGE_MASK)
                return -EINVAL;
 
        aux->head = handle->head >> PAGE_SHIFT;
@@ -1522,7 +1522,7 @@ static void hw_collect_aux(struct cpu_hw_sf *cpuhw)
        unsigned long num_sdb;
 
        aux = perf_get_aux(handle);
-       if (WARN_ON_ONCE(!aux))
+       if (!aux)
                return;
 
        /* Inform user space new data arrived */
@@ -1541,7 +1541,7 @@ static void hw_collect_aux(struct cpu_hw_sf *cpuhw)
                                num_sdb);
                        break;
                }
-               if (WARN_ON_ONCE(!aux))
+               if (!aux)
                        return;
 
                /* Update head and alert_mark to new position */
@@ -1754,12 +1754,8 @@ static void cpumsf_pmu_start(struct perf_event *event, int flags)
 {
        struct cpu_hw_sf *cpuhw = this_cpu_ptr(&cpu_hw_sf);
 
-       if (WARN_ON_ONCE(!(event->hw.state & PERF_HES_STOPPED)))
+       if (!(event->hw.state & PERF_HES_STOPPED))
                return;
-
-       if (flags & PERF_EF_RELOAD)
-               WARN_ON_ONCE(!(event->hw.state & PERF_HES_UPTODATE));
-
        perf_pmu_disable(event->pmu);
        event->hw.state = 0;
        cpuhw->lsctl.cs = 1;