lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1588910663-9437-1-git-send-email-likaige@loongson.cn>
Date:   Fri,  8 May 2020 12:04:23 +0800
From:   Kaige Li <likaige@...ngson.cn>
To:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>
Cc:     linux-kernel@...r.kernel.org, Tiezhu Yang <yangtiezhu@...ngson.cn>,
        Xuefeng Li <lixuefeng@...ngson.cn>
Subject: [PATCH] perf/core: Do not initialise statics to 0 and add space before '{'

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@...ngson.cn>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ