Skip to content

Commit

Permalink
s390/cpum_sf: Remove WARN_ON_ONCE statements
Browse files Browse the repository at this point in the history
[ Upstream commit b495e71 ]

Remove WARN_ON_ONCE statements. These have not triggered in the
past.

Signed-off-by: Thomas Richter <[email protected]>
Acked-by: Sumanth Korikkar <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Vasily Gorbik <[email protected]>
Cc: Alexander Gordeev <[email protected]>
Signed-off-by: Vasily Gorbik <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
Thomas Richter authored and gregkh committed Oct 17, 2024
1 parent 4f5768a commit b85e6e4
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions arch/s390/kernel/perf_cpum_sf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@ static int aux_output_begin(struct perf_output_handle *handle,
unsigned long 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;
Expand Down Expand Up @@ -1613,7 +1613,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 */
Expand All @@ -1635,7 +1635,7 @@ static void hw_collect_aux(struct cpu_hw_sf *cpuhw)
__func__);
break;
}
if (WARN_ON_ONCE(!aux))
if (!aux)
return;

/* Update head and alert_mark to new position */
Expand Down Expand Up @@ -1870,12 +1870,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;
Expand Down

0 comments on commit b85e6e4

Please sign in to comment.