Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1487276

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

From Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [tpmdd-devel] [PATCH 2/2] tpm: fix bad constant expressions
Date 2016-09-20 14:10 +0200
Message-ID <sjs26-2Lm-17@gated-at.bofh.it> (permalink)
References <sjdmp-1Ik-3@gated-at.bofh.it> <sjdmp-1Ik-21@gated-at.bofh.it> <sjnlM-8eo-11@gated-at.bofh.it> <sjq0n-1dP-29@gated-at.bofh.it> <sjq0n-1dP-27@gated-at.bofh.it>
Organization Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

Show all headers | View raw


On Tue, Sep 20, 2016 at 09:57:48AM +0000, Winkler, Tomas wrote:
> 
> > On Tue, Sep 20, 2016 at 07:08:40AM +0000, Winkler, Tomas wrote:
> > >
> > > > -----Original Message-----
> > > > From: Jarkko Sakkinen [mailto:jarkko.sakkinen@linux.intel.com]
> > > > Sent: Monday, September 19, 2016 23:22
> > > > To: Peter Huewe <peterhuewe@gmx.de>
> > > > Cc: moderated list:TPM DEVICE DRIVER <tpmdd-
> > > > devel@lists.sourceforge.net>; open list
> > > > <linux-kernel@vger.kernel.org>
> > > > 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.
> 
> Nothing against the convention just the commit message is misleading
> in that sense.  Tomas

Right. I can edit it to say that "sanitize the constant declarations" or
something like that.

/Jarkko

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] fix bad constant expressions in tpm.h Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-09-19 22:30 +0200
  [PATCH 2/2] tpm: fix bad constant expressions Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-09-19 22:30 +0200
    RE: [tpmdd-devel] [PATCH 2/2] tpm: fix bad constant expressions "Winkler, Tomas" <tomas.winkler@intel.com> - 2016-09-20 09:10 +0200
      Re: [tpmdd-devel] [PATCH 2/2] tpm: fix bad constant expressions Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-09-20 12:00 +0200
        RE: [tpmdd-devel] [PATCH 2/2] tpm: fix bad constant expressions "Winkler, Tomas" <tomas.winkler@intel.com> - 2016-09-20 12:00 +0200
          Re: [tpmdd-devel] [PATCH 2/2] tpm: fix bad constant expressions Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-09-20 14:10 +0200
  [PATCH 1/2] tpm: Clean up reading of timeout and duration capabilities Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-09-19 22:30 +0200
    Re: [PATCH 1/2] tpm: Clean up reading of timeout and duration  capabilities Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-09-20 01:30 +0200

csiph-web