Re: [PATCH 2/3] char: tpm: cr50: Use generic request/relinquish locality ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tim,

[...]
> Why is it useful to return the same `loc` value that was passed in,
> rather than just returning `0`? The caller already knows the value of
> `loc`, so they aren't being told anything new.
> 
> I think this should continue to return `0` for success.

I think Jan just followed the conventions, when he returned 'loc' instead of
'0', some others request/release locality function do exactly the same.

[...]
> For each of these ` WARN_ONCE((chip->locality < 0), ...).`, can it
> return immediately rather than attempting to continue using an invalid
> locality value? Do the following commands have a chance of succeeding
> with the invalid value?

WARN_ONCE() macro does not remove checking of locality. If I understand
the code correctly layer above should not called this function if
request locality fails, so this code is an extra check. 
I can remove it in the next patchset if you want.

Jarkko,

Would it be possible to merge this changes. Patch 1. has already been merged,
only 2 and 3 are still waiting. Do you want me to create a new patchset for
these two patches?

thanks,
greg




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux