From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:55314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkUgd-0000pt-EG for qemu-devel@nongnu.org; Fri, 18 Jan 2019 08:59:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gkUgc-0003CN-OO for qemu-devel@nongnu.org; Fri, 18 Jan 2019 08:59:55 -0500 Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]:41540) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gkUgc-0003Ba-IZ for qemu-devel@nongnu.org; Fri, 18 Jan 2019 08:59:54 -0500 Received: by mail-ot1-x344.google.com with SMTP id u16so14414687otk.8 for ; Fri, 18 Jan 2019 05:59:54 -0800 (PST) MIME-Version: 1.0 References: <20181210112649.11581-1-peter.maydell@linaro.org> In-Reply-To: <20181210112649.11581-1-peter.maydell@linaro.org> From: Peter Maydell Date: Fri, 18 Jan 2019 13:59:41 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" Subject: Re: [Qemu-devel] [PATCH 0/3] block: fix last address-of-packed-member warnings List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers Cc: Kevin Wolf , Fam Zheng , Qemu-block , Ben Warren , "Michael S. Tsirkin" , Stefan Weil , "patches@linaro.org" , Max Reitz , Igor Mammedov Ping? thanks -- PMM On Mon, 10 Dec 2018 at 11:28, Peter Maydell wrote: > > This patchset fixes the remaining clang warnings in the block/ code > about taking the address of a packed struct member, which are all > in block/vpc and block/vdi code handling UUIDs. Mostly I fix > these by copying the unaligned field to/from a local variable. > In the case of qemu_uuid_bswap() I opted to change the API to > take and return the QemuUUID rather than taking a pointer to it, > which makes almost all the callsites simpler. This does mean > a struct copy but the struct is only 16 bytes and I didn't > judge any of the callsites performance-sensitive enough to care > about a struct copy of that size. > > As usual, tested with "make check" only. > > thanks > -- PMM > > > Peter Maydell (3): > block/vpc: Don't take address of fields in packed structs > block/vdi: Don't take address of fields in packed structs > uuid: Make qemu_uuid_bswap() take and return a QemuUUID > > include/qemu/uuid.h | 2 +- > block/vdi.c | 54 +++++++++++++++++++++++++++----------------- > block/vpc.c | 4 +++- > hw/acpi/vmgenid.c | 6 ++--- > tests/vmgenid-test.c | 2 +- > util/uuid.c | 10 ++++---- > 6 files changed, 45 insertions(+), 33 deletions(-)