Skip to contentSkip to conversation

trace: add missing forward declaration

PATCH In review Ahbong Chang 3 participants 6 messages Apr 16, 2018 – Apr 18, 2018 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trace: add missing forward declaration

Without this forward declaration compile may fail if this header is included only for registering other probe event without struct pool_workqueue.

---
 include/trace/events/workqueue.h | 2 ++
 1 file changed, 2 insertions(+)
include/trace/events/workqueue.h +2 -0
index 2f057a494d93..9a761bc6a251 100644
@@ -25,6 +25,8 @@ DECLARE_EVENT_CLASS(workqueue_work,
 	TP_printk("work struct %p", __entry->work)
 );
 
+struct pool_workqueue;
+
 /**
  * workqueue_queue_work - called when a work gets queued
  * @req_cpu:	the requested cpu
Signature · 1 line
2.17.0.484.g0c8726318c-goog
maintainer
#1 lore raw
Quoted 4 lines · On Mon, 16 Apr 2018 10:36:25 +0800 Ahbong Chang <[email protected]> wrote:

Without this forward declaration compile may fail if this header is included only for registering other probe event without struct pool_workqueue.

Is this for new work or is there a config which this fails with today?

-- Steve

Quoted 19 lines
---
 include/trace/events/workqueue.h | 2 ++
 1 file changed, 2 insertions(+)
include/trace/events/workqueue.h +2 -0
index 2f057a494d93..9a761bc6a251 100644
@@ -25,6 +25,8 @@ DECLARE_EVENT_CLASS(workqueue_work,
 	TP_printk("work struct %p", __entry->work)
 );
 
+struct pool_workqueue;
+
 /**
  * workqueue_queue_work - called when a work gets queued
  * @req_cpu:	the requested cpu
#2 lore raw

It does not fail with any config without this fix. This is for new work.

-- Ahbong

Quoted 12 lines · Steven Rostedt
Quoted 4 lines · On Mon, 16 Apr 2018 10:36:25 +0800 Ahbong Chang <[email protected]> wrote:

Without this forward declaration compile may fail if this header is included only for registering other probe event without struct pool_workqueue.

Is this for new work or is there a config which this fails with today?

-- Steve

Quoted 7 lines

Review

Quoted 7 lines
---
 include/trace/events/workqueue.h | 2 ++
 1 file changed, 2 insertions(+)
(quoted diff) +0 -0

b/include/trace/events/workqueue.h

Quoted 12 lines
Quoted 12 lines

index 2f057a494d93..9a761bc6a251 100644

include/trace/events/workqueue.h +2 -0
@@ -25,6 +25,8 @@ DECLARE_EVENT_CLASS(workqueue_work,
      TP_printk("work struct %p", __entry->work)
 );
 
+struct pool_workqueue;
+
 /**
  * workqueue_queue_work - called when a work gets queued
  * @req_cpu: the requested cpu
#3 lore raw
Quoted 1 line · Ahbong Chang

It does not fail with any config without this fix. This is for new work.

Then why not submit it as part of the "new work" patch series? That's how dependancies are normally handled.

thanks,

greg k-h

#4 lore raw

The new work series are not ready yet. I think this patch does make the source better so here is the small patch alone.

-- Ahbong

Quoted 9 lines · Greg Kroah-Hartman
Quoted 1 line · Ahbong Chang

It does not fail with any config without this fix. This is for new work.

Then why not submit it as part of the "new work" patch series? That's how dependancies are normally handled.

thanks,

greg k-h

maintainer
#5 lore raw
In reply to Greg Kroah-Hartman
Quoted 5 lines · On Tue, 17 Apr 2018 12:29:09 +0200 Greg Kroah-Hartman…
Quoted 1 line · Ahbong Chang

It does not fail with any config without this fix. This is for new work.

Then why not submit it as part of the "new work" patch series? That's how dependancies are normally handled.

I consider this patch making the kernel more robust. The reason I asked was to know if it should be marked for stable or not. If nothing currently relies on it, I just put it into the -rc as a "make the kernel a little more robust" change. If other code relies on it, I mark it for stable.

I'll take this patch as more of a clean up.

Thanks!

-- Steve