[PATCH 02/48] drm/i915: Remove unused debug functions

Chris Wilson chris at chris-wilson.co.uk
Tue Feb 9 01:21:05 UTC 2021


Remove or hide unused debug functions from clang, or else it moans.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_sw_fence.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_sw_fence.c b/drivers/gpu/drm/i915/i915_sw_fence.c
index dfabf291e5cd..566bc48e5b0c 100644
--- a/drivers/gpu/drm/i915/i915_sw_fence.c
+++ b/drivers/gpu/drm/i915/i915_sw_fence.c
@@ -49,10 +49,12 @@ static inline void debug_fence_init(struct i915_sw_fence *fence)
 	debug_object_init(fence, &i915_sw_fence_debug_descr);
 }
 
+#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
 static inline void debug_fence_init_onstack(struct i915_sw_fence *fence)
 {
 	debug_object_init_on_stack(fence, &i915_sw_fence_debug_descr);
 }
+#endif
 
 static inline void debug_fence_activate(struct i915_sw_fence *fence)
 {
@@ -92,9 +94,11 @@ static inline void debug_fence_init(struct i915_sw_fence *fence)
 {
 }
 
+#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
 static inline void debug_fence_init_onstack(struct i915_sw_fence *fence)
 {
 }
+#endif
 
 static inline void debug_fence_activate(struct i915_sw_fence *fence)
 {
@@ -113,10 +117,6 @@ static inline void debug_fence_destroy(struct i915_sw_fence *fence)
 {
 }
 
-static inline void debug_fence_free(struct i915_sw_fence *fence)
-{
-}
-
 static inline void debug_fence_assert(struct i915_sw_fence *fence)
 {
 }
-- 
2.20.1



More information about the Intel-gfx-trybot mailing list