* [PATCH] migration: fix bad indentation in error_report()
@ 2020-03-27 8:12 Mao Zhongyi
2020-03-27 11:41 ` Dr. David Alan Gilbert
0 siblings, 1 reply; 3+ messages in thread
From: Mao Zhongyi @ 2020-03-27 8:12 UTC (permalink / raw)
To: qemu-devel; +Cc: dgilbert, Mao Zhongyi, quintela
bad indentation conflicts with CODING_STYLE doc.
Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
---
migration/migration.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index c4c9aee15e..aa43137bd2 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1203,15 +1203,15 @@ static bool migrate_params_check(MigrationParameters *params, Error **errp)
if (params->has_max_bandwidth && (params->max_bandwidth > SIZE_MAX)) {
error_setg(errp, "Parameter 'max_bandwidth' expects an integer in the"
- " range of 0 to %zu bytes/second", SIZE_MAX);
+ " range of 0 to %zu bytes/second", SIZE_MAX);
return false;
}
if (params->has_downtime_limit &&
(params->downtime_limit > MAX_MIGRATE_DOWNTIME)) {
error_setg(errp, "Parameter 'downtime_limit' expects an integer in "
- "the range of 0 to %d milliseconds",
- MAX_MIGRATE_DOWNTIME);
+ "the range of 0 to %d milliseconds",
+ MAX_MIGRATE_DOWNTIME);
return false;
}
@@ -2109,8 +2109,8 @@ void qmp_migrate_set_downtime(double value, Error **errp)
{
if (value < 0 || value > MAX_MIGRATE_DOWNTIME_SECONDS) {
error_setg(errp, "Parameter 'downtime_limit' expects an integer in "
- "the range of 0 to %d seconds",
- MAX_MIGRATE_DOWNTIME_SECONDS);
+ "the range of 0 to %d seconds",
+ MAX_MIGRATE_DOWNTIME_SECONDS);
return;
}
@@ -2495,7 +2495,7 @@ retry:
if (header_type >= MIG_RP_MSG_MAX ||
header_type == MIG_RP_MSG_INVALID) {
error_report("RP: Received invalid message 0x%04x length 0x%04x",
- header_type, header_len);
+ header_type, header_len);
mark_source_rp_bad(ms);
goto out;
}
@@ -2504,9 +2504,9 @@ retry:
header_len != rp_cmd_args[header_type].len) ||
header_len > sizeof(buf)) {
error_report("RP: Received '%s' message (0x%04x) with"
- "incorrect length %d expecting %zu",
- rp_cmd_args[header_type].name, header_type, header_len,
- (size_t)rp_cmd_args[header_type].len);
+ "incorrect length %d expecting %zu",
+ rp_cmd_args[header_type].name, header_type, header_len,
+ (size_t)rp_cmd_args[header_type].len);
mark_source_rp_bad(ms);
goto out;
}
@@ -2561,7 +2561,7 @@ retry:
}
if (header_len != expected_len) {
error_report("RP: Req_Page_id with length %d expecting %zd",
- header_len, expected_len);
+ header_len, expected_len);
mark_source_rp_bad(ms);
goto out;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] migration: fix bad indentation in error_report()
2020-03-27 8:12 [PATCH] migration: fix bad indentation in error_report() Mao Zhongyi
@ 2020-03-27 11:41 ` Dr. David Alan Gilbert
2020-03-27 17:16 ` maozy
0 siblings, 1 reply; 3+ messages in thread
From: Dr. David Alan Gilbert @ 2020-03-27 11:41 UTC (permalink / raw)
To: Mao Zhongyi; +Cc: qemu-devel, quintela
* Mao Zhongyi (maozhongyi@cmss.chinamobile.com) wrote:
> bad indentation conflicts with CODING_STYLE doc.
>
> Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
> ---
> migration/migration.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index c4c9aee15e..aa43137bd2 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -1203,15 +1203,15 @@ static bool migrate_params_check(MigrationParameters *params, Error **errp)
>
> if (params->has_max_bandwidth && (params->max_bandwidth > SIZE_MAX)) {
> error_setg(errp, "Parameter 'max_bandwidth' expects an integer in the"
> - " range of 0 to %zu bytes/second", SIZE_MAX);
> + " range of 0 to %zu bytes/second", SIZE_MAX);
No, where a parameter crosses multiple lines, it is clearer to line up
the continuation of the parameter with the parameter above.
> return false;
> }
>
> if (params->has_downtime_limit &&
> (params->downtime_limit > MAX_MIGRATE_DOWNTIME)) {
> error_setg(errp, "Parameter 'downtime_limit' expects an integer in "
> - "the range of 0 to %d milliseconds",
> - MAX_MIGRATE_DOWNTIME);
> + "the range of 0 to %d milliseconds",
> + MAX_MIGRATE_DOWNTIME);
same as above.
> return false;
> }
>
> @@ -2109,8 +2109,8 @@ void qmp_migrate_set_downtime(double value, Error **errp)
> {
> if (value < 0 || value > MAX_MIGRATE_DOWNTIME_SECONDS) {
> error_setg(errp, "Parameter 'downtime_limit' expects an integer in "
> - "the range of 0 to %d seconds",
> - MAX_MIGRATE_DOWNTIME_SECONDS);
> + "the range of 0 to %d seconds",
> + MAX_MIGRATE_DOWNTIME_SECONDS);
same as above.
> return;
> }
>
> @@ -2495,7 +2495,7 @@ retry:
> if (header_type >= MIG_RP_MSG_MAX ||
> header_type == MIG_RP_MSG_INVALID) {
> error_report("RP: Received invalid message 0x%04x length 0x%04x",
> - header_type, header_len);
> + header_type, header_len);
OK, yes that's better.
> mark_source_rp_bad(ms);
> goto out;
> }
> @@ -2504,9 +2504,9 @@ retry:
> header_len != rp_cmd_args[header_type].len) ||
> header_len > sizeof(buf)) {
> error_report("RP: Received '%s' message (0x%04x) with"
> - "incorrect length %d expecting %zu",
> - rp_cmd_args[header_type].name, header_type, header_len,
> - (size_t)rp_cmd_args[header_type].len);
> + "incorrect length %d expecting %zu",
> + rp_cmd_args[header_type].name, header_type, header_len,
> + (size_t)rp_cmd_args[header_type].len);
OK.
> mark_source_rp_bad(ms);
> goto out;
> }
> @@ -2561,7 +2561,7 @@ retry:
> }
> if (header_len != expected_len) {
> error_report("RP: Req_Page_id with length %d expecting %zd",
> - header_len, expected_len);
> + header_len, expected_len);
OK.
Dave
> mark_source_rp_bad(ms);
> goto out;
> }
> --
> 2.17.1
>
>
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] migration: fix bad indentation in error_report()
2020-03-27 11:41 ` Dr. David Alan Gilbert
@ 2020-03-27 17:16 ` maozy
0 siblings, 0 replies; 3+ messages in thread
From: maozy @ 2020-03-27 17:16 UTC (permalink / raw)
To: Dr. David Alan Gilbert; +Cc: qemu-devel, quintela
On 3/27/20 7:41 PM, Dr. David Alan Gilbert wrote:
> * Mao Zhongyi (maozhongyi@cmss.chinamobile.com) wrote:
>> bad indentation conflicts with CODING_STYLE doc.
>>
>> Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
>> ---
>> migration/migration.c | 20 ++++++++++----------
>> 1 file changed, 10 insertions(+), 10 deletions(-)
>>
>> diff --git a/migration/migration.c b/migration/migration.c
>> index c4c9aee15e..aa43137bd2 100644
>> --- a/migration/migration.c
>> +++ b/migration/migration.c
>> @@ -1203,15 +1203,15 @@ static bool migrate_params_check(MigrationParameters *params, Error **errp)
>>
>> if (params->has_max_bandwidth && (params->max_bandwidth > SIZE_MAX)) {
>> error_setg(errp, "Parameter 'max_bandwidth' expects an integer in the"
>> - " range of 0 to %zu bytes/second", SIZE_MAX);
>> + " range of 0 to %zu bytes/second", SIZE_MAX);
>
> No, where a parameter crosses multiple lines, it is clearer to line up
> the continuation of the parameter with the parameter above.
Well, indeed. I got it, Thanks.
Mao
>
>> return false;
>> }
>>
>> if (params->has_downtime_limit &&
>> (params->downtime_limit > MAX_MIGRATE_DOWNTIME)) {
>> error_setg(errp, "Parameter 'downtime_limit' expects an integer in "
>> - "the range of 0 to %d milliseconds",
>> - MAX_MIGRATE_DOWNTIME);
>> + "the range of 0 to %d milliseconds",
>> + MAX_MIGRATE_DOWNTIME);
>
> same as above.
>
>> return false;
>> }
>>
>> @@ -2109,8 +2109,8 @@ void qmp_migrate_set_downtime(double value, Error **errp)
>> {
>> if (value < 0 || value > MAX_MIGRATE_DOWNTIME_SECONDS) {
>> error_setg(errp, "Parameter 'downtime_limit' expects an integer in "
>> - "the range of 0 to %d seconds",
>> - MAX_MIGRATE_DOWNTIME_SECONDS);
>> + "the range of 0 to %d seconds",
>> + MAX_MIGRATE_DOWNTIME_SECONDS);
>
> same as above.
>
>> return;
>> }
>>
>> @@ -2495,7 +2495,7 @@ retry:
>> if (header_type >= MIG_RP_MSG_MAX ||
>> header_type == MIG_RP_MSG_INVALID) {
>> error_report("RP: Received invalid message 0x%04x length 0x%04x",
>> - header_type, header_len);
>> + header_type, header_len);
>
> OK, yes that's better.
>
>> mark_source_rp_bad(ms);
>> goto out;
>> }
>> @@ -2504,9 +2504,9 @@ retry:
>> header_len != rp_cmd_args[header_type].len) ||
>> header_len > sizeof(buf)) {
>> error_report("RP: Received '%s' message (0x%04x) with"
>> - "incorrect length %d expecting %zu",
>> - rp_cmd_args[header_type].name, header_type, header_len,
>> - (size_t)rp_cmd_args[header_type].len);
>> + "incorrect length %d expecting %zu",
>> + rp_cmd_args[header_type].name, header_type, header_len,
>> + (size_t)rp_cmd_args[header_type].len);
>
> OK.
>
>> mark_source_rp_bad(ms);
>> goto out;
>> }
>> @@ -2561,7 +2561,7 @@ retry:
>> }
>> if (header_len != expected_len) {
>> error_report("RP: Req_Page_id with length %d expecting %zd",
>> - header_len, expected_len);
>> + header_len, expected_len);
>
> OK.
>
> Dave
>
>> mark_source_rp_bad(ms);
>> goto out;
>> }
>> --
>> 2.17.1
>>
>>
>>
> --
> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-27 17:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-27 8:12 [PATCH] migration: fix bad indentation in error_report() Mao Zhongyi
2020-03-27 11:41 ` Dr. David Alan Gilbert
2020-03-27 17:16 ` maozy
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).