summaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm/pblk.h
diff options
context:
space:
mode:
authorMatias Bjørling <m@bjorling.me>2018-01-05 14:16:21 +0100
committerJens Axboe <axboe@kernel.dk>2018-01-05 08:50:12 -0700
commit8b7bc849889d36572af5c6e3c3b2ad4b19a81be7 (patch)
tree9f251824dd02097a6ced400d221a42181014b614 /drivers/lightnvm/pblk.h
parent998ba62973132e886b0411f00bc66fbb31507e84 (diff)
downloadblackbird-op-linux-8b7bc849889d36572af5c6e3c3b2ad4b19a81be7.tar.gz
blackbird-op-linux-8b7bc849889d36572af5c6e3c3b2ad4b19a81be7.zip
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/pblk.h')
-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)
OpenPOWER on IntegriCloud