Re: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-18 Thread Andrey Pronin
On Mon, Jul 18, 2016 at 10:04:21PM +0300, Jarkko Sakkinen wrote: > On Thu, Jul 14, 2016 at 06:07:18PM -0700, Andrey Pronin wrote: > > Change-Id: I7d71cd379b1a3b7659d20a1b6008216762596590 > > Signed-off-by: Andrey Pronin > > Please remove the internal commit ID next time.

Re: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-18 Thread Andrey Pronin
On Mon, Jul 18, 2016 at 10:04:21PM +0300, Jarkko Sakkinen wrote: > On Thu, Jul 14, 2016 at 06:07:18PM -0700, Andrey Pronin wrote: > > Change-Id: I7d71cd379b1a3b7659d20a1b6008216762596590 > > Signed-off-by: Andrey Pronin > > Please remove the internal commit ID next time. This is also lacking a >

Re: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-18 Thread Jarkko Sakkinen
On Mon, Jul 18, 2016 at 10:04:21PM +0300, Jarkko Sakkinen wrote: > On Thu, Jul 14, 2016 at 06:07:18PM -0700, Andrey Pronin wrote: > > Change-Id: I7d71cd379b1a3b7659d20a1b6008216762596590 > > Signed-off-by: Andrey Pronin > > Please remove the internal commit ID next time.

Re: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-18 Thread Jarkko Sakkinen
On Mon, Jul 18, 2016 at 10:04:21PM +0300, Jarkko Sakkinen wrote: > On Thu, Jul 14, 2016 at 06:07:18PM -0700, Andrey Pronin wrote: > > Change-Id: I7d71cd379b1a3b7659d20a1b6008216762596590 > > Signed-off-by: Andrey Pronin > > Please remove the internal commit ID next time. This is also lacking a >

Re: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-18 Thread Jarkko Sakkinen
On Fri, Jul 15, 2016 at 01:39:28PM -0600, Jason Gunthorpe wrote: > On Fri, Jul 15, 2016 at 12:31:43PM -0700, Andrey Pronin wrote: > > > I even tried changing the code there to > > __be32 vv = cmd.params.get_tpm_pt_out.value; > > u32 ret = vv; > > to make it clear what's going on. Still,

Re: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-18 Thread Jarkko Sakkinen
On Fri, Jul 15, 2016 at 01:39:28PM -0600, Jason Gunthorpe wrote: > On Fri, Jul 15, 2016 at 12:31:43PM -0700, Andrey Pronin wrote: > > > I even tried changing the code there to > > __be32 vv = cmd.params.get_tpm_pt_out.value; > > u32 ret = vv; > > to make it clear what's going on. Still,

Re: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-18 Thread Jarkko Sakkinen
On Thu, Jul 14, 2016 at 06:07:18PM -0700, Andrey Pronin wrote: > Change-Id: I7d71cd379b1a3b7659d20a1b6008216762596590 > Signed-off-by: Andrey Pronin Please remove the internal commit ID next time. This is also lacking a description but this time I can write it down. This

Re: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-18 Thread Jarkko Sakkinen
On Thu, Jul 14, 2016 at 06:07:18PM -0700, Andrey Pronin wrote: > Change-Id: I7d71cd379b1a3b7659d20a1b6008216762596590 > Signed-off-by: Andrey Pronin Please remove the internal commit ID next time. This is also lacking a description but this time I can write it down. This not needed for the

Re: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-15 Thread Jason Gunthorpe
On Fri, Jul 15, 2016 at 12:31:43PM -0700, Andrey Pronin wrote: > I even tried changing the code there to > __be32 vv = cmd.params.get_tpm_pt_out.value; > u32 ret = vv; > to make it clear what's going on. Still, no complaints from sparse. Hum, I'm not an expert at sparse, but I expect

Re: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-15 Thread Jason Gunthorpe
On Fri, Jul 15, 2016 at 12:31:43PM -0700, Andrey Pronin wrote: > I even tried changing the code there to > __be32 vv = cmd.params.get_tpm_pt_out.value; > u32 ret = vv; > to make it clear what's going on. Still, no complaints from sparse. Hum, I'm not an expert at sparse, but I expect

Re: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-15 Thread Andrey Pronin
On Thu, Jul 14, 2016 at 09:35:53PM -0600, Jason Gunthorpe wrote: > On Thu, Jul 14, 2016 at 08:17:01PM -0700, Andrey Pronin wrote: > > conversion. The only place tpm2_get_tpm_pt() was used before was in > > tpm2_gen_interrupt, which discarded the result. So, nobody noticed, > > I guess. > > If you

Re: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-15 Thread Andrey Pronin
On Thu, Jul 14, 2016 at 09:35:53PM -0600, Jason Gunthorpe wrote: > On Thu, Jul 14, 2016 at 08:17:01PM -0700, Andrey Pronin wrote: > > conversion. The only place tpm2_get_tpm_pt() was used before was in > > tpm2_gen_interrupt, which discarded the result. So, nobody noticed, > > I guess. > > If you

Re: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-14 Thread Jason Gunthorpe
On Thu, Jul 14, 2016 at 08:17:01PM -0700, Andrey Pronin wrote: > conversion. The only place tpm2_get_tpm_pt() was used before was in > tpm2_gen_interrupt, which discarded the result. So, nobody noticed, > I guess. If you have a moment can you run sparse on this file before/after this change and

Re: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-14 Thread Jason Gunthorpe
On Thu, Jul 14, 2016 at 08:17:01PM -0700, Andrey Pronin wrote: > conversion. The only place tpm2_get_tpm_pt() was used before was in > tpm2_gen_interrupt, which discarded the result. So, nobody noticed, > I guess. If you have a moment can you run sparse on this file before/after this change and

Re: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-14 Thread Andrey Pronin
On Thu, Jul 14, 2016 at 09:10:46PM -0600, Jason Gunthorpe wrote: > On Thu, Jul 14, 2016 at 06:07:18PM -0700, Andrey Pronin wrote: > > Change-Id: I7d71cd379b1a3b7659d20a1b6008216762596590 > > Signed-off-by: Andrey Pronin > > drivers/char/tpm/tpm2-cmd.c | 2 +- > > 1 file

Re: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-14 Thread Andrey Pronin
On Thu, Jul 14, 2016 at 09:10:46PM -0600, Jason Gunthorpe wrote: > On Thu, Jul 14, 2016 at 06:07:18PM -0700, Andrey Pronin wrote: > > Change-Id: I7d71cd379b1a3b7659d20a1b6008216762596590 > > Signed-off-by: Andrey Pronin > > drivers/char/tpm/tpm2-cmd.c | 2 +- > > 1 file changed, 1 insertion(+),

Re: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-14 Thread Jason Gunthorpe
On Thu, Jul 14, 2016 at 06:07:18PM -0700, Andrey Pronin wrote: > Change-Id: I7d71cd379b1a3b7659d20a1b6008216762596590 > Signed-off-by: Andrey Pronin > drivers/char/tpm/tpm2-cmd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-14 Thread Jason Gunthorpe
On Thu, Jul 14, 2016 at 06:07:18PM -0700, Andrey Pronin wrote: > Change-Id: I7d71cd379b1a3b7659d20a1b6008216762596590 > Signed-off-by: Andrey Pronin > drivers/char/tpm/tpm2-cmd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/char/tpm/tpm2-cmd.c

[PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-14 Thread Andrey Pronin
Change-Id: I7d71cd379b1a3b7659d20a1b6008216762596590 Signed-off-by: Andrey Pronin --- drivers/char/tpm/tpm2-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c index a1673dc..a88b31e 100644 ---

[PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt

2016-07-14 Thread Andrey Pronin
Change-Id: I7d71cd379b1a3b7659d20a1b6008216762596590 Signed-off-by: Andrey Pronin --- drivers/char/tpm/tpm2-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c index a1673dc..a88b31e 100644 ---