diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2014-07-09 14:34:41 +0200 |
---|---|---|
committer | Peter Huewe <peterhuewe@gmx.de> | 2014-07-29 23:10:56 +0200 |
commit | a3d64df849bcb84220bf6db5773a10eee1fad4dc (patch) | |
tree | f742576f646c436f741d4a3449bd50b79a131e52 /drivers/char/tpm/tpm_eventlog.c | |
parent | tpm: Provide a generic means to override the chip returned timeouts (diff) | |
download | linux-a3d64df849bcb84220bf6db5773a10eee1fad4dc.tar.xz linux-a3d64df849bcb84220bf6db5773a10eee1fad4dc.zip |
tpm: simplify code by using %*phN specifier
Instead of looping by ourselves we may use %*phN specifier to dump a small
buffer.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
[ PHuewe: removed now unused variable i ]
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Diffstat (limited to 'drivers/char/tpm/tpm_eventlog.c')
-rw-r--r-- | drivers/char/tpm/tpm_eventlog.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/char/tpm/tpm_eventlog.c b/drivers/char/tpm/tpm_eventlog.c index 59f7cb28260b..3a56a131586c 100644 --- a/drivers/char/tpm/tpm_eventlog.c +++ b/drivers/char/tpm/tpm_eventlog.c @@ -235,7 +235,6 @@ static int tpm_bios_measurements_release(struct inode *inode, static int tpm_ascii_bios_measurements_show(struct seq_file *m, void *v) { int len = 0; - int i; char *eventname; struct tcpa_event *event = v; unsigned char *event_entry = @@ -251,8 +250,7 @@ static int tpm_ascii_bios_measurements_show(struct seq_file *m, void *v) seq_printf(m, "%2d ", event->pcr_index); /* 2nd: SHA1 */ - for (i = 0; i < 20; i++) - seq_printf(m, "%02x", event->pcr_value[i]); + seq_printf(m, "%20phN", event->pcr_value); /* 3rd: event type identifier */ seq_printf(m, " %02x", event->event_type); |