diff mbox series

[1/2] drm/i915: Remove return type from i915_drm_client_remove_object

Message ID 20231113085457.199053-1-tvrtko.ursulin@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/i915: Remove return type from i915_drm_client_remove_object | expand

Commit Message

Tvrtko Ursulin Nov. 13, 2023, 8:54 a.m. UTC
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

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: e4ae85e364fc ("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/
---
 drivers/gpu/drm/i915/i915_drm_client.c | 6 ++----
 drivers/gpu/drm/i915/i915_drm_client.h | 5 +++--
 2 files changed, 5 insertions(+), 6 deletions(-)

Comments

Jani Nikula Nov. 20, 2023, 10:03 a.m. UTC | #1
On Mon, 13 Nov 2023, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> 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: e4ae85e364fc ("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>

> ---
>  drivers/gpu/drm/i915/i915_drm_client.c | 6 ++----
>  drivers/gpu/drm/i915/i915_drm_client.h | 5 +++--
>  2 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drm_client.c b/drivers/gpu/drm/i915/i915_drm_client.c
> index 7efffdaa508d..be9acfd9410e 100644
> --- a/drivers/gpu/drm/i915/i915_drm_client.c
> +++ b/drivers/gpu/drm/i915/i915_drm_client.c
> @@ -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,
> diff --git a/drivers/gpu/drm/i915/i915_drm_client.h b/drivers/gpu/drm/i915/i915_drm_client.h
> index 69cedfcd3d69..a439dd789936 100644
> --- a/drivers/gpu/drm/i915/i915_drm_client.h
> +++ b/drivers/gpu/drm/i915/i915_drm_client.h
> @@ -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
> @@ -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)
>  {
>  }
Andi Shyti Nov. 20, 2023, 10:15 a.m. UTC | #2
Hi Tvrtko,

On Mon, Nov 13, 2023 at 08:54:56AM +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> 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: e4ae85e364fc ("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: Andi Shyti <andi.shyti@linux.intel.com>

Andi
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_drm_client.c b/drivers/gpu/drm/i915/i915_drm_client.c
index 7efffdaa508d..be9acfd9410e 100644
--- a/drivers/gpu/drm/i915/i915_drm_client.c
+++ b/drivers/gpu/drm/i915/i915_drm_client.c
@@ -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,
diff --git a/drivers/gpu/drm/i915/i915_drm_client.h b/drivers/gpu/drm/i915/i915_drm_client.h
index 69cedfcd3d69..a439dd789936 100644
--- a/drivers/gpu/drm/i915/i915_drm_client.h
+++ b/drivers/gpu/drm/i915/i915_drm_client.h
@@ -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
@@ -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)
 {
 }