Re: [PATCH] tpm: fix invalid constant expressions in tpm.h

2016-08-30 Thread Jarkko Sakkinen
On Mon, Aug 29, 2016 at 09:45:36PM -0600, Jason Gunthorpe wrote: > On Tue, Aug 30, 2016 at 04:28:17AM +0300, Jarkko Sakkinen wrote: > > The enums tpm_capabilities and tpm_sub_capabilities do not contain legit > > constant expressions. This commit makes cap_id a separate parameter > > in > > I

Re: [PATCH] tpm: fix invalid constant expressions in tpm.h

2016-08-30 Thread Jarkko Sakkinen
On Mon, Aug 29, 2016 at 09:45:36PM -0600, Jason Gunthorpe wrote: > On Tue, Aug 30, 2016 at 04:28:17AM +0300, Jarkko Sakkinen wrote: > > The enums tpm_capabilities and tpm_sub_capabilities do not contain legit > > constant expressions. This commit makes cap_id a separate parameter > > in > > I

Re: [PATCH] tpm: fix invalid constant expressions in tpm.h

2016-08-29 Thread Jason Gunthorpe
On Tue, Aug 30, 2016 at 04:28:17AM +0300, Jarkko Sakkinen wrote: > The enums tpm_capabilities and tpm_sub_capabilities do not contain legit > constant expressions. This commit makes cap_id a separate parameter > in I wonder if this is a bug in sparse? the macro uses gcc magic to expand to a

Re: [PATCH] tpm: fix invalid constant expressions in tpm.h

2016-08-29 Thread Jason Gunthorpe
On Tue, Aug 30, 2016 at 04:28:17AM +0300, Jarkko Sakkinen wrote: > The enums tpm_capabilities and tpm_sub_capabilities do not contain legit > constant expressions. This commit makes cap_id a separate parameter > in I wonder if this is a bug in sparse? the macro uses gcc magic to expand to a

[PATCH] tpm: fix invalid constant expressions in tpm.h

2016-08-29 Thread Jarkko Sakkinen
The enums tpm_capabilities and tpm_sub_capabilities do not contain legit constant expressions. This commit makes cap_id a separate parameter in order to provide less confusing API and cap_id and subcap_id will be u32 with the cpu byte order. The byte order conversions are handled internally by

[PATCH] tpm: fix invalid constant expressions in tpm.h

2016-08-29 Thread Jarkko Sakkinen
The enums tpm_capabilities and tpm_sub_capabilities do not contain legit constant expressions. This commit makes cap_id a separate parameter in order to provide less confusing API and cap_id and subcap_id will be u32 with the cpu byte order. The byte order conversions are handled internally by