qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Roman Kiryanov <rkir@google.com>, qemu-devel@nongnu.org
Cc: jansene@google.com, mett@google.com, jpcottin@google.com
Subject: Re: [PATCH 2/3] exec: avoid using C++ keywords in function parameters
Date: Wed, 19 Jun 2024 12:22:13 +0200	[thread overview]
Message-ID: <ee4149fd-890d-43c6-a7c0-0d6df63bbb2f@linaro.org> (raw)
In-Reply-To: <20240618224553.878869-1-rkir@google.com>

On 19/6/24 00:45, Roman Kiryanov wrote:
> to use the QEMU headers with a C++ compiler.
> 
> Google-Bug-Id: 331190993
> Change-Id: Ic4e49b9c791616bb22c973922772b0494706092c
> Signed-off-by: Roman Kiryanov <rkir@google.com>
> ---
>   include/exec/memory.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/exec/memory.h b/include/exec/memory.h
> index 1be58f694c..d7591a60d9 100644
> --- a/include/exec/memory.h
> +++ b/include/exec/memory.h
> @@ -945,7 +945,7 @@ struct MemoryListener {
>        * the current transaction.
>        */
>       void (*log_start)(MemoryListener *listener, MemoryRegionSection *section,
> -                      int old, int new);
> +                      int old_val, int new_val);
>   
>       /**
>        * @log_stop:
> @@ -964,7 +964,7 @@ struct MemoryListener {
>        * the current transaction.
>        */
>       void (*log_stop)(MemoryListener *listener, MemoryRegionSection *section,
> -                     int old, int new);
> +                     int old_val, int new_val);

OK but please keep the implementations in sync with the prototype
argument names:

accel/hvf/hvf-accel-ops.c:264: 
MemoryRegionSection *section, int old, int new)
accel/hvf/hvf-accel-ops.c:274: 
MemoryRegionSection *section, int old, int new)
accel/kvm/kvm-all.c:549:                          int old, int new)
accel/kvm/kvm-all.c:566:                          int old, int new)
hw/i386/xen/xen-hvm.c:430:                          int old, int new)
hw/i386/xen/xen-hvm.c:441:                         int old, int new)
hw/virtio/vhost.c:1070:                            int old, int new)
hw/virtio/vhost.c:1077:                           int old, int new)
include/exec/memory.h:948:                      int old, int new);
include/exec/memory.h:967:                     int old, int new);

See also:
target/arm/tcg/translate-a64.c:2161:        int new = a->imm * 3;
target/sparc/trace-events:23:sparc64_cpu_check_irqs_set_irq(unsigned int 
i, int old, int new) "Set CPU IRQ %d old=0x%x new=0x%x"
util/lockcnt.c:81:            int new = expected - 
QEMU_LOCKCNT_STATE_LOCKED + QEMU_LOCKCNT_STATE_WAITING;
util/trace-events:65:lockcnt_fast_path_attempt(const void *lockcnt, int 
expected, int new) "lockcnt %p fast path %d->%d"
util/trace-events:66:lockcnt_fast_path_success(const void *lockcnt, int 
expected, int new) "lockcnt %p fast path %d->%d succeeded"
util/trace-events:67:lockcnt_unlock_attempt(const void *lockcnt, int 
expected, int new) "lockcnt %p unlock %d->%d"
util/trace-events:68:lockcnt_unlock_success(const void *lockcnt, int 
expected, int new) "lockcnt %p unlock %d->%d succeeded"
util/trace-events:69:lockcnt_futex_wait_prepare(const void *lockcnt, int 
expected, int new) "lockcnt %p preparing slow path %d->%d"
util/trace-events:71:lockcnt_futex_wait_resume(const void *lockcnt, int 
new) "lockcnt %p after wait: %d"

and:
$ git grep -wE 'u?int(8|16|32|64)_t new'
hw/core/trace-events:28:clock_set(const char *clk, uint64_t old, 
uint64_t new) "'%s', %"PRIu64"Hz->%"PRIu64"Hz"
hw/display/trace-events:5:jazz_led_write(uint64_t addr, uint8_t new) 
"write addr=0x%"PRIx64": 0x%x"
hw/display/trace-events:14:g364fb_write(uint64_t addr, uint32_t new) 
"write addr=0x%"PRIx64": 0x%x"
hw/gpio/aspeed_gpio.c:276:    uint32_t new = value;
hw/ide/trace-events:70:ahci_check_irq(void *s, uint32_t old, uint32_t 
new) "ahci(%p): check irq 0x%08x --> 0x%08x"
hw/ide/trace-events:71:ahci_trigger_irq(void *s, int port, const char 
*name, uint32_t val, uint32_t old, uint32_t new, uint32_t effective) 
"ahci(%p)[%d]: trigger irq +%s (0x%08x); irqstat: 0x%08x --> 0x%08x; 
effective: 0x%08x"
hw/intc/aspeed_vic.c:47:    uint64_t new = (s->raw & s->enable);
hw/intc/imx_avic.c:63:    uint64_t new = s->pending & s->enabled;
hw/net/opencores_eth.c:304:        uint32_t old, uint32_t new)
hw/net/rocker/rocker.c:762:static void 
rocker_port_phys_enable_write(Rocker *r, uint64_t new)
hw/net/rocker/rocker_desc.c:252:bool desc_ring_set_head(DescRing *ring, 
uint32_t new)
hw/net/rocker/rocker_desc.h:35:bool desc_ring_set_head(DescRing *ring, 
uint32_t new);
hw/net/trace-events:208:e1000e_irq_clear(uint32_t offset, uint32_t old, 
uint32_t new) "Clearing interrupt register 0x%x: 0x%x --> 0x%x"
hw/net/trace-events:209:e1000e_irq_set(uint32_t offset, uint32_t old, 
uint32_t new) "Setting interrupt register 0x%x: 0x%x --> 0x%x"
hw/ssi/aspeed_smc.c:285: 
uint64_t new)
hw/timer/aspeed_timer.c:380:                                 uint8_t 
old, uint8_t new)
hw/timer/hpet.c:137:static uint64_t hpet_fixup_reg(uint64_t new, 
uint64_t old, uint64_t mask)
hw/timer/hpet.c:144:static int activating_bit(uint64_t old, uint64_t 
new, uint64_t mask)
hw/timer/hpet.c:149:static int deactivating_bit(uint64_t old, uint64_t 
new, uint64_t mask)
hw/usb/trace-events:82:usb_ehci_opreg_change(uint32_t addr, const char 
*str, uint32_t new, uint32_t old) "ch mmio 0x%04x [%s] = 0x%x (old: 0x%x)"
hw/usb/trace-events:85:usb_ehci_portsc_change(uint32_t addr, uint32_t 
port, uint32_t new, uint32_t old) "ch mmio 0x%04x [port %d] = 0x%x (old: 
0x%x)"
hw/virtio/trace-events:134:virtio_iommu_set_page_size_mask(const char 
*name, uint64_t old, uint64_t new) "mr=%s old_mask=0x%"PRIx64" 
new_mask=0x%"PRIx64
hw/virtio/virtio.c:2406:                                    uint16_t 
off_wrap, uint16_t new,
include/hw/timer/a9gtimer.h:94:    uint64_t new;
target/arm/cpu.h:1202:void aarch64_set_svcr(CPUARMState *env, uint64_t 
new, uint64_t mask);
target/arm/helper.c:7350:void aarch64_set_svcr(CPUARMState *env, 
uint64_t new, uint64_t mask)
target/arm/tcg/mte_helper.c:334:        uint8_t new = deposit32(old, 
ofs, 4, tag);
target/i386/tcg/sysemu/excp_helper.c:107:static bool ptw_setl_slow(const 
PTETranslate *in, uint32_t old, uint32_t new)
target/i386/tcg/sysemu/excp_helper.c:124:        uint32_t new = old | set;
util/trace-events:6:poll_shrink(void *ctx, int64_t old, int64_t new) 
"ctx %p old %"PRId64" new %"PRId64
util/trace-events:7:poll_grow(void *ctx, int64_t old, int64_t new) "ctx 
%p old %"PRId64" new %"PRId64



  parent reply	other threads:[~2024-06-19 10:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 22:45 [PATCH 2/3] exec: avoid using C++ keywords in function parameters Roman Kiryanov
2024-06-18 22:59 ` Richard Henderson
2024-06-19 10:22 ` Philippe Mathieu-Daudé [this message]
2024-06-20  1:47   ` Richard Henderson
2024-06-20 18:03 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee4149fd-890d-43c6-a7c0-0d6df63bbb2f@linaro.org \
    --to=philmd@linaro.org \
    --cc=jansene@google.com \
    --cc=jpcottin@google.com \
    --cc=mett@google.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rkir@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).