drm/sched: Fix preprocessor guard
Subsystems (3)
Philipp Stanner
maintainerRFC PATCH 1/1 drm/sched: Fix preprocessor guard
When writing the header guard for gpu_scheduler_trace.h, a typo, apparently, occurred.
Fix the typo and document the scope of the guard.
---
I just discovered this. But I have little understanding of what is going on in this header in the first place, so I kindly ask for comments on this entire guard line with its logical or ||
The code hasn't been touched since 2015. So it seems it at least didn't cause bugs.
P.
--- drivers/gpu/drm/scheduler/gpu_scheduler_trace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/scheduler/gpu_scheduler_trace.h +2 -2
@@ -21,7 +21,7 @@* */ -#if !defined(_GPU_SCHED_TRACE_H) || defined(TRACE_HEADER_MULTI_READ ) +#if !defined(_GPU_SCHED_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ )#define _GPU_SCHED_TRACE_H_#include <linux/stringify.h>
@@ -106,7 +106,7 @@ TRACE_EVENT(drm_sched_job_wait_dep, __entry->seqno) ); -#endif +#endif /* _GPU_SCHED_TRACE_H_ */ /* This part must be outside protection */ #undef TRACE_INCLUDE_PATH
Signature · 1 line
2.47.1
Quoted 7 lines · Philipp Stanner
When writing the header guard for
gpu_scheduler_trace.h, a typo, apparently, occurred.Fix the typo and document the scope of the guard.
Fixes 353da3c520b4 ("drm/amdgpu: add tracepoint for scheduler (v2)")Signed-off-by Philipp Stanner <[email protected]>
Quoted 7 lines
---
I just discovered this. But I have little understanding of what is going on in this header in the first place, so I kindly ask for comments on this entire guard line with its logical or ||The code hasn't been touched since 2015. So it seems it at least didn't cause bugs.
No other header includes so it never caused a problem.
Quoted 19 lines
P.
--- drivers/gpu/drm/scheduler/gpu_scheduler_trace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/scheduler/gpu_scheduler_trace.h +1
-1@@ -21,7 +21,7 @@* */ -#if !defined(_GPU_SCHED_TRACE_H) || defined(TRACE_HEADER_MULTI_READ ) +#if !defined(_GPU_SCHED_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ )#define _GPU_SCHED_TRACE_H_#include <linux/stringify.h>
drivers/gpu/drm/scheduler/gpu_scheduler_trace.h TRACE_EVENT(drm_sched_job_wait_dep, · line 112
Quoted 8 lines
drivers/gpu/drm/scheduler/gpu_scheduler_trace.h +1
-1@@ -106,7 +106,7 @@ TRACE_EVENT(drm_sched_job_wait_dep, __entry->seqno) ); -#endif +#endif /* _GPU_SCHED_TRACE_H_ */ /* This part must be outside protection */ #undef TRACE_INCLUDE_PATH
Regards,
Tvrtko
Philipp Stanner
AppliedQuoted 7 lines · Philipp Stanner
When writing the header guard for
gpu_scheduler_trace.h, a typo, apparently, occurred.Fix the typo and document the scope of the guard.
Fixes 353da3c520b4 ("drm/amdgpu: add tracepoint for scheduler (v2)")Signed-off-by Philipp Stanner <[email protected]>
Applied to drm-misc-fixes with Tvrtko's RB
Quoted 39 lines
---
I just discovered this. But I have little understanding of what is going
on in this header in the first place, so I kindly ask for comments on this entire guard line with its logical or ||The code hasn't been touched since 2015. So it seems it at least didn't
cause bugs.P.
---
drivers/gpu/drm/scheduler/gpu_scheduler_trace.h | 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/scheduler/gpu_scheduler_trace.h +0
-0@@ -21,7 +21,7 @@* */ drivers/gpu/drm/scheduler/gpu_scheduler_trace.h +1
-1-#if !defined(_GPU_SCHED_TRACE_H) || defined(TRACE_HEADER_MULTI_READ ) +#if !defined(_GPU_SCHED_TRACE_H_) ||
defined(TRACE_HEADER_MULTI_READ)
#define _GPU_SCHED_TRACE_H_
#include <linux/stringify.h>drivers/gpu/drm/scheduler/gpu_scheduler_trace.h +0
-0@@ -106,7 +106,7 @@ TRACE_EVENT(drm_sched_job_wait_dep, __entry->seqno) );drivers/gpu/drm/scheduler/gpu_scheduler_trace.h +1
-1-#endif +#endif /* _GPU_SCHED_TRACE_H_ */
/* This part must be outside protection */
#undefTRACE_INCLUDE_PATH