linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] md/persistent-data: exit_ro_spine func return void
@ 2020-04-15 11:57 Zhiqiang Liu
  2020-04-21  1:11 ` Zhiqiang Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Zhiqiang Liu @ 2020-04-15 11:57 UTC (permalink / raw)
  To: agk, snitzer, dm-devel, linux-kernel
  Cc: linfeilong, Mingfangsen, wubo (T), Yanxiaodan

From: Zhiqiang Liu <liuzhiqiang26@huawei.com>

In commit 4c7da06f5a78 ("dm persistent data: eliminate unnecessary return values"),
r value in exit_ro_spine will not changes, so exit_ro_spine donot need
to return values.

Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
---
 drivers/md/persistent-data/dm-btree-internal.h | 2 +-
 drivers/md/persistent-data/dm-btree-spine.c    | 6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/md/persistent-data/dm-btree-internal.h b/drivers/md/persistent-data/dm-btree-internal.h
index a240990a7f33..55a4096f1334 100644
--- a/drivers/md/persistent-data/dm-btree-internal.h
+++ b/drivers/md/persistent-data/dm-btree-internal.h
@@ -68,7 +68,7 @@ struct ro_spine {
 };

 void init_ro_spine(struct ro_spine *s, struct dm_btree_info *info);
-int exit_ro_spine(struct ro_spine *s);
+void exit_ro_spine(struct ro_spine *s);
 int ro_step(struct ro_spine *s, dm_block_t new_child);
 void ro_pop(struct ro_spine *s);
 struct btree_node *ro_node(struct ro_spine *s);
diff --git a/drivers/md/persistent-data/dm-btree-spine.c b/drivers/md/persistent-data/dm-btree-spine.c
index b27b8091a1ca..e03cb9e48773 100644
--- a/drivers/md/persistent-data/dm-btree-spine.c
+++ b/drivers/md/persistent-data/dm-btree-spine.c
@@ -132,15 +132,13 @@ void init_ro_spine(struct ro_spine *s, struct dm_btree_info *info)
 	s->nodes[1] = NULL;
 }

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

 	for (i = 0; i < s->count; i++) {
 		unlock_block(s->info, s->nodes[i]);
 	}
-
-	return r;
 }

 int ro_step(struct ro_spine *s, dm_block_t new_child)
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] md/persistent-data: exit_ro_spine func return void
  2020-04-15 11:57 [PATCH] md/persistent-data: exit_ro_spine func return void Zhiqiang Liu
@ 2020-04-21  1:11 ` Zhiqiang Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Zhiqiang Liu @ 2020-04-21  1:11 UTC (permalink / raw)
  To: agk, snitzer, dm-devel, linux-kernel
  Cc: linfeilong, Mingfangsen, wubo (T), Yanxiaodan

Friendly ping..

On 2020/4/15 19:57, Zhiqiang Liu wrote:
> From: Zhiqiang Liu <liuzhiqiang26@huawei.com>
> 
> In commit 4c7da06f5a78 ("dm persistent data: eliminate unnecessary return values"),
> r value in exit_ro_spine will not changes, so exit_ro_spine donot need
> to return values.
> 
> Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
> ---
>  drivers/md/persistent-data/dm-btree-internal.h | 2 +-
>  drivers/md/persistent-data/dm-btree-spine.c    | 6 ++----
>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/md/persistent-data/dm-btree-internal.h b/drivers/md/persistent-data/dm-btree-internal.h
> index a240990a7f33..55a4096f1334 100644
> --- a/drivers/md/persistent-data/dm-btree-internal.h
> +++ b/drivers/md/persistent-data/dm-btree-internal.h
> @@ -68,7 +68,7 @@ struct ro_spine {
>  };
> 
>  void init_ro_spine(struct ro_spine *s, struct dm_btree_info *info);
> -int exit_ro_spine(struct ro_spine *s);
> +void exit_ro_spine(struct ro_spine *s);
>  int ro_step(struct ro_spine *s, dm_block_t new_child);
>  void ro_pop(struct ro_spine *s);
>  struct btree_node *ro_node(struct ro_spine *s);
> diff --git a/drivers/md/persistent-data/dm-btree-spine.c b/drivers/md/persistent-data/dm-btree-spine.c
> index b27b8091a1ca..e03cb9e48773 100644
> --- a/drivers/md/persistent-data/dm-btree-spine.c
> +++ b/drivers/md/persistent-data/dm-btree-spine.c
> @@ -132,15 +132,13 @@ void init_ro_spine(struct ro_spine *s, struct dm_btree_info *info)
>  	s->nodes[1] = NULL;
>  }
> 
> -int exit_ro_spine(struct ro_spine *s)
> +void exit_ro_spine(struct ro_spine *s)
>  {
> -	int r = 0, i;
> +	int i;
> 
>  	for (i = 0; i < s->count; i++) {
>  		unlock_block(s->info, s->nodes[i]);
>  	}
> -
> -	return r;
>  }
> 
>  int ro_step(struct ro_spine *s, dm_block_t new_child)
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-21  1:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15 11:57 [PATCH] md/persistent-data: exit_ro_spine func return void Zhiqiang Liu
2020-04-21  1:11 ` Zhiqiang Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).