From 73486d750f56ec612b2e02aa06ceb2171a8c5e93 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Fri, 15 Dec 2023 12:33:31 -0800 Subject: [PATCH] drm/xe/display: Fix dummy __i915_inject_probe_error() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When CONFIG_DRM_I915_DEBUG is not set, a dummy __i915_inject_probe_error() is provided on the xe side. Use the same logic as in drivers/gpu/drm/i915/i915_utils.c to ifdef it out. This fixes the build with W=1 and without that config: CC [M] drivers/gpu/drm/xe/display/ext/i915_utils.o ../drivers/gpu/drm/xe/display/ext/i915_utils.c:19:5: error: no previous prototype for ‘__i915_inject_probe_error’ [-Werror=missing-prototypes] 19 | int __i915_inject_probe_error(struct drm_i915_private *i915, int err, | ^~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/xe/display/ext/i915_utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/xe/display/ext/i915_utils.c b/drivers/gpu/drm/xe/display/ext/i915_utils.c index 981edc2788bc3..43b10a2cc5085 100644 --- a/drivers/gpu/drm/xe/display/ext/i915_utils.c +++ b/drivers/gpu/drm/xe/display/ext/i915_utils.c @@ -14,9 +14,13 @@ bool i915_vtd_active(struct drm_i915_private *i915) return i915_run_as_guest(); } +#if IS_ENABLED(CONFIG_DRM_I915_DEBUG) + /* i915 specific, just put here for shutting it up */ int __i915_inject_probe_error(struct drm_i915_private *i915, int err, const char *func, int line) { return 0; } + +#endif -- 2.30.2