Commit 88405440 authored by Venkata Sandeep Dhanalakota's avatar Venkata Sandeep Dhanalakota Committed by Chris Wilson

drm/i915: Fix typecheck macro in GT_TRACE

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

Fixes: 639f2f24 ("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: default avatarVenkata Sandeep Dhanalakota <venkata.s.dhanalakota@intel.com>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20191216185332.83289-1-venkata.s.dhanalakota@intel.com
parent 8b4f2925
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
struct drm_i915_private; struct drm_i915_private;
#define GT_TRACE(gt__, fmt, ...) do { \ #define GT_TRACE(gt, fmt, ...) do { \
typecheck(struct intel_gt, *(gt__)); \ const struct intel_gt *gt__ __maybe_unused = (gt); \
GEM_TRACE("%s " fmt, dev_name(gt->i915->drm.dev), \ GEM_TRACE("%s " fmt, dev_name(gt__->i915->drm.dev), \
##__VA_ARGS__); \ ##__VA_ARGS__); \
} while (0) } while (0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment