* [PATCH] perf/core: Do not initialise statics to 0 and add space before '{'
@ 2020-05-08 4:04 Kaige Li
2020-05-08 8:25 ` Peter Zijlstra
0 siblings, 1 reply; 3+ messages in thread
From: Kaige Li @ 2020-05-08 4:04 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim
Cc: linux-kernel, Tiezhu Yang, Xuefeng Li
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@loongson.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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perf/core: Do not initialise statics to 0 and add space before '{'
2020-05-08 4:04 [PATCH] perf/core: Do not initialise statics to 0 and add space before '{' Kaige Li
@ 2020-05-08 8:25 ` Peter Zijlstra
2020-05-08 9:39 ` Kaige Li
0 siblings, 1 reply; 3+ messages in thread
From: Peter Zijlstra @ 2020-05-08 8:25 UTC (permalink / raw)
To: Kaige Li
Cc: Ingo Molnar, Arnaldo Carvalho de Melo, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Namhyung Kim, linux-kernel,
Tiezhu Yang, Xuefeng Li
On Fri, May 08, 2020 at 12:04:23PM +0800, Kaige Li wrote:
> 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)){
Checkpatch can sod off. Please don't ever submit pure checkpatch patches
to anything I maintain.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] perf/core: Do not initialise statics to 0 and add space before '{'
2020-05-08 8:25 ` Peter Zijlstra
@ 2020-05-08 9:39 ` Kaige Li
0 siblings, 0 replies; 3+ messages in thread
From: Kaige Li @ 2020-05-08 9:39 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Ingo Molnar, Arnaldo Carvalho de Melo, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Namhyung Kim, linux-kernel,
Tiezhu Yang, Xuefeng Li
Ok, I will pay attation. thank you.
On 05/08/2020 04:25 PM, Peter Zijlstra wrote:
> Checkpatch can sod off. Please don't ever submit pure checkpatch patches
> to anything I maintain
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-08 9:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 4:04 [PATCH] perf/core: Do not initialise statics to 0 and add space before '{' Kaige Li
2020-05-08 8:25 ` Peter Zijlstra
2020-05-08 9:39 ` Kaige Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).