Re: [PATCH 1/2 v3] tpm: cmd_ready command can be issued only after granting locality

2018-02-20 Thread Jarkko Sakkinen
On Tue, Feb 20, 2018 at 08:26:45PM +, Winkler, Tomas wrote: > > > > On Mon, 2018-02-19 at 11:43 +, Winkler, Tomas wrote: > > > > All local variable declarations must be in the beginning of the > > > > function. > > > > > > Who says? > > > > It is coherent how we have everything else. > I

RE: [PATCH 1/2 v3] tpm: cmd_ready command can be issued only after granting locality

2018-02-20 Thread Winkler, Tomas
> > On Mon, 2018-02-19 at 11:43 +, Winkler, Tomas wrote: > > > All local variable declarations must be in the beginning of the > > > function. > > > > Who says? > > It is coherent how we have everything else. I will have to care about its value out of the scope where the variable existence

Re: [PATCH 1/2 v3] tpm: cmd_ready command can be issued only after granting locality

2018-02-20 Thread Jarkko Sakkinen
On Mon, 2018-02-19 at 11:43 +, Winkler, Tomas wrote: > > All local variable declarations must be in the beginning of the > > function. > > Who says? It is coherent how we have everything else. It is much easier to see the stack allocation this way when the allocation is only done in the begin

Re: [PATCH 1/2 v3] tpm: cmd_ready command can be issued only after granting locality

2018-02-20 Thread Jarkko Sakkinen
On Mon, 2018-02-19 at 13:27 +0200, Jarkko Sakkinen wrote: > On Wed, Feb 14, 2018 at 03:43:18PM +0200, Tomas Winkler wrote: > > if (need_locality && chip->ops->relinquish_locality) { > > - chip->ops->relinquish_locality(chip, chip- > > >locality); > > + /* this coud be on err

RE: [PATCH 1/2 v3] tpm: cmd_ready command can be issued only after granting locality

2018-02-19 Thread Winkler, Tomas
> > On Wed, Feb 14, 2018 at 03:43:18PM +0200, Tomas Winkler wrote: > > if (need_locality && chip->ops->relinquish_locality) { > > - chip->ops->relinquish_locality(chip, chip->locality); > > + /* this coud be on error path, don't override error code */ > > + int l_

Re: [PATCH 1/2 v3] tpm: cmd_ready command can be issued only after granting locality

2018-02-19 Thread Jarkko Sakkinen
On Wed, Feb 14, 2018 at 03:43:18PM +0200, Tomas Winkler wrote: > if (need_locality && chip->ops->relinquish_locality) { > - chip->ops->relinquish_locality(chip, chip->locality); > + /* this coud be on error path, don't override error code */ > + int l_rc =