Re: [PATCH -next] tpm: change the return type of calc_tpm2_event_size to size_t

2019-02-19 Thread YueHaibing
On 2019/2/20 1:31, Jarkko Sakkinen wrote: > On Tue, Feb 19, 2019 at 09:34:56AM -0700, Jason Gunthorpe wrote: >>> - Your real name is formatted incorrectly. It should be like "Yue Haibig" >>> as shown in [1]. >>> - If there is no actual regression, this change is useless. >> >> Clarity of the

Re: [PATCH -next] tpm: change the return type of calc_tpm2_event_size to size_t

2019-02-19 Thread Jarkko Sakkinen
On Tue, Feb 19, 2019 at 09:34:56AM -0700, Jason Gunthorpe wrote: > > - Your real name is formatted incorrectly. It should be like "Yue Haibig" > > as shown in [1]. > > - If there is no actual regression, this change is useless. > > Clarity of the code is a laudible goal - not everything is

Re: [PATCH -next] tpm: change the return type of calc_tpm2_event_size to size_t

2019-02-19 Thread Jason Gunthorpe
On Tue, Feb 19, 2019 at 12:35:32PM +0200, Jarkko Sakkinen wrote: > On Tue, Feb 19, 2019 at 05:15:47PM +0800, YueHaibing wrote: > > On 2019/2/19 16:59, Jarkko Sakkinen wrote: > > > On Tue, Feb 19, 2019 at 03:26:18PM +0800, YueHaibing wrote: > > >> calc_tpm2_event_size return size of the event which

Re: [PATCH -next] tpm: change the return type of calc_tpm2_event_size to size_t

2019-02-19 Thread YueHaibing
On 2019/2/19 18:35, Jarkko Sakkinen wrote: > On Tue, Feb 19, 2019 at 05:15:47PM +0800, YueHaibing wrote: >> On 2019/2/19 16:59, Jarkko Sakkinen wrote: >>> On Tue, Feb 19, 2019 at 03:26:18PM +0800, YueHaibing wrote: calc_tpm2_event_size return size of the event which type is size_t, If it

Re: [PATCH -next] tpm: change the return type of calc_tpm2_event_size to size_t

2019-02-19 Thread Jarkko Sakkinen
On Tue, Feb 19, 2019 at 05:15:47PM +0800, YueHaibing wrote: > On 2019/2/19 16:59, Jarkko Sakkinen wrote: > > On Tue, Feb 19, 2019 at 03:26:18PM +0800, YueHaibing wrote: > >> calc_tpm2_event_size return size of the event which type is > >> size_t, If it is an invalid event, returns 0. And all the >

Re: [PATCH -next] tpm: change the return type of calc_tpm2_event_size to size_t

2019-02-19 Thread YueHaibing
On 2019/2/19 16:59, Jarkko Sakkinen wrote: > On Tue, Feb 19, 2019 at 03:26:18PM +0800, YueHaibing wrote: >> calc_tpm2_event_size return size of the event which type is >> size_t, If it is an invalid event, returns 0. And all the >> caller use a size_t variable to check the return value, so >> no

Re: [PATCH -next] tpm: change the return type of calc_tpm2_event_size to size_t

2019-02-19 Thread Jarkko Sakkinen
On Tue, Feb 19, 2019 at 03:26:18PM +0800, YueHaibing wrote: > calc_tpm2_event_size return size of the event which type is > size_t, If it is an invalid event, returns 0. And all the > caller use a size_t variable to check the return value, so > no need to convert to the return value type to int. >

[PATCH -next] tpm: change the return type of calc_tpm2_event_size to size_t

2019-02-18 Thread YueHaibing
calc_tpm2_event_size return size of the event which type is size_t, If it is an invalid event, returns 0. And all the caller use a size_t variable to check the return value, so no need to convert to the return value type to int. Signed-off-by: YueHaibing --- drivers/char/tpm/eventlog/tpm2.c | 4