Re: [PATCH 5/6] block: simplify bdrv_child_user_desc()

2021-05-04 Thread Vladimir Sementsov-Ogievskiy

03.05.2021 19:05, Alberto Garcia wrote:

On Mon 03 May 2021 01:34:01 PM CEST, Vladimir Sementsov-Ogievskiy 
 wrote:

All existing parent types (block nodes, block devices, jobs) has the
realization. So, drop unreachable code.

Signed-off-by: Vladimir Sementsov-Ogievskiy 


With the updated description that you propose in your reply to the
patch,


Hmm, is it answer to 4/6, not 5/6 ?



Reviewed-by: Alberto Garcia 

Berto




--
Best regards,
Vladimir



Re: [PATCH 5/6] block: simplify bdrv_child_user_desc()

2021-05-03 Thread Alberto Garcia
On Mon 03 May 2021 01:34:01 PM CEST, Vladimir Sementsov-Ogievskiy 
 wrote:
> All existing parent types (block nodes, block devices, jobs) has the
> realization. So, drop unreachable code.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy 

With the updated description that you propose in your reply to the
patch,

Reviewed-by: Alberto Garcia 

Berto



[PATCH 5/6] block: simplify bdrv_child_user_desc()

2021-05-03 Thread Vladimir Sementsov-Ogievskiy
All existing parent types (block nodes, block devices, jobs) has the
realization. So, drop unreachable code.

Signed-off-by: Vladimir Sementsov-Ogievskiy 
---
 block.c | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/block.c b/block.c
index 1de2365843..20efd7a7b0 100644
--- a/block.c
+++ b/block.c
@@ -2037,11 +2037,7 @@ bool bdrv_is_writable(BlockDriverState *bs)
 
 static char *bdrv_child_user_desc(BdrvChild *c)
 {
-if (c->klass->get_parent_desc) {
-return c->klass->get_parent_desc(c);
-}
-
-return g_strdup("another user");
+return c->klass->get_parent_desc(c);
 }
 
 static bool bdrv_a_allow_b(BdrvChild *a, BdrvChild *b, Error **errp)
-- 
2.29.2