Skip to content

Commit

Permalink
lightnvm: pblk: refactor pblk_ppa_comp function
Browse files Browse the repository at this point in the history
Shorten function to simply return the value of the if statement.

Signed-off-by: Matias Bjørling <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
MatiasBjorling authored and axboe committed Jan 5, 2018
1 parent 998ba62 commit 8b7bc84
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/lightnvm/pblk.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8b7bc84

Please sign in to comment.