diff mbox series

drm/i915/gem: Make drop_pages() return bool

Message ID 20220503061556.513175-1-lucas.demarchi@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/gem: Make drop_pages() return bool | expand

Commit Message

Lucas De Marchi May 3, 2022, 6:15 a.m. UTC
Commit e4e806253003 ("drm/i915: Change shrink ordering to use locking
around unbinding.") changed the return type to int without changing the
return values or their meaning to "0 is success". Move it back to
boolean.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nirmoy Das May 3, 2022, 8:22 a.m. UTC | #1
On 5/3/2022 8:15 AM, Lucas De Marchi wrote:
> Commit e4e806253003 ("drm/i915: Change shrink ordering to use locking
> around unbinding.") changed the return type to int without changing the
> return values or their meaning to "0 is success". Move it back to
> boolean.
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>


Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>

> ---
>   drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> index 6a6ff98a8746..1030053571a2 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> @@ -36,7 +36,7 @@ static bool can_release_pages(struct drm_i915_gem_object *obj)
>   	return swap_available() || obj->mm.madv == I915_MADV_DONTNEED;
>   }
>   
> -static int drop_pages(struct drm_i915_gem_object *obj,
> +static bool drop_pages(struct drm_i915_gem_object *obj,
>   		       unsigned long shrink, bool trylock_vm)
>   {
>   	unsigned long flags;
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
index 6a6ff98a8746..1030053571a2 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
@@ -36,7 +36,7 @@  static bool can_release_pages(struct drm_i915_gem_object *obj)
 	return swap_available() || obj->mm.madv == I915_MADV_DONTNEED;
 }
 
-static int drop_pages(struct drm_i915_gem_object *obj,
+static bool drop_pages(struct drm_i915_gem_object *obj,
 		       unsigned long shrink, bool trylock_vm)
 {
 	unsigned long flags;