Message ID | 6005320.MhkbZ0Pkbq@devpool47.emlix.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | annotate i915_gem_object_trylock() as __must_check | expand |
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.h b/drivers/gpu/drm/i915/gem/i915_gem_object.h index 3dc61cbd2e11..b6da8b561ae0 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_object.h +++ b/drivers/gpu/drm/i915/gem/i915_gem_object.h @@ -198,8 +198,8 @@ static inline int i915_gem_object_lock_interruptible(struct drm_i915_gem_object return __i915_gem_object_lock(obj, ww, true); } -static inline bool i915_gem_object_trylock(struct drm_i915_gem_object *obj, - struct i915_gem_ww_ctx *ww) +static inline bool __must_check i915_gem_object_trylock(struct drm_i915_gem_object *obj, + struct i915_gem_ww_ctx *ww) { if (!ww) return dma_resv_trylock(obj->base.resv);
When you don't look at the return code you can't know if you actually got the lock. Signed-off-by: Rolf Eike Beer <eb@emlix.com> --- drivers/gpu/drm/i915/gem/i915_gem_object.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)