]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
lightnvm: pblk: refactor pblk_ppa_comp function
authorMatias Bjørling <m@bjorling.me>
Fri, 5 Jan 2018 13:16:21 +0000 (14:16 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 5 Jan 2018 15:50:12 +0000 (08:50 -0700)
Shorten function to simply return the value of the if statement.

Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/pblk.h

index 8af374ee54c5d9adfd6d9d565e8f0f5217c7118e..8c357fb6538e3ec4081b3975e65be18151f08892 100644 (file)
@@ -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)