
Dear Che-Liang Chiou,
In message 1323852504-19954-3-git-send-email-clchiou@chromium.org you wrote:
Peter Huewe implemented the original driver; this patch only reorganizes the code structure of the driver, and does not make logical changes.
tpm.c implements the interface defined in tpm.h based on underlying LPC or i2C TPM driver. tpm.c and the underlying driver communicate throught tpm_private.h.
This patch is tested on a tegra2-based machine, where the i2c driver is not upstreamed yet.
Note: Merging the LPC driver with tpm.c is left to future patches.
Signed-off-by: Peter Huewe peter.huewe@infineon.com Signed-off-by: Che-Liang Chiou clchiou@chromium.org
...
- if (ordinal < TPM_MAX_ORDINAL)
duration_idx = tpm_ordinal_duration[ordinal];
- else if ((ordinal & TPM_PROTECTED_ORDINAL_MASK) <
TPM_MAX_PROTECTED_ORDINAL)
duration_idx = tpm_protected_ordinal_duration[ordinal &
TPM_PROTECTED_ORDINAL_MASK];
Braces needed around multiline statement.
- if (duration_idx != TPM_UNDEFINED)
duration = chip->vendor.duration[duration_idx];
- if (duration <= 0)
Readability could be improved by inserting a blank line before this one.
...
debug("%s: waiting for status...\n", __func__);
u8 status = tpm_chip.vendor.status(&tpm_chip);
if ((status & tpm_chip.vendor.req_complete_mask) ==
Please always seaprate declarations and code by one blank line. Please fix globally.
Best regards,
Wolfgang Denk