diff mbox series

[1/2] drm/i915: Add spaces before compound GEM_TRACE

Message ID 20191223204411.2355304-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/i915: Add spaces before compound GEM_TRACE | expand

Commit Message

Chris Wilson Dec. 23, 2019, 8:44 p.m. UTC
Add a space between the prefixed format and the users format so that the
join are not mistakenly combined into one long word.

Fixes: 639f2f24895f ("drm/i915: Introduce new macros for tracing")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Venkata Sandeep Dhanalakota <venkata.s.dhanalakota@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_context.h | 2 +-
 drivers/gpu/drm/i915/i915_request.h     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Lucas De Marchi Dec. 23, 2019, 9:23 p.m. UTC | #1
On Mon, Dec 23, 2019 at 08:44:10PM +0000, Chris Wilson wrote:
>Add a space between the prefixed format and the users format so that the
>join are not mistakenly combined into one long word.
>
>Fixes: 639f2f24895f ("drm/i915: Introduce new macros for tracing")
>Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>Cc: Venkata Sandeep Dhanalakota <venkata.s.dhanalakota@intel.com>
>---
> drivers/gpu/drm/i915/gt/intel_context.h | 2 +-
> drivers/gpu/drm/i915/i915_request.h     | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/gt/intel_context.h b/drivers/gpu/drm/i915/gt/intel_context.h
>index 1d4a1b1357cf..0f5ae4ff3b10 100644
>--- a/drivers/gpu/drm/i915/gt/intel_context.h
>+++ b/drivers/gpu/drm/i915/gt/intel_context.h
>@@ -19,7 +19,7 @@
>
> #define CE_TRACE(ce, fmt, ...) do {					\
> 	const struct intel_context *ce__ = (ce);			\
>-	ENGINE_TRACE(ce__->engine, "context:%llx" fmt,			\
>+	ENGINE_TRACE(ce__->engine, "context:%llx " fmt,			\
> 		     ce__->timeline->fence_context,			\
> 		     ##__VA_ARGS__);					\
> } while (0)
>diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h
>index 565322640378..9784421a3b4d 100644
>--- a/drivers/gpu/drm/i915/i915_request.h
>+++ b/drivers/gpu/drm/i915/i915_request.h
>@@ -51,7 +51,7 @@ struct i915_capture_list {
>
> #define RQ_TRACE(rq, fmt, ...) do {					\
> 	const struct i915_request *rq__ = (rq);				\
>-	ENGINE_TRACE(rq__->engine, "fence %llx:%lld, current %d" fmt,	\
>+	ENGINE_TRACE(rq__->engine, "fence %llx:%lld, current %d " fmt,	\

do we care about the trailing space if fmt is "\n"?

Lucas De Marchi


> 		     rq__->fence.context, rq__->fence.seqno,		\
> 		     hwsp_seqno(rq__), ##__VA_ARGS__);			\
> } while (0)
>-- 
>2.24.1
>
>_______________________________________________
>Intel-gfx mailing list
>Intel-gfx@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Chris Wilson Dec. 23, 2019, 9:54 p.m. UTC | #2
Quoting Lucas De Marchi (2019-12-23 21:23:36)
> On Mon, Dec 23, 2019 at 08:44:10PM +0000, Chris Wilson wrote:
> >Add a space between the prefixed format and the users format so that the
> >join are not mistakenly combined into one long word.
> >
> >Fixes: 639f2f24895f ("drm/i915: Introduce new macros for tracing")
> >Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> >Cc: Venkata Sandeep Dhanalakota <venkata.s.dhanalakota@intel.com>
> >---
> > drivers/gpu/drm/i915/gt/intel_context.h | 2 +-
> > drivers/gpu/drm/i915/i915_request.h     | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> >diff --git a/drivers/gpu/drm/i915/gt/intel_context.h b/drivers/gpu/drm/i915/gt/intel_context.h
> >index 1d4a1b1357cf..0f5ae4ff3b10 100644
> >--- a/drivers/gpu/drm/i915/gt/intel_context.h
> >+++ b/drivers/gpu/drm/i915/gt/intel_context.h
> >@@ -19,7 +19,7 @@
> >
> > #define CE_TRACE(ce, fmt, ...) do {                                   \
> >       const struct intel_context *ce__ = (ce);                        \
> >-      ENGINE_TRACE(ce__->engine, "context:%llx" fmt,                  \
> >+      ENGINE_TRACE(ce__->engine, "context:%llx " fmt,                 \
> >                    ce__->timeline->fence_context,                     \
> >                    ##__VA_ARGS__);                                    \
> > } while (0)
> >diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h
> >index 565322640378..9784421a3b4d 100644
> >--- a/drivers/gpu/drm/i915/i915_request.h
> >+++ b/drivers/gpu/drm/i915/i915_request.h
> >@@ -51,7 +51,7 @@ struct i915_capture_list {
> >
> > #define RQ_TRACE(rq, fmt, ...) do {                                   \
> >       const struct i915_request *rq__ = (rq);                         \
> >-      ENGINE_TRACE(rq__->engine, "fence %llx:%lld, current %d" fmt,   \
> >+      ENGINE_TRACE(rq__->engine, "fence %llx:%lld, current %d " fmt,  \
> 
> do we care about the trailing space if fmt is "\n"?

No. An extra space in a debug log, which you only see when something
blows up and only compiled in for CI, is the last of your worries.
-Chris
Lucas De Marchi Dec. 23, 2019, 10 p.m. UTC | #3
On Mon, Dec 23, 2019 at 09:54:55PM +0000, Chris Wilson wrote:
>Quoting Lucas De Marchi (2019-12-23 21:23:36)
>> On Mon, Dec 23, 2019 at 08:44:10PM +0000, Chris Wilson wrote:
>> >Add a space between the prefixed format and the users format so that the
>> >join are not mistakenly combined into one long word.
>> >
>> >Fixes: 639f2f24895f ("drm/i915: Introduce new macros for tracing")
>> >Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> >Cc: Venkata Sandeep Dhanalakota <venkata.s.dhanalakota@intel.com>
>> >---
>> > drivers/gpu/drm/i915/gt/intel_context.h | 2 +-
>> > drivers/gpu/drm/i915/i915_request.h     | 2 +-
>> > 2 files changed, 2 insertions(+), 2 deletions(-)
>> >
>> >diff --git a/drivers/gpu/drm/i915/gt/intel_context.h b/drivers/gpu/drm/i915/gt/intel_context.h
>> >index 1d4a1b1357cf..0f5ae4ff3b10 100644
>> >--- a/drivers/gpu/drm/i915/gt/intel_context.h
>> >+++ b/drivers/gpu/drm/i915/gt/intel_context.h
>> >@@ -19,7 +19,7 @@
>> >
>> > #define CE_TRACE(ce, fmt, ...) do {                                   \
>> >       const struct intel_context *ce__ = (ce);                        \
>> >-      ENGINE_TRACE(ce__->engine, "context:%llx" fmt,                  \
>> >+      ENGINE_TRACE(ce__->engine, "context:%llx " fmt,                 \
>> >                    ce__->timeline->fence_context,                     \
>> >                    ##__VA_ARGS__);                                    \
>> > } while (0)
>> >diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h
>> >index 565322640378..9784421a3b4d 100644
>> >--- a/drivers/gpu/drm/i915/i915_request.h
>> >+++ b/drivers/gpu/drm/i915/i915_request.h
>> >@@ -51,7 +51,7 @@ struct i915_capture_list {
>> >
>> > #define RQ_TRACE(rq, fmt, ...) do {                                   \
>> >       const struct i915_request *rq__ = (rq);                         \
>> >-      ENGINE_TRACE(rq__->engine, "fence %llx:%lld, current %d" fmt,   \
>> >+      ENGINE_TRACE(rq__->engine, "fence %llx:%lld, current %d " fmt,  \
>>
>> do we care about the trailing space if fmt is "\n"?
>
>No. An extra space in a debug log, which you only see when something
>blows up and only compiled in for CI, is the last of your worries.

oh, ok. This in the end uses trace_printk().


Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>

Lucas De Marchi

>-Chris
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/intel_context.h b/drivers/gpu/drm/i915/gt/intel_context.h
index 1d4a1b1357cf..0f5ae4ff3b10 100644
--- a/drivers/gpu/drm/i915/gt/intel_context.h
+++ b/drivers/gpu/drm/i915/gt/intel_context.h
@@ -19,7 +19,7 @@ 
 
 #define CE_TRACE(ce, fmt, ...) do {					\
 	const struct intel_context *ce__ = (ce);			\
-	ENGINE_TRACE(ce__->engine, "context:%llx" fmt,			\
+	ENGINE_TRACE(ce__->engine, "context:%llx " fmt,			\
 		     ce__->timeline->fence_context,			\
 		     ##__VA_ARGS__);					\
 } while (0)
diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h
index 565322640378..9784421a3b4d 100644
--- a/drivers/gpu/drm/i915/i915_request.h
+++ b/drivers/gpu/drm/i915/i915_request.h
@@ -51,7 +51,7 @@  struct i915_capture_list {
 
 #define RQ_TRACE(rq, fmt, ...) do {					\
 	const struct i915_request *rq__ = (rq);				\
-	ENGINE_TRACE(rq__->engine, "fence %llx:%lld, current %d" fmt,	\
+	ENGINE_TRACE(rq__->engine, "fence %llx:%lld, current %d " fmt,	\
 		     rq__->fence.context, rq__->fence.seqno,		\
 		     hwsp_seqno(rq__), ##__VA_ARGS__);			\
 } while (0)