All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915: Fix typecheck macro in GT_TRACE
@ 2019-12-16 18:53 Venkata Sandeep Dhanalakota
  2019-12-16 21:03 ` Chris Wilson
  2019-12-17  3:07 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Venkata Sandeep Dhanalakota @ 2019-12-16 18:53 UTC (permalink / raw)
  To: intel-gfx; +Cc: chris.p.wilson

typecheck() macro creates an huge stack size causing
issues with static analysis with coverity, addressing
this with creating a local pointer.

Fixes: 639f2f24895f ("drm/i915: Introduce new macros for tracing")
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Venkata Sandeep Dhanalakota <venkata.s.dhanalakota@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gt.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt.h b/drivers/gpu/drm/i915/gt/intel_gt.h
index 9d9e8831daeb..2355cf129e9c 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt.h
@@ -12,9 +12,9 @@
 
 struct drm_i915_private;
 
-#define GT_TRACE(gt__, fmt, ...) do {					\
-	typecheck(struct intel_gt, *(gt__));				\
-	GEM_TRACE("%s  " fmt, dev_name(gt->i915->drm.dev),		\
+#define GT_TRACE(gt, fmt, ...) do {					\
+	const struct intel_gt *gt__ __maybe_unused = (gt);		\
+	GEM_TRACE("%s  " fmt, dev_name(gt__->i915->drm.dev),		\
 		  ##__VA_ARGS__);					\
 } while (0)
 
-- 
2.21.0.5.gaeb582a983

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [PATCH] drm/i915: Fix typecheck macro in GT_TRACE
  2019-12-16 18:53 [Intel-gfx] [PATCH] drm/i915: Fix typecheck macro in GT_TRACE Venkata Sandeep Dhanalakota
@ 2019-12-16 21:03 ` Chris Wilson
  2019-12-17  3:07 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2019-12-16 21:03 UTC (permalink / raw)
  To: Venkata Sandeep Dhanalakota, intel-gfx

Quoting Venkata Sandeep Dhanalakota (2019-12-16 18:53:32)
> typecheck() macro creates an huge stack size causing
> issues with static analysis with coverity, addressing
> this with creating a local pointer.
> 
> Fixes: 639f2f24895f ("drm/i915: Introduce new macros for tracing")
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Venkata Sandeep Dhanalakota <venkata.s.dhanalakota@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/intel_gt.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt.h b/drivers/gpu/drm/i915/gt/intel_gt.h
> index 9d9e8831daeb..2355cf129e9c 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gt.h
> @@ -12,9 +12,9 @@
>  
>  struct drm_i915_private;
>  
> -#define GT_TRACE(gt__, fmt, ...) do {                                  \
> -       typecheck(struct intel_gt, *(gt__));                            \
> -       GEM_TRACE("%s  " fmt, dev_name(gt->i915->drm.dev),              \
> +#define GT_TRACE(gt, fmt, ...) do {                                    \
> +       const struct intel_gt *gt__ __maybe_unused = (gt);              \
> +       GEM_TRACE("%s  " fmt, dev_name(gt__->i915->drm.dev),            \
>                   ##__VA_ARGS__);                                       \
>  } while (0)

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Fix typecheck macro in GT_TRACE
  2019-12-16 18:53 [Intel-gfx] [PATCH] drm/i915: Fix typecheck macro in GT_TRACE Venkata Sandeep Dhanalakota
  2019-12-16 21:03 ` Chris Wilson
@ 2019-12-17  3:07 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2019-12-17  3:07 UTC (permalink / raw)
  To: Venkata Sandeep Dhanalakota; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Fix typecheck macro in GT_TRACE
URL   : https://patchwork.freedesktop.org/series/70999/
State : failure

== Summary ==

Applying: drm/i915: Fix typecheck macro in GT_TRACE
Using index info to reconstruct a base tree...
M	drivers/gpu/drm/i915/gt/intel_gt.h
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2019-12-17  3:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-16 18:53 [Intel-gfx] [PATCH] drm/i915: Fix typecheck macro in GT_TRACE Venkata Sandeep Dhanalakota
2019-12-16 21:03 ` Chris Wilson
2019-12-17  3:07 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork

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.