Skip to contentSkip to conversation

FAILED: patch "[PATCH] tpm: Fix the type of the return value in" failed to apply to 4.19-stable tree

PATCH [email protected] 1 participant 1 message Apr 15, 2019

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From b9d0a85d6b2e76630cfd4c475ee3af4109bfd87a Mon Sep 17 00:00:00 2001
From: Yue Haibing <[email protected]>
Date: Wed, 20 Feb 2019 16:25:38 +0800
Subject: [PATCH] tpm: Fix the type of the return value in
calc_tpm2_event_size()

calc_tpm2_event_size() has an invalid signature because it returns a 'size_t' where as its signature says that it returns 'int'.

Fixes 4d23cc323cdb ("tpm: add securityfs support for TPM 2.0 firmware event log")
drivers/char/tpm/eventlog/tpm2.c +2 -2
index d8b77133a83a..f824563fc28d 100644
@@ -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_head *event,
-				struct tcg_pcr_event *event_header)
+static size_t calc_tpm2_event_size(struct tcg_pcr_event2_head *event,
+				   struct tcg_pcr_event *event_header)
 {
 	struct tcg_efi_specid_event_head *efispecid;
 	struct tcg_event_field *event_field;