tpm: Fix the type of the return value in calc_tpm2_event_size()
Subsystems (2)
PATCH v2 1/1 tpm: Fix the type of the return value in calc_tpm2_event_size()
From: Yue Haibing <[email protected]>
commit b9d0a85d6b2e76630cfd4c475ee3af4109bfd87a upstream
calc_tpm2_event_size() has an invalid signature because it returns a 'size_t' where as its signature says that it returns 'int'.
Cc <[email protected]>
Fixes 4d23cc323cdb ("tpm: add securityfs support for TPM 2.0 firmware event log")
Suggested-by Jarkko Sakkinen <[email protected]>
Signed-off-by Yue Haibing <[email protected]>
Reviewed-by Jarkko Sakkinen <[email protected]>
Signed-off-by Jarkko Sakkinen <[email protected]>
Signed-off-by James Morris <[email protected]>
---
for v5.0 and v4.19 stable
fixed compilation issue
fixed upstream commit ID
drivers/char/tpm/eventlog/tpm2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/char/tpm/eventlog/tpm2.c +2 -2
@@ -37,8 +37,8 @@* * Returns size of the event. If it is an invalid event, returns 0. */ -static int calc_tpm2_event_size (struct tcg_pcr_event2 *event, -struct tcg_pcr_event *event_header) +static size_t calc_tpm2_event_size (struct tcg_pcr_event2 *event, +struct tcg_pcr_event *event_header) {struct tcg_efi_specid_event *efispecid;struct tcg_event_field *event_field;
Signature · 1 line
2.20.1
Quoted 8 lines · Jarkko Sakkinen
From: Yue Haibing <[email protected]>
commit
b9d0a85d6b2e76630cfd4c475ee3af4109bfd87aupstream
calc_tpm2_event_size()has an invalid signature because it returns a 'size_t' where as its signature says that it returns 'int'.
Quoted 7 lines
Cc <[email protected]>Fixes 4d23cc323cdb ("tpm: add securityfs support for TPM 2.0 firmware event log")Suggested-by Jarkko Sakkinen <[email protected]>Signed-off-by Yue Haibing <[email protected]>Reviewed-by Jarkko Sakkinen <[email protected]>Signed-off-by Jarkko Sakkinen <[email protected]>Signed-off-by James Morris <[email protected]>
Queued for 5.0 and 4.19, thanks!
--
Thanks,
Sasha