lkml.org 
[lkml]   [2016]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 2/3] tpm: enhance read_log_of() to support Physical TPM event log
On Wed, Nov 23, 2016 at 12:27:36PM -0500, Nayna Jain wrote:
> - memcpy(log->bios_event_log, __va(*basep), *sizep);
> + if (of_property_match_string(np, "compatible", "IBM,vtpm") < 0)
> + memcpy(chip->log.bios_event_log, __va(be64_to_cpup(basep)),
> + log_size);
> + else
> + memcpy(chip->log.bios_event_log, __va(*basep), log_size);


This does not look good. You should be able rearrange your code in a way
that you only have only one memcpy call.

/Jarkko

\
 
 \ /
  Last update: 2016-11-24 22:08    [W:0.125 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site