Skip to content

Commit

Permalink
drm/i915: Remove return type from i915_drm_client_remove_object
Browse files Browse the repository at this point in the history
There is no need to return anything in the version which was merged and
also the implementation of the !CONFIG_PROC_FS wasn't returning anything,
causing a build failure there.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: e4ae85e ("drm/i915: Add ability for tracking buffer objects per client")
Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311110104.8TlHVxUI-lkp@intel.com/
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231113085457.199053-1-tvrtko.ursulin@linux.intel.com
  • Loading branch information
Tvrtko Ursulin committed Nov 20, 2023
1 parent 3c7a5eb commit 44eea8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 2 additions & 4 deletions drivers/gpu/drm/i915/i915_drm_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,22 +191,20 @@ void i915_drm_client_add_object(struct i915_drm_client *client,
spin_unlock_irqrestore(&client->objects_lock, flags);
}

bool i915_drm_client_remove_object(struct drm_i915_gem_object *obj)
void i915_drm_client_remove_object(struct drm_i915_gem_object *obj)
{
struct i915_drm_client *client = fetch_and_zero(&obj->client);
unsigned long flags;

/* Object may not be associated with a client. */
if (!client)
return false;
return;

spin_lock_irqsave(&client->objects_lock, flags);
list_del_rcu(&obj->client_link);
spin_unlock_irqrestore(&client->objects_lock, flags);

i915_drm_client_put(client);

return true;
}

void i915_drm_client_add_context_objects(struct i915_drm_client *client,
Expand Down
5 changes: 3 additions & 2 deletions drivers/gpu/drm/i915/i915_drm_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void i915_drm_client_fdinfo(struct drm_printer *p, struct drm_file *file);
#ifdef CONFIG_PROC_FS
void i915_drm_client_add_object(struct i915_drm_client *client,
struct drm_i915_gem_object *obj);
bool i915_drm_client_remove_object(struct drm_i915_gem_object *obj);
void i915_drm_client_remove_object(struct drm_i915_gem_object *obj);
void i915_drm_client_add_context_objects(struct i915_drm_client *client,
struct intel_context *ce);
#else
Expand All @@ -79,7 +79,8 @@ static inline void i915_drm_client_add_object(struct i915_drm_client *client,
{
}

static inline bool i915_drm_client_remove_object(struct drm_i915_gem_object *obj)
static inline void
i915_drm_client_remove_object(struct drm_i915_gem_object *obj)
{
}

Expand Down

0 comments on commit 44eea8d

Please sign in to comment.