[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tpmdd-devel
Subject:    Re: [tpmdd-devel] [PATCH] TPM: Switch to __packed instead of __attribute__((packed))
From:       Jason Gunthorpe <jgunthorpe () obsidianresearch ! com>
Date:       2012-11-26 20:30:19
Message-ID: 20121126203019.GA18296 () obsidianresearch ! com
[Download RAW message or body]

On Mon, Nov 26, 2012 at 02:23:56PM -0600, Kent Yoder wrote:
> On Wed, Nov 21, 2012 at 11:50:24PM +0100, Peter Huewe wrote:
> > Am Mittwoch, 21. November 2012, 21:56:45 schrieb Jason Gunthorpe:
> > > This seems to be preferred these days.
> > > 
> > > Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> > 
> > Looks good to me
> > Reviewed-by: Peter Huewe <peterhuewe@gmx.de>
> 
> Applied. I also rolled in an update to tpm_acpi.c to this commit:
> 
> diff --git a/drivers/char/tpm/tpm_acpi.c b/drivers/char/tpm/tpm_acpi.c
> index 56051d0..64420b3 100644
> +++ b/drivers/char/tpm/tpm_acpi.c
> @@ -33,13 +33,13 @@ struct acpi_tcpa {
>  	u16 platform_class;
>  	union {
>  		struct client_hdr {
> -			u32 log_max_len __attribute__ ((packed));
> -			u64 log_start_addr __attribute__ ((packed));
> +			u32 log_max_len __packed;
> +			u64 log_start_addr __packed;
>  		} client;
>  		struct server_hdr {
>  			u16 reserved;
> -			u64 log_max_len __attribute__ ((packed));
> -			u64 log_start_addr __attribute__ ((packed));
> +			u64 log_max_len __packed;
> +			u64 log_start_addr __packed;
>  		} server;
>  	};
>  };

Thanks, I looked at those as well, but I couldn't grok the
intent. What does __packed on a member even do??

Certainly client_hdr should be moved to the struct, maybe server_hdr
too?

Jason

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
tpmdd-devel mailing list
tpmdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic