Skip to content

Commit

Permalink
drm/xe/display: Fix dummy __i915_inject_probe_error()
Browse files Browse the repository at this point in the history
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 <lucas.demarchi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
  • Loading branch information
Lucas De Marchi authored and Rodrigo Vivi committed Dec 21, 2023
1 parent 80166e9 commit 73486d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/xe/display/ext/i915_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 73486d7

Please sign in to comment.