From patchwork Fri Sep 14 08:42:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 183839 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A9FAC2C0084 for ; Fri, 14 Sep 2012 18:43:08 +1000 (EST) Received: from localhost ([::1]:35416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCRUQ-0001sJ-MS for incoming@patchwork.ozlabs.org; Fri, 14 Sep 2012 04:43:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCRU6-0001kr-TM for qemu-devel@nongnu.org; Fri, 14 Sep 2012 04:42:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCRU0-0007W0-I2 for qemu-devel@nongnu.org; Fri, 14 Sep 2012 04:42:46 -0400 Received: from mail-we0-f173.google.com ([74.125.82.173]:36282) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCRU0-0007Vp-Bb for qemu-devel@nongnu.org; Fri, 14 Sep 2012 04:42:40 -0400 Received: by weyz53 with SMTP id z53so2179729wey.4 for ; Fri, 14 Sep 2012 01:42:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=icxhGnZNlHrkyY+uFUZIBGQEhR2weqNPqDfwLEHInJs=; b=us49sS1LJqW5QSmidq6R/U9QOXyakSvjquQiPYCE9vuXvAoYRxCBSWJIbfTvFlGvFr ljdT8fveFcg4dzjg+8LbCxSiD6whwNNZS3EczsIhJrlUOaUHKAjOcPs7Q2spCkv6KUiy 1KYdRMM/HOFVAUjB/f8AYG5pJkYrsd4ofIcxCaYMYsB5+8Mb32dacn4pS4Y7ryC1An/m FOPyyyKiuwS4WbfZoGF40THCS8xqwnT3fEqmq5Fys/QveveojKCG+2pKp0UZIP6IdPIc 3G9fDNWqDPP7Ls9dvZKYhIvOptRpUsM6JqKWdJyRXwJiUzD/JgEEu6sB2cFpJdpUbB7x J0pg== Received: by 10.216.153.207 with SMTP id f57mr1120479wek.196.1347612159285; Fri, 14 Sep 2012 01:42:39 -0700 (PDT) Received: from localhost ([109.224.133.37]) by mx.google.com with ESMTPS id ct3sm17843100wib.5.2012.09.14.01.42.37 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Sep 2012 01:42:37 -0700 (PDT) From: Stefan Hajnoczi To: Anthony Liguori Date: Fri, 14 Sep 2012 09:42:15 +0100 Message-Id: <1347612146-5407-2-git-send-email-stefanha@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1347612146-5407-1-git-send-email-stefanha@gmail.com> References: <1347612146-5407-1-git-send-email-stefanha@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.173 Cc: Stefan Weil , qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 01/12] srp: Don't use QEMU_PACKED for single elements of a structured type X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Stefan Weil QEMU_PACKED results in a MinGW compiler warning when it is used for single structure elements: warning: 'gcc_struct' attribute ignored Using QEMU_PACKED for the whole structure avoids the compiler warning without changing the memory layout. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- hw/srp.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/srp.h b/hw/srp.h index 3009bd5..5e0cad5 100644 --- a/hw/srp.h +++ b/hw/srp.h @@ -177,13 +177,13 @@ struct srp_tsk_mgmt { uint8_t reserved1[6]; uint64_t tag; uint8_t reserved2[4]; - uint64_t lun QEMU_PACKED; + uint64_t lun; uint8_t reserved3[2]; uint8_t tsk_mgmt_func; uint8_t reserved4; uint64_t task_tag; uint8_t reserved5[8]; -}; +} QEMU_PACKED; /* * We need the packed attribute because the SRP spec only aligns the @@ -198,14 +198,14 @@ struct srp_cmd { uint8_t data_in_desc_cnt; uint64_t tag; uint8_t reserved2[4]; - uint64_t lun QEMU_PACKED; + uint64_t lun; uint8_t reserved3; uint8_t task_attr; uint8_t reserved4; uint8_t add_cdb_len; uint8_t cdb[16]; uint8_t add_data[0]; -}; +} QEMU_PACKED; enum { SRP_RSP_FLAG_RSPVALID = 1 << 0,