Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965005AbbFCRJD (ORCPT ); Wed, 3 Jun 2015 13:09:03 -0400 Received: from mga14.intel.com ([192.55.52.115]:60768 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964852AbbFCRHp (ORCPT ); Wed, 3 Jun 2015 13:07:45 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,547,1427785200"; d="scan'208";a="581475610" Date: Wed, 3 Jun 2015 20:06:58 +0300 From: Jarkko Sakkinen To: Jason Gunthorpe Cc: peterhuewe@gmx.de, safford@us.ibm.com, Marcel Selhorst , "moderated list:TPM DEVICE DRIVER" , open list , richard.l.maliszewski@intel.com Subject: Re: [PATCH] tpm: introduce struct tpm_buf Message-ID: <20150603170658.GB2327@jsakkine-mobl1> References: <1433250262-17200-1-git-send-email-jarkko.sakkinen@linux.intel.com> <20150602181315.GE17776@obsidianresearch.com> <20150603122331.GA3542@jsakkine-mobl1> <20150603161128.GB12073@obsidianresearch.com> <20150603164334.GA2327@jsakkine-mobl1> <20150603164851.GA2222@obsidianresearch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150603164851.GA2222@obsidianresearch.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1098 Lines: 30 On Wed, Jun 03, 2015 at 10:48:51AM -0600, Jason Gunthorpe wrote: > On Wed, Jun 03, 2015 at 07:43:34PM +0300, Jarkko Sakkinen wrote: > > I realized basically the same what you said here when I refined the > > patch (read this email after sending v2) :) I decided that align to 8 > > bytes. > > Don't use the __attribute__((align)), use just a u64, the effect is > identical, and the latter doesn't rely on compiler specific features. Byte array is otherwise more convenient and this feature is widely used: $ git grep "__attribute__((aligned" | wc -l 222 I don't see your point here. > > I don't think the packed attribute is needed here because now I cast > > the beginning to tpm_input_header, which is a packed struct. > > I ment the attributs could be changed on the tpm_input_header, the buf > should just be a u64 array.. > > Jason /Jarkko -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/