linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] mm: vmalloc: Simplify return boolean expression
@ 2022-10-20 12:52 Uladzislau Rezki (Sony)
  0 siblings, 0 replies; only message in thread
From: Uladzislau Rezki (Sony) @ 2022-10-20 12:52 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, LKML, Christoph Hellwig, Matthew Wilcox,
	Nicholas Piggin, Uladzislau Rezki, Oleksiy Avramchenko

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.

Suggested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
---
 mm/vmalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index bd56f68bedf0..0685b477c71b 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -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;
 }
 
 /*
-- 
2.30.2



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-20 12:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-20 12:52 [PATCH 1/1] mm: vmalloc: Simplify return boolean expression Uladzislau Rezki (Sony)

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