Skip to contentSkip to conversation

mm: vmalloc: Simplify return boolean expression

PATCH New Uladzislau Rezki (Sony) 1 participant 1 message Oct 20, 2022

Subsystems (2)
lore
Share & tools
lore

Uladzislau Rezki (Sony)

author maintainer
#0 lore raw

PATCH 1/1 mm: vmalloc: Simplify return boolean expression

A return expression of the __purge_vmap_area_lazy() function can be simplified. Basically a boolean expression anyway is converted to boolean values either to true or false.

---
 mm/vmalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/vmalloc.c +1 -1
index bd56f68bedf0..0685b477c71b 100644
@@ -1787,7 +1787,7 @@ static bool __purge_vmap_area_lazy(unsigned long start, unsigned long end)
 
 out:
 	trace_purge_vmap_area_lazy(start, end, num_purged_areas);
-	return num_purged_areas > 0 ? true:false;
+	return num_purged_areas > 0;
 }
 
 /*
Signature · 1 line
2.30.2