dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/gem: Make drop_pages() return bool
@ 2022-05-03  6:15 Lucas De Marchi
  2022-05-03  8:22 ` Das, Nirmoy
  0 siblings, 1 reply; 2+ messages in thread
From: Lucas De Marchi @ 2022-05-03  6:15 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Lucas De Marchi, Niranjana Vishwanathapura

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(-)

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;
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/i915/gem: Make drop_pages() return bool
  2022-05-03  6:15 [PATCH] drm/i915/gem: Make drop_pages() return bool Lucas De Marchi
@ 2022-05-03  8:22 ` Das, Nirmoy
  0 siblings, 0 replies; 2+ messages in thread
From: Das, Nirmoy @ 2022-05-03  8:22 UTC (permalink / raw)
  To: Lucas De Marchi, intel-gfx, dri-devel; +Cc: Niranjana Vishwanathapura


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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-03  8:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-03  6:15 [PATCH] drm/i915/gem: Make drop_pages() return bool Lucas De Marchi
2022-05-03  8:22 ` Das, Nirmoy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox