aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Richter <[email protected]>2024-07-09 10:55:04 +0200
committerVasily Gorbik <[email protected]>2024-08-07 20:52:53 +0200
commit6bc565a99e77c8ced71c1184cebe4dda3bb4fa73 (patch)
treec7e9aa7ff491695fcc875a02f0369a47cc0c5a95
parentb20182829001f945ac854e22f305eb92917d5a1a (diff)
s390/cpum_sf: Define and initialize variable
Define and initialize a variable in one place. Remove space between cast and variable. No functional change. 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]>
-rw-r--r--arch/s390/kernel/perf_cpum_sf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/s390/kernel/perf_cpum_sf.c b/arch/s390/kernel/perf_cpum_sf.c
index 1f9239d27da5..4d668b2ce64d 100644
--- a/arch/s390/kernel/perf_cpum_sf.c
+++ b/arch/s390/kernel/perf_cpum_sf.c
@@ -1347,7 +1347,7 @@ static void hw_perf_event_update(struct perf_event *event, int flush_all)
sdbt = get_next_sdbt(sdbt);
/* Update event hardware registers */
- TEAR_REG(hwc) = (unsigned long) sdbt;
+ TEAR_REG(hwc) = (unsigned long)sdbt;
/* Stop processing sample-data if all samples of the current
* sample-data-block were flushed even if it was not full.
@@ -1943,7 +1943,7 @@ static int cpumsf_pmu_add(struct perf_event *event, int flags)
{
struct cpu_hw_sf *cpuhw = this_cpu_ptr(&cpu_hw_sf);
struct aux_buffer *aux;
- int err;
+ int err = 0;
if (cpuhw->flags & PMU_F_IN_USE)
return -EAGAIN;
@@ -1951,7 +1951,6 @@ static int cpumsf_pmu_add(struct perf_event *event, int flags)
if (!SAMPL_DIAG_MODE(&event->hw) && !cpuhw->sfb.sdbt)
return -EINVAL;
- err = 0;
perf_pmu_disable(event->pmu);
event->hw.state = PERF_HES_UPTODATE | PERF_HES_STOPPED;