diff options
author | Matias Bjørling <m@bjorling.me> | 2018-01-05 14:16:21 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-01-05 16:50:12 +0100 |
commit | 8b7bc849889d36572af5c6e3c3b2ad4b19a81be7 (patch) | |
tree | 9f251824dd02097a6ced400d221a42181014b614 /drivers/lightnvm | |
parent | lightnvm: pblk: add iostat support (diff) | |
download | linux-8b7bc849889d36572af5c6e3c3b2ad4b19a81be7.tar.xz 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')
-rw-r--r-- | drivers/lightnvm/pblk.h | 5 |
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) |