Re: [tpmdd-devel] [PATCH 2/2] tpm: fix bad constant expressions

From: Jarkko Sakkinen
Date: Tue Sep 20 2016 - 05:56:29 EST


On Tue, Sep 20, 2016 at 07:08:40AM +0000, Winkler, Tomas wrote:
>
> > -----Original Message-----
> > From: Jarkko Sakkinen [mailto:jarkko.sakkinen@xxxxxxxxxxxxxxx]
> > Sent: Monday, September 19, 2016 23:22
> > To: Peter Huewe <peterhuewe@xxxxxx>
> > Cc: moderated list:TPM DEVICE DRIVER <tpmdd-
> > devel@xxxxxxxxxxxxxxxxxxxxx>; open list <linux-kernel@xxxxxxxxxxxxxxx>
> > Subject: [tpmdd-devel] [PATCH 2/2] tpm: fix bad constant expressions
> >
> > Sparse reports "bad constant expression" for the use of cpu_to_be32 inside
> > enums tpm_capabilities and tpm_sub_capabilities. Even though it is probably
> > expanded to a constant expression, it is probably cleaner not to use it there.
>
>
> Swap macros were rewritten due to possible compiler bug https://lkml.org/lkml/2016/5/2/597
> And the warning is actually a bug in sparse, it fails to detect constant expression now.

I still think that these must be change in order to have some
consistency in the subsystem. Now there are two differing
conventions.

/Jarkko