All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] linux/trace_events.h: Remove duplicate struct declaration
@ 2021-03-30  1:55 Wan Jiabing
  2021-03-30  3:29 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Wan Jiabing @ 2021-03-30  1:55 UTC (permalink / raw)
  To: Steven Rostedt, Ingo Molnar, linux-kernel; +Cc: kael_w, Wan Jiabing

struct trace_array is declared twice. One has been declared
at forward struct declaration. Remove the duplicate.
And sort these forward declarations alphabetically.

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
 include/linux/trace_events.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
index 28e7af1406f2..29ae3ec5cab9 100644
--- a/include/linux/trace_events.h
+++ b/include/linux/trace_events.h
@@ -10,11 +10,11 @@
 #include <linux/perf_event.h>
 #include <linux/tracepoint.h>
 
-struct trace_array;
 struct array_buffer;
-struct tracer;
-struct dentry;
 struct bpf_prog;
+struct dentry;
+struct tracer;
+struct trace_array;
 
 const char *trace_print_flags_seq(struct trace_seq *p, const char *delim,
 				  unsigned long flags,
@@ -404,7 +404,6 @@ trace_get_fields(struct trace_event_call *event_call)
 	return event_call->class->get_fields(event_call);
 }
 
-struct trace_array;
 struct trace_subsystem_dir;
 
 enum {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] linux/trace_events.h: Remove duplicate struct declaration
  2021-03-30  1:55 [PATCH] linux/trace_events.h: Remove duplicate struct declaration Wan Jiabing
@ 2021-03-30  3:29 ` Steven Rostedt
  2021-03-30  3:43   ` 万家兵
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2021-03-30  3:29 UTC (permalink / raw)
  To: Wan Jiabing; +Cc: Ingo Molnar, linux-kernel, kael_w

On Tue, 30 Mar 2021 09:55:17 +0800
Wan Jiabing <wanjiabing@vivo.com> wrote:

> struct trace_array is declared twice. One has been declared
> at forward struct declaration. Remove the duplicate.
> And sort these forward declarations alphabetically.

Um, no that's not how we sort things.

> 
> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
> ---
>  include/linux/trace_events.h | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
> index 28e7af1406f2..29ae3ec5cab9 100644
> --- a/include/linux/trace_events.h
> +++ b/include/linux/trace_events.h
> @@ -10,11 +10,11 @@
>  #include <linux/perf_event.h>
>  #include <linux/tracepoint.h>
>  
> -struct trace_array;
>  struct array_buffer;
> -struct tracer;
> -struct dentry;
>  struct bpf_prog;
> +struct dentry;
> +struct tracer;
> +struct trace_array;

NAK to the above. If anything, we sort it by length. But the above doesn't
need to be touched.

>  
>  const char *trace_print_flags_seq(struct trace_seq *p, const char *delim,
>  				  unsigned long flags,
> @@ -404,7 +404,6 @@ trace_get_fields(struct trace_event_call *event_call)
>  	return event_call->class->get_fields(event_call);
>  }
>  
> -struct trace_array;

This part is fine.

Thanks,

-- Steve

>  struct trace_subsystem_dir;
>  
>  enum {


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re:Re: [PATCH] linux/trace_events.h: Remove duplicate struct declaration
  2021-03-30  3:29 ` Steven Rostedt
@ 2021-03-30  3:43   ` 万家兵
  0 siblings, 0 replies; 3+ messages in thread
From: 万家兵 @ 2021-03-30  3:43 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Ingo Molnar, linux-kernel, kael_w

 
>On Tue, 30 Mar 2021 09:55:17 +0800>Wan Jiabing <wanjiabing@vivo.com> wrote:
>
>> struct trace_array is declared twice. One has been declared
>> at forward struct declaration. Remove the duplicate.
>> And sort these forward declarations alphabetically.
>
>Um, no that's not how we sort things.
>
>> 
>> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
>> ---
>>  include/linux/trace_events.h | 7 +++----
>>  1 file changed, 3 insertions(+), 4 deletions(-)
>> 
>> diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
>> index 28e7af1406f2..29ae3ec5cab9 100644
>> --- a/include/linux/trace_events.h
>> +++ b/include/linux/trace_events.h
>> @@ -10,11 +10,11 @@
>>  #include <linux/perf_event.h>
>>  #include <linux/tracepoint.h>
>>  
>> -struct trace_array;
>>  struct array_buffer;
>> -struct tracer;
>> -struct dentry;
>>  struct bpf_prog;
>> +struct dentry;
>> +struct tracer;
>> +struct trace_array;
>
>NAK to the above. If anything, we sort it by length. But the above doesn't
>need to be touched.
>

OK, I know. I resend the v2.
Please review.

Yours,
Wan Jiabing

>>  
>>  const char *trace_print_flags_seq(struct trace_seq *p, const char *delim,
>>  				  unsigned long flags,
>> @@ -404,7 +404,6 @@ trace_get_fields(struct trace_event_call *event_call)
>>  	return event_call->class->get_fields(event_call);
>>  }
>>  
>> -struct trace_array;
>
>This part is fine.
>
>Thanks,
>
>-- Steve
>
>>  struct trace_subsystem_dir;
>>  
>>  enum {
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-30  3:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30  1:55 [PATCH] linux/trace_events.h: Remove duplicate struct declaration Wan Jiabing
2021-03-30  3:29 ` Steven Rostedt
2021-03-30  3:43   ` 万家兵

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.