mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
tpm: Add explicit endianness cast
Signed-off-by: Thiebaud Weksteen <tweek@google.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
This commit is contained in:
parent
f20b4f2245
commit
09dd144f72
1 changed files with 2 additions and 2 deletions
|
@ -56,8 +56,8 @@ int tpm_read_log_of(struct tpm_chip *chip)
|
|||
* but physical tpm needs the conversion.
|
||||
*/
|
||||
if (of_property_match_string(np, "compatible", "IBM,vtpm") < 0) {
|
||||
size = be32_to_cpup(sizep);
|
||||
base = be64_to_cpup(basep);
|
||||
size = be32_to_cpup((__force __be32 *)sizep);
|
||||
base = be64_to_cpup((__force __be64 *)basep);
|
||||
} else {
|
||||
size = *sizep;
|
||||
base = *basep;
|
||||
|
|
Loading…
Add table
Reference in a new issue