qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] physmem: replace function name with __func__ in ram_block_di


From: David Hildenbrand
Subject: Re: [PATCH] physmem: replace function name with __func__ in ram_block_discard_range()
Date: Thu, 25 Jan 2024 09:22:30 +0100
User-agent: Mozilla Thunderbird

On 25.01.24 06:06, Philippe Mathieu-Daudé wrote:
Hi,

On 25/1/24 03:33, Xiaoyao Li wrote:
Use __func__ to avoid hard-coded function name.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
---
   system/physmem.c | 38 +++++++++++++++++---------------------
   1 file changed, 17 insertions(+), 21 deletions(-)


       if ((start + length) <= rb->max_length) {
           bool need_madvise, need_fallocate;
           if (!QEMU_IS_ALIGNED(length, rb->page_size)) {
-            error_report("ram_block_discard_range: Unaligned length: %zx",
-                         length);
+            error_report("%s: Unaligned length: %zx", __func__, length);

Pre-existing, should we enforce 0x prefix for %*x format?

Likely yes, but then, most of these errors here are more similar to assertions that we never ever see unless we have real bugs in QEMU. So I wouldn't lose sleep over it.

--
Cheers,

David / dhildenb




reply via email to

[Prev in Thread] Current Thread [Next in Thread]