From: YueHaibing <yuehaibing@huawei.com>
To: <peterhuewe@gmx.de>, <jarkko.sakkinen@linux.intel.com>,
<jgg@ziepe.ca>, <arnd@arndb.de>, <gregkh@linuxfoundation.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-integrity@vger.kernel.org>,
<linux-security-module@vger.kernel.org>,
YueHaibing <yuehaibing@huawei.com>
Subject: [PATCH v2 -next] tpm: Fix the type of the return value in calc_tpm2_event_size()
Date: Wed, 20 Feb 2019 10:23:00 +0800 [thread overview]
Message-ID: <20190220022300.25888-1-yuehaibing@huawei.com> (raw)
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")
Suggested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2: modify patch title and commit message as Jarkko suggested
---
drivers/char/tpm/eventlog/tpm2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/char/tpm/eventlog/tpm2.c b/drivers/char/tpm/eventlog/tpm2.c
index d8b7713..f824563 100644
--- a/drivers/char/tpm/eventlog/tpm2.c
+++ b/drivers/char/tpm/eventlog/tpm2.c
@@ -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;
--
2.7.0
next reply other threads:[~2019-02-20 2:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-20 2:23 YueHaibing [this message]
2019-02-20 6:31 ` [PATCH v2 -next] tpm: Fix the type of the return value in calc_tpm2_event_size() Jarkko Sakkinen
2019-02-20 16:00 ` Jason Gunthorpe
2019-02-21 12:13 ` Jarkko Sakkinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190220022300.25888-1-yuehaibing@huawei.com \
--to=yuehaibing@huawei.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=jgg@ziepe.ca \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=peterhuewe@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).