Skip to content

Commit 09dd144

Browse files
tweksteenJarkko Sakkinen
authored andcommitted
tpm: Add explicit endianness cast
Signed-off-by: Thiebaud Weksteen <[email protected]> Reviewed-by: Jarkko Sakkinen <[email protected]> Tested-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Jarkko Sakkinen <[email protected]>
1 parent f20b4f2 commit 09dd144

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/char/tpm/tpm_eventlog_of.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ int tpm_read_log_of(struct tpm_chip *chip)
5656
* but physical tpm needs the conversion.
5757
*/
5858
if (of_property_match_string(np, "compatible", "IBM,vtpm") < 0) {
59-
size = be32_to_cpup(sizep);
60-
base = be64_to_cpup(basep);
59+
size = be32_to_cpup((__force __be32 *)sizep);
60+
base = be64_to_cpup((__force __be64 *)basep);
6161
} else {
6262
size = *sizep;
6363
base = *basep;

0 commit comments

Comments
 (0)