[Top][All Lists]

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

Re: [qemu-s390x] [PATCH v6] s390x/pci: add common function measurement b

From: Pierre Morel
Subject: Re: [qemu-s390x] [PATCH v6] s390x/pci: add common function measurement block
Date: Mon, 7 Jan 2019 10:08:51 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

On 04/01/2019 15:39, Cornelia Huck wrote:
On Thu,  3 Jan 2019 11:17:00 +0100
Pierre Morel <address@hidden> wrote:

+static void fmb_update(void *opaque)
+    S390PCIBusDevice *pbdev = opaque;
+    int64_t t = qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL);
+    int i;
+    /* Update U bit */
+    pbdev->fmb.last_update *= 2;
+    pbdev->fmb.last_update |= UPDATE_U_BIT;
+    if (fmb_do_update(pbdev, offsetof(ZpciFmb, last_update),
+                      pbdev->fmb.last_update,
+                      sizeof(((ZpciFmb *)0)->last_update))) {

I really don't want to be a pain, but... this looks weird. Why not
simply sizeof(pbdev->fmb.last_update)?

Isn't it preferable to use the size of the destination?


Pierre Morel
Linux/KVM/QEMU in Böblingen - Germany

reply via email to

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