diff options
author | Joel Kitching <kitching@google.com> | 2018-08-02 16:21:17 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-08-03 01:31:21 -0700 |
commit | 9ad8a41b8cedef9ac1f0513992ce6958eb86c257 (patch) | |
tree | 2a1fe0e028829dc579840dce386047ce661ac6d3 /firmware/2lib | |
parent | c239374ac3e1af342c10f4f3244bc98d76c2413a (diff) | |
download | vboot-9ad8a41b8cedef9ac1f0513992ce6958eb86c257.tar.gz |
vboot: bulk fix tabs and spacing inconsistency
Problem files were found with:
find . -name '*.c' -o -name '*.h' | xargs grep '^ [^*]'
and edited manually.
Ignores utility/ and cgpt/, since they seem to globally adhere
to a two-space tab convention.
BUG=None
TEST=make clean runtests
TEST=emerge vboot_reference depthcharge
Change-Id: I5a678484a119c8f1911f717e1968bdb4f1a0810f
Reviewed-on: https://chromium-review.googlesource.com/1160131
Commit-Ready: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'firmware/2lib')
-rw-r--r-- | firmware/2lib/2rsa.c | 12 | ||||
-rw-r--r-- | firmware/2lib/2sha512.c | 4 | ||||
-rw-r--r-- | firmware/2lib/include/2api.h | 2 | ||||
-rw-r--r-- | firmware/2lib/include/2nvstorage.h | 4 | ||||
-rw-r--r-- | firmware/2lib/include/2nvstorage_fields.h | 2 | ||||
-rw-r--r-- | firmware/2lib/include/2return_codes.h | 36 |
6 files changed, 30 insertions, 30 deletions
diff --git a/firmware/2lib/2rsa.c b/firmware/2lib/2rsa.c index c349d4e2..f54e83c3 100644 --- a/firmware/2lib/2rsa.c +++ b/firmware/2lib/2rsa.c @@ -48,9 +48,9 @@ int vb2_mont_ge(const struct vb2_public_key *key, uint32_t *a) * Montgomery c[] += a * b[] / R % mod */ static void montMulAdd(const struct vb2_public_key *key, - uint32_t *c, - const uint32_t a, - const uint32_t *b) + uint32_t *c, + const uint32_t a, + const uint32_t *b) { uint64_t A = (uint64_t)a * b[0] + c[0]; uint32_t d0 = (uint32_t)A * key->n0inv; @@ -95,9 +95,9 @@ static void montMulAdd0(const struct vb2_public_key *key, * Montgomery c[] = a[] * b[] / R % mod */ static void montMul(const struct vb2_public_key *key, - uint32_t *c, - const uint32_t *a, - const uint32_t *b) + uint32_t *c, + const uint32_t *a, + const uint32_t *b) { uint32_t i; for (i = 0; i < key->arrsize; ++i) { diff --git a/firmware/2lib/2sha512.c b/firmware/2lib/2sha512.c index fedc8b7a..e1f2601f 100644 --- a/firmware/2lib/2sha512.c +++ b/firmware/2lib/2sha512.c @@ -170,8 +170,8 @@ void vb2_sha512_init(struct vb2_sha512_context *ctx) } static void vb2_sha512_transform(struct vb2_sha512_context *ctx, - const uint8_t *message, - unsigned int block_nb) + const uint8_t *message, + unsigned int block_nb) { /* Note that these arrays use 88*8=704 bytes of stack */ uint64_t w[80]; diff --git a/firmware/2lib/include/2api.h b/firmware/2lib/include/2api.h index f338fa41..1a75b355 100644 --- a/firmware/2lib/include/2api.h +++ b/firmware/2lib/include/2api.h @@ -227,7 +227,7 @@ struct vb2_context { /********************************************************************** * Fields caller may examine after calling vb2api_fw_phase1(). Caller - * must set these fields to 0 before calling any vboot functions. + * must set these fields to 0 before calling any vboot functions. */ /* diff --git a/firmware/2lib/include/2nvstorage.h b/firmware/2lib/include/2nvstorage.h index f4f3e04c..05183d52 100644 --- a/firmware/2lib/include/2nvstorage.h +++ b/firmware/2lib/include/2nvstorage.h @@ -103,8 +103,8 @@ enum vb2_nv_param { * (0=no, 1=yes). */ VB2_NV_TRY_RO_SYNC, - /* Cut off battery and shutdown on next boot. */ - VB2_NV_BATTERY_CUTOFF_REQUEST, + /* Cut off battery and shutdown on next boot. */ + VB2_NV_BATTERY_CUTOFF_REQUEST, /* Maximum kernel version to roll forward to */ VB2_NV_KERNEL_MAX_ROLLFORWARD, diff --git a/firmware/2lib/include/2nvstorage_fields.h b/firmware/2lib/include/2nvstorage_fields.h index 16626b8d..981bbda4 100644 --- a/firmware/2lib/include/2nvstorage_fields.h +++ b/firmware/2lib/include/2nvstorage_fields.h @@ -52,7 +52,7 @@ enum vb2_nv_offset { /* CRC must be last field */ VB2_NV_OFFS_CRC_V2 = 63, - }; +}; /* Fields in VB2_NV_OFFS_HEADER (unused = 0x04) */ #define VB2_NV_HEADER_WIPEOUT 0x08 diff --git a/firmware/2lib/include/2return_codes.h b/firmware/2lib/include/2return_codes.h index f754cded..b60c41a2 100644 --- a/firmware/2lib/include/2return_codes.h +++ b/firmware/2lib/include/2return_codes.h @@ -28,7 +28,7 @@ enum vb2_return_code { /* Mock error for testing */ VB2_ERROR_MOCK, - /********************************************************************** + /********************************************************************** * SHA errors */ VB2_ERROR_SHA = VB2_ERROR_BASE + 0x010000, @@ -45,7 +45,7 @@ enum vb2_return_code { /* Digest size buffer too small in vb2_digest_finalize() */ VB2_ERROR_SHA_FINALIZE_DIGEST_SIZE, - /********************************************************************** + /********************************************************************** * RSA errors */ VB2_ERROR_RSA = VB2_ERROR_BASE + 0x020000, @@ -74,7 +74,7 @@ enum vb2_return_code { /* Bad size calculation in vb2_check_padding() */ VB2_ERROR_RSA_PADDING_SIZE, - /********************************************************************** + /********************************************************************** * NV storage errors */ VB2_ERROR_NV = VB2_ERROR_BASE + 0x030000, @@ -85,7 +85,7 @@ enum vb2_return_code { /* Bad CRC in vb2_nv_check_crc() */ VB2_ERROR_NV_CRC, - /********************************************************************** + /********************************************************************** * Secure data storage errors */ VB2_ERROR_SECDATA = VB2_ERROR_BASE + 0x040000, @@ -135,7 +135,7 @@ enum vb2_return_code { /* Called vb2_secdatak_set() with uninitialized secdatak */ VB2_ERROR_SECDATAK_SET_UNINITIALIZED, - /********************************************************************** + /********************************************************************** * Common code errors */ VB2_ERROR_COMMON = VB2_ERROR_BASE + 0x050000, @@ -262,7 +262,7 @@ enum vb2_return_code { /* Null public key buffer passed to vb2_unpack_key_buffer() */ VB2_ERROR_UNPACK_KEY_BUFFER, - /********************************************************************** + /********************************************************************** * Keyblock verification errors (all in vb2_verify_keyblock()) */ VB2_ERROR_KEYBLOCK = VB2_ERROR_BASE + 0x060000, @@ -303,7 +303,7 @@ enum vb2_return_code { /* No signature matching key ID */ VB2_ERROR_KEYBLOCK_SIG_ID, - /********************************************************************** + /********************************************************************** * Preamble verification errors (all in vb2_verify_preamble()) */ VB2_ERROR_PREAMBLE = VB2_ERROR_BASE + 0x070000, @@ -350,7 +350,7 @@ enum vb2_return_code { /* Vmlinuz header outside signed portion of body */ VB2_ERROR_PREAMBLE_VMLINUZ_HEADER_OUTSIDE, - /********************************************************************** + /********************************************************************** * Misc higher-level code errors */ VB2_ERROR_MISC = VB2_ERROR_BASE + 0x080000, @@ -497,7 +497,7 @@ enum vb2_return_code { /* Expected and image hashes are different size in ec_sync_phase1() */ VB2_ERROR_EC_HASH_SIZE, - /********************************************************************** + /********************************************************************** * API-level errors */ VB2_ERROR_API = VB2_ERROR_BASE + 0x090000, @@ -580,7 +580,7 @@ enum vb2_return_code { /* Digest buffer passed into vb2api_check_hash incorrect. */ VB2_ERROR_API_CHECK_DIGEST_SIZE, - /********************************************************************** + /********************************************************************** * Errors which may be generated by implementations of vb2ex functions. * Implementation may also return its own specific errors, which should * NOT be in the range VB2_ERROR_BASE...VB2_ERROR_MAX to avoid @@ -607,12 +607,12 @@ enum vb2_return_code { VB2_ERROR_EX_HWCRYPTO_UNSUPPORTED, - /********************************************************************** + /********************************************************************** * Errors generated by host library (non-firmware) start here. */ VB2_ERROR_HOST_BASE = 0x20000000, - /********************************************************************** + /********************************************************************** * Errors generated by host library misc functions */ VB2_ERROR_HOST_MISC = VB2_ERROR_HOST_BASE + 0x010000, @@ -638,7 +638,7 @@ enum vb2_return_code { /* Unable to convert string to struct vb_id */ VB2_ERROR_STR_TO_ID, - /********************************************************************** + /********************************************************************** * Errors generated by host library key functions */ VB2_ERROR_HOST_KEY = VB2_ERROR_HOST_BASE + 0x020000, @@ -736,7 +736,7 @@ enum vb2_return_code { /* Unable to copy packed key */ VB2_ERROR_PACKED_KEY_COPY, - /********************************************************************** + /********************************************************************** * Errors generated by host library signature functions */ VB2_ERROR_HOST_SIG = VB2_ERROR_HOST_BASE + 0x030000, @@ -777,7 +777,7 @@ enum vb2_return_code { /* Not enough buffer space to hold signature in vb2_sign_object() */ VB2_SIGN_OBJECT_OVERFLOW, - /********************************************************************** + /********************************************************************** * Errors generated by host library keyblock functions */ VB2_ERROR_HOST_KEYBLOCK = VB2_ERROR_HOST_BASE + 0x040000, @@ -794,7 +794,7 @@ enum vb2_return_code { /* Unable to sign keyblock in vb2_create_keyblock() */ VB2_KEYBLOCK_CREATE_SIGN, - /********************************************************************** + /********************************************************************** * Errors generated by host library firmware preamble functions */ VB2_ERROR_HOST_FW_PREAMBLE = VB2_ERROR_HOST_BASE + 0x050000, @@ -808,7 +808,7 @@ enum vb2_return_code { /* Unable to sign preamble in vb2_create_fw_preamble() */ VB2_FW_PREAMBLE_CREATE_SIGN, - /********************************************************************** + /********************************************************************** * Errors generated by unit test functions */ VB2_ERROR_UNIT_TEST = VB2_ERROR_HOST_BASE + 0x060000, @@ -816,7 +816,7 @@ enum vb2_return_code { /* Unable to open an input file needed for a unit test */ VB2_ERROR_TEST_INPUT_FILE, - /********************************************************************** + /********************************************************************** * Highest non-zero error generated inside vboot library. Note that * error codes passed through vboot when it calls external APIs may * still be outside this range. |