[PATCH] perf/core: Do not initialise statics to 0 and add space before '{'

From: Kaige Li
Date: Fri May 08 2020 - 00:04:55 EST


Fix the following checkpatch errors:

ERROR: do not initialise statics to 0
#10616: FILE: ./kernel/events/core.c:10616:
+ static int hw_context_taken = 0;

ERROR: space required before the open brace '{'
#11070: FILE: ./kernel/events/core.c:11070:
+ } else if (is_write_backward(event)){

Signed-off-by: Kaige Li <likaige@xxxxxxxxxxx>
---
kernel/events/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 80cf996..8d47d30 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -10618,7 +10618,7 @@ int perf_pmu_register(struct pmu *pmu, const char *name, int type)

skip_type:
if (pmu->task_ctx_nr == perf_hw_context) {
- static int hw_context_taken = 0;
+ static int hw_context_taken;

/*
* Other than systems with heterogeneous CPUs, it never makes
@@ -11072,7 +11072,7 @@ perf_event_alloc(struct perf_event_attr *attr, int cpu,
if (overflow_handler) {
event->overflow_handler = overflow_handler;
event->overflow_handler_context = context;
- } else if (is_write_backward(event)){
+ } else if (is_write_backward(event)) {
event->overflow_handler = perf_event_output_backward;
event->overflow_handler_context = NULL;
} else {
--
2.1.0