diff options
author | Heinz Mauelshagen <heinzm@redhat.com> | 2023-02-07 20:35:25 +0100 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2023-02-14 14:23:07 -0500 |
commit | 1c3fe2fa946342a784a1375a63be6eb5a25acd76 (patch) | |
tree | ff3144c87bb004de96df6a91ac18c790cf0edcec /drivers/md/persistent-data | |
parent | ae99111ecf70c3003b4b1ba38b95fbe35410b2a6 (diff) | |
download | linux-1c3fe2fa946342a784a1375a63be6eb5a25acd76.tar.gz linux-1c3fe2fa946342a784a1375a63be6eb5a25acd76.tar.bz2 linux-1c3fe2fa946342a784a1375a63be6eb5a25acd76.zip |
dm: avoid useless 'else' after 'break' or return'
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md/persistent-data')
-rw-r--r-- | drivers/md/persistent-data/dm-btree.c | 4 | ||||
-rw-r--r-- | drivers/md/persistent-data/dm-space-map-common.c | 11 |
2 files changed, 7 insertions, 8 deletions
diff --git a/drivers/md/persistent-data/dm-btree.c b/drivers/md/persistent-data/dm-btree.c index f4c63060ea27..bb8b34ffeafc 100644 --- a/drivers/md/persistent-data/dm-btree.c +++ b/drivers/md/persistent-data/dm-btree.c @@ -1352,8 +1352,8 @@ static int find_key(struct ro_spine *s, dm_block_t block, bool find_highest, i = le32_to_cpu(ro_node(s)->header.nr_entries); if (!i) return -ENODATA; - else - i--; + + i--; if (find_highest) *result_key = le64_to_cpu(ro_node(s)->keys[i]); diff --git a/drivers/md/persistent-data/dm-space-map-common.c b/drivers/md/persistent-data/dm-space-map-common.c index e927ed853215..591d1a43d035 100644 --- a/drivers/md/persistent-data/dm-space-map-common.c +++ b/drivers/md/persistent-data/dm-space-map-common.c @@ -793,13 +793,12 @@ static int __sm_ll_dec_overflow(struct ll_disk *ll, dm_block_t b, rc = le32_to_cpu(*v_ptr); *old_rc = rc; - if (rc == 3) { + if (rc == 3) return __sm_ll_del_overflow(ll, b, ic); - } else { - rc--; - *v_ptr = cpu_to_le32(rc); - return 0; - } + + rc--; + *v_ptr = cpu_to_le32(rc); + return 0; } static int sm_ll_dec_overflow(struct ll_disk *ll, dm_block_t b, |