[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/5] block: simplify bdrv_child_user_desc()
From: |
Alberto Garcia |
Subject: |
Re: [PATCH v2 4/5] block: simplify bdrv_child_user_desc() |
Date: |
Mon, 10 May 2021 17:33:39 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Tue 04 May 2021 11:45:09 AM CEST, Vladimir Sementsov-Ogievskiy
<vsementsov@virtuozzo.com> wrote:
> All existing parent types (block nodes, block devices, jobs) has the
> realization. So, drop unreachable code.
s/has/have/ , and I'm not sure what "have the realization" means
> 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);
> }
Should we also assert(c->klass->get_parent_desc) ?
Berto
[PATCH v2 1/5] block: document child argument of bdrv_attach_child_common(), Vladimir Sementsov-Ogievskiy, 2021/05/04
[PATCH v2 2/5] block-backend: improve blk_root_get_parent_desc(), Vladimir Sementsov-Ogievskiy, 2021/05/04