* [PATCH] physmem: improve ram size error messages
@ 2020-10-22 11:13 Pankaj Gupta
2020-11-06 13:58 ` Pankaj Gupta
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Pankaj Gupta @ 2020-10-22 11:13 UTC (permalink / raw)
To: qemu-devel; +Cc: pbonzini, pankaj.gupta, Li Zhang, Pankaj Gupta
Ram size mismatch condition logs below message.
"Length mismatch: pc.ram: 0x80000000 in != 0x180000000: Invalid argument"
This patch improves the readability of error messages.
Removed the superflous "in" and changed "Length" to "Size".
Signed-off-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Reported-by: Li Zhang <li.zhang@cloud.ionos.com>
---
softmmu/physmem.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/softmmu/physmem.c b/softmmu/physmem.c
index e319fb2a1e..8da184f4a6 100644
--- a/softmmu/physmem.c
+++ b/softmmu/physmem.c
@@ -1756,15 +1756,15 @@ int qemu_ram_resize(RAMBlock *block, ram_addr_t newsize, Error **errp)
if (!(block->flags & RAM_RESIZEABLE)) {
error_setg_errno(errp, EINVAL,
- "Length mismatch: %s: 0x" RAM_ADDR_FMT
- " in != 0x" RAM_ADDR_FMT, block->idstr,
+ "Size mismatch: %s: 0x" RAM_ADDR_FMT
+ " != 0x" RAM_ADDR_FMT, block->idstr,
newsize, block->used_length);
return -EINVAL;
}
if (block->max_length < newsize) {
error_setg_errno(errp, EINVAL,
- "Length too large: %s: 0x" RAM_ADDR_FMT
+ "Size too large: %s: 0x" RAM_ADDR_FMT
" > 0x" RAM_ADDR_FMT, block->idstr,
newsize, block->max_length);
return -EINVAL;
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] physmem: improve ram size error messages
2020-10-22 11:13 [PATCH] physmem: improve ram size error messages Pankaj Gupta
@ 2020-11-06 13:58 ` Pankaj Gupta
2020-11-09 14:18 ` Philippe Mathieu-Daudé
2020-11-09 14:24 ` Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Pankaj Gupta @ 2020-11-06 13:58 UTC (permalink / raw)
To: Qemu Developers
Cc: Paolo Bonzini, Pankaj Gupta, Philippe Mathieu-Daudé, Li Zhang
Ping
> Ram size mismatch condition logs below message.
>
> "Length mismatch: pc.ram: 0x80000000 in != 0x180000000: Invalid argument"
>
> This patch improves the readability of error messages.
> Removed the superflous "in" and changed "Length" to "Size".
>
> Signed-off-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
> Reported-by: Li Zhang <li.zhang@cloud.ionos.com>
> ---
> softmmu/physmem.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/softmmu/physmem.c b/softmmu/physmem.c
> index e319fb2a1e..8da184f4a6 100644
> --- a/softmmu/physmem.c
> +++ b/softmmu/physmem.c
> @@ -1756,15 +1756,15 @@ int qemu_ram_resize(RAMBlock *block, ram_addr_t newsize, Error **errp)
>
> if (!(block->flags & RAM_RESIZEABLE)) {
> error_setg_errno(errp, EINVAL,
> - "Length mismatch: %s: 0x" RAM_ADDR_FMT
> - " in != 0x" RAM_ADDR_FMT, block->idstr,
> + "Size mismatch: %s: 0x" RAM_ADDR_FMT
> + " != 0x" RAM_ADDR_FMT, block->idstr,
> newsize, block->used_length);
> return -EINVAL;
> }
>
> if (block->max_length < newsize) {
> error_setg_errno(errp, EINVAL,
> - "Length too large: %s: 0x" RAM_ADDR_FMT
> + "Size too large: %s: 0x" RAM_ADDR_FMT
> " > 0x" RAM_ADDR_FMT, block->idstr,
> newsize, block->max_length);
> return -EINVAL;
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] physmem: improve ram size error messages
2020-10-22 11:13 [PATCH] physmem: improve ram size error messages Pankaj Gupta
2020-11-06 13:58 ` Pankaj Gupta
@ 2020-11-09 14:18 ` Philippe Mathieu-Daudé
2020-11-09 14:24 ` Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-11-09 14:18 UTC (permalink / raw)
To: Pankaj Gupta, qemu-devel; +Cc: pbonzini, pankaj.gupta, Li Zhang
On 10/22/20 1:13 PM, Pankaj Gupta wrote:
> Ram size mismatch condition logs below message.
>
> "Length mismatch: pc.ram: 0x80000000 in != 0x180000000: Invalid argument"
>
> This patch improves the readability of error messages.
> Removed the superflous "in" and changed "Length" to "Size".
>
> Signed-off-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
> Reported-by: Li Zhang <li.zhang@cloud.ionos.com>
> ---
> softmmu/physmem.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] physmem: improve ram size error messages
2020-10-22 11:13 [PATCH] physmem: improve ram size error messages Pankaj Gupta
2020-11-06 13:58 ` Pankaj Gupta
2020-11-09 14:18 ` Philippe Mathieu-Daudé
@ 2020-11-09 14:24 ` Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2020-11-09 14:24 UTC (permalink / raw)
To: Pankaj Gupta, qemu-devel; +Cc: Li Zhang, pankaj.gupta
On 22/10/20 13:13, Pankaj Gupta wrote:
> Ram size mismatch condition logs below message.
>
> "Length mismatch: pc.ram: 0x80000000 in != 0x180000000: Invalid argument"
>
> This patch improves the readability of error messages.
> Removed the superflous "in" and changed "Length" to "Size".
>
> Signed-off-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
> Reported-by: Li Zhang <li.zhang@cloud.ionos.com>
> ---
> softmmu/physmem.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/softmmu/physmem.c b/softmmu/physmem.c
> index e319fb2a1e..8da184f4a6 100644
> --- a/softmmu/physmem.c
> +++ b/softmmu/physmem.c
> @@ -1756,15 +1756,15 @@ int qemu_ram_resize(RAMBlock *block, ram_addr_t newsize, Error **errp)
>
> if (!(block->flags & RAM_RESIZEABLE)) {
> error_setg_errno(errp, EINVAL,
> - "Length mismatch: %s: 0x" RAM_ADDR_FMT
> - " in != 0x" RAM_ADDR_FMT, block->idstr,
> + "Size mismatch: %s: 0x" RAM_ADDR_FMT
> + " != 0x" RAM_ADDR_FMT, block->idstr,
> newsize, block->used_length);
> return -EINVAL;
> }
>
> if (block->max_length < newsize) {
> error_setg_errno(errp, EINVAL,
> - "Length too large: %s: 0x" RAM_ADDR_FMT
> + "Size too large: %s: 0x" RAM_ADDR_FMT
> " > 0x" RAM_ADDR_FMT, block->idstr,
> newsize, block->max_length);
> return -EINVAL;
>
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-09 14:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-22 11:13 [PATCH] physmem: improve ram size error messages Pankaj Gupta
2020-11-06 13:58 ` Pankaj Gupta
2020-11-09 14:18 ` Philippe Mathieu-Daudé
2020-11-09 14:24 ` Paolo Bonzini
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).