
On Sun, Dec 18, 2011 at 4:33 AM, Wolfgang Denk wd@denx.de wrote:
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.
Done.
- 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.
Done.
...
- 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.
Done. I found as many cases as possible, and inserted a few more blank lines. I hope that would increase readability.
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Yes, it's a technical challenge, and you have to kind of admire people who go to the lengths of actually implementing it, but at the same time you wonder about their IQ... -- Linus Torvalds in 5phda5$ml6$1@palladium.transmeta.com