[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 14/27] qapi migration: Elide redundant has_FOO in generated C
From: |
Markus Armbruster |
Subject: |
Re: [PATCH 14/27] qapi migration: Elide redundant has_FOO in generated C |
Date: |
Thu, 22 Sep 2022 15:36:12 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
> On Thu, Sep 15, 2022 at 10:52 PM Markus Armbruster <armbru@redhat.com> wrote:
>>
>> The has_FOO for pointer-valued FOO are redundant, except for arrays.
>> They are also a nuisance to work with. Recent commit "qapi: Start to
>> elide redundant has_FOO in generated C" provided the means to elide
>> them step by step. This is the step for qapi/migration.json.
>>
>> Said commit explains the transformation in more detail. The invariant
>> violations mentioned there do not occur here.
>>
>> Cc: Juan Quintela <quintela@redhat.com>
>> Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> ---
>> migration/block-dirty-bitmap.c | 4 ++--
>> migration/colo.c | 1 -
>> migration/migration.c | 27 ++++++++-------------------
>> monitor/hmp-cmds.c | 26 +++++++++++---------------
>> monitor/misc.c | 2 +-
>> scripts/qapi/schema.py | 1 -
>> 6 files changed, 22 insertions(+), 39 deletions(-)
>
>> @@ -1556,7 +1548,7 @@ static bool migrate_params_check(MigrationParameters
>> *params, Error **errp)
>> #ifdef CONFIG_LINUX
>> if (migrate_use_zero_copy_send() &&
>> ((params->has_multifd_compression && params->multifd_compression) ||
>> - (params->has_tls_creds && params->tls_creds &&
>> *params->tls_creds))) {
>> + (params->tls_creds && params->tls_creds && *params->tls_creds))) {
>> error_setg(errp,
>> "Zero copy only available for non-compressed non-TLS
>> multifd migration");
>> return false;
>
> Checking params->tls_creds once should be enough ;)
Can't deny that!
Will tidy up, thanks!
- Re: [PATCH 04/27] qapi: Start to elide redundant has_FOO in generated C, (continued)
- [PATCH 19/27] qapi replay: Elide redundant has_FOO in generated C, Markus Armbruster, 2022/09/15
- [PATCH 08/27] qapi block: Elide redundant has_FOO in generated C, Markus Armbruster, 2022/09/15
- [PATCH 15/27] qapi misc: Elide redundant has_FOO in generated C, Markus Armbruster, 2022/09/15
- [PATCH 07/27] qapi audio: Elide redundant has_FOO in generated C, Markus Armbruster, 2022/09/15
- [PATCH 14/27] qapi migration: Elide redundant has_FOO in generated C, Markus Armbruster, 2022/09/15
- [PATCH 03/27] docs/devel/qapi-code-gen: Extend example for next commit's change, Markus Armbruster, 2022/09/15
- [PATCH 21/27] qapi run-state: Elide redundant has_FOO in generated C, Markus Armbruster, 2022/09/15
- [PATCH 24/27] qapi transaction: Elide redundant has_FOO in generated C, Markus Armbruster, 2022/09/15
- [PATCH 12/27] qapi job: Elide redundant has_FOO in generated C, Markus Armbruster, 2022/09/15
- [PATCH 18/27] qapi qdev qom: Elide redundant has_FOO in generated C, Markus Armbruster, 2022/09/15
- [PATCH 16/27] qapi net: Elide redundant has_FOO in generated C, Markus Armbruster, 2022/09/15
- [PATCH 23/27] qapi tpm: Elide redundant has_FOO in generated C, Markus Armbruster, 2022/09/15