summaryrefslogtreecommitdiff
path: root/drivers/lightnvm
diff options
context:
space:
mode:
authorMatias Bjørling <m@bjorling.me>2018-01-05 16:16:21 +0300
committerJens Axboe <axboe@kernel.dk>2018-01-05 18:50:12 +0300
commit8b7bc849889d36572af5c6e3c3b2ad4b19a81be7 (patch)
tree9f251824dd02097a6ced400d221a42181014b614 /drivers/lightnvm
parent998ba62973132e886b0411f00bc66fbb31507e84 (diff)
downloadlinux-8b7bc849889d36572af5c6e3c3b2ad4b19a81be7.tar.xz
lightnvm: pblk: refactor pblk_ppa_comp function
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>
Diffstat (limited to 'drivers/lightnvm')
-rw-r--r--drivers/lightnvm/pblk.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h
index 8af374ee54c5..8c357fb6538e 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)