@@ -1060,7 +1060,7 @@ static void cleanup_gt(struct intel_gt_coredump *gt)
kfree(gt);
}
-void __i915_gpu_coredump_free(struct kref *error_ref)
+static void i915_gpu_coredump_free(struct kref *error_ref)
{
struct i915_gpu_coredump *error =
container_of(error_ref, typeof(*error), ref);
@@ -1080,6 +1080,18 @@ void __i915_gpu_coredump_free(struct kref *error_ref)
kfree(error);
}
+static struct i915_gpu_coredump *i915_gpu_coredump_get(struct i915_gpu_coredump *gpu)
+{
+ kref_get(&gpu->ref);
+ return gpu;
+}
+
+void i915_gpu_coredump_put(struct i915_gpu_coredump *gpu)
+{
+ if (gpu)
+ kref_put(&gpu->ref, i915_gpu_coredump_free);
+}
+
static struct i915_vma_coredump *
i915_vma_coredump_create(const struct intel_gt *gt,
const struct i915_vma_resource *vma_res,
@@ -305,23 +305,11 @@ void i915_vma_capture_finish(struct intel_gt_coredump *gt,
void i915_error_state_store(struct i915_gpu_coredump *error);
-static inline struct i915_gpu_coredump *
-i915_gpu_coredump_get(struct i915_gpu_coredump *gpu)
-{
- kref_get(&gpu->ref);
- return gpu;
-}
-
ssize_t
i915_gpu_coredump_copy_to_buffer(struct i915_gpu_coredump *error,
char *buf, loff_t offset, size_t count);
-void __i915_gpu_coredump_free(struct kref *kref);
-static inline void i915_gpu_coredump_put(struct i915_gpu_coredump *gpu)
-{
- if (gpu)
- kref_put(&gpu->ref, __i915_gpu_coredump_free);
-}
+void i915_gpu_coredump_put(struct i915_gpu_coredump *gpu);
void i915_reset_error_state(struct drm_i915_private *i915);
void i915_disable_error_state(struct drm_i915_private *i915, int err);
Also make i915_gpu_coredump_get() static, as it's not used outside of i915_gpu_error.h. Signed-off-by: Jani Nikula <jani.nikula@intel.com> --- drivers/gpu/drm/i915/i915_gpu_error.c | 14 +++++++++++++- drivers/gpu/drm/i915/i915_gpu_error.h | 14 +------------- 2 files changed, 14 insertions(+), 14 deletions(-)