Thread (27 messages) 27 messages, 2 authors, 2017-12-28
STALE3094d

[PATCH 25/25] lightnvm: pblk: refactor pblk_ppa_comp function

From: Matias Bjørling <hidden>
Date: 2017-12-20 17:23:04
Also in: lkml
Subsystem: the rest · Maintainer: Linus Torvalds

Shorten function to simply return the value of the if statement.

Signed-off-by: Matias Bjørling <redacted>
---
 drivers/lightnvm/pblk.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h
index 1e9eafd..a1434da 100644
--- a/drivers/lightnvm/pblk.h
+++ b/drivers/lightnvm/pblk.h
@@ -1047,10 +1047,7 @@ static inline void pblk_ppa_set_empty(struct ppa_addr *ppa_addr)
 
 static inline bool pblk_ppa_comp(struct ppa_addr lppa, struct ppa_addr rppa)
 {
-	if (lppa.ppa == rppa.ppa)
-		return true;
-
-	return false;
+	return (lppa.ppa == rppa.ppa);
 }
 
 static inline int pblk_addr_in_cache(struct ppa_addr ppa)
-- 
2.9.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help