Skip to content

Commit 9431cf6

Browse files
ZhiqiangLiu26snitm
authored andcommitted
dm persistent data: switch exit_ro_spine to return void
In commit 4c7da06 ("dm persistent data: eliminate unnecessary return values"), r value in exit_ro_spine will not change, so exit_ro_spine doesn't need a return value. Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
1 parent a86fe8b commit 9431cf6

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

‎drivers/md/persistent-data/dm-btree-internal.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ struct ro_spine {
6868
};
6969

7070
void init_ro_spine(struct ro_spine *s, struct dm_btree_info *info);
71-
int exit_ro_spine(struct ro_spine *s);
71+
void exit_ro_spine(struct ro_spine *s);
7272
int ro_step(struct ro_spine *s, dm_block_t new_child);
7373
void ro_pop(struct ro_spine *s);
7474
struct btree_node *ro_node(struct ro_spine *s);

‎drivers/md/persistent-data/dm-btree-spine.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,13 @@ void init_ro_spine(struct ro_spine *s, struct dm_btree_info *info)
132132
s->nodes[1] = NULL;
133133
}
134134

135-
int exit_ro_spine(struct ro_spine *s)
135+
void exit_ro_spine(struct ro_spine *s)
136136
{
137-
int r = 0, i;
137+
int i;
138138

139139
for (i = 0; i < s->count; i++) {
140140
unlock_block(s->info, s->nodes[i]);
141141
}
142-
143-
return r;
144142
}
145143

146144
int ro_step(struct ro_spine *s, dm_block_t new_child)

0 commit comments

Comments
 (0)