From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: [PATCH 0/5] Improvements with __attribute__((packed)) Date: Wed, 12 Mar 2014 19:08:34 +0000 Message-ID: <1394651319-8893-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Andrew Cooper List-Id: xen-devel@lists.xenproject.org Due to a lack of suitable define in scope, mce-apei.c ends up accidentally creating a global unreferenced struct of type 'cper_mce_record', named '__packed'. This series is a cleanup of all use of __attribute__((packed)) in Xen. A formal define is created in compiler.h, all opencoded uses of the attribute are updated to use the new define (or dropped if unnecessary in the first place), and the position of __packed is standardised at the beginning of the struct rather than the end, so a lack of __packed in scope will result in a compile error. Patch 1 drops some redundant uses of __attribute__((packed)), and is verified by diffing xen-syms. Patches 2 through 4 make the main changes, and are split up by core component for the benefit of the maintainers/reviewers. Patch 5 is only for people wishing to verify my assertions. The entire series including patch 5 compiles to identical binaries, proving that the reverse contents of patch 5 are the only semantic differences across the series. This is compile tested on each architecture and functionally tested on x86. Signed-off-by: Andrew Cooper