From 5c0ce2129cb05e89c5897ff2b4489ab15740fd69 Mon Sep 17 00:00:00 2001 From: Jack Rosenthal Date: Mon, 27 Jun 2022 15:26:32 -0600 Subject: util/gen_touchpad_hash.c: Format with clang-format BUG=b:236386294 BRANCH=none TEST=none Change-Id: Ife30fe948c27fc9c4ee51914077a145761cce74f Signed-off-by: Jack Rosenthal Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730624 Reviewed-by: Jeremy Bettis --- util/gen_touchpad_hash.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'util/gen_touchpad_hash.c') diff --git a/util/gen_touchpad_hash.c b/util/gen_touchpad_hash.c index e03c4638f3..3b2eb4cb07 100644 --- a/util/gen_touchpad_hash.c +++ b/util/gen_touchpad_hash.c @@ -35,7 +35,7 @@ static int hash_fw_blank(FILE *hashes) CONFIG_TOUCHPAD_VIRTUAL_SIZE / CONFIG_UPDATE_PDU_SIZE, SHA256_DIGEST_LENGTH); for (len = 0; len < CONFIG_TOUCHPAD_VIRTUAL_SIZE; - len += CONFIG_UPDATE_PDU_SIZE) { + len += CONFIG_UPDATE_PDU_SIZE) { print_hex(hashes, digest, sizeof(digest), 0); } fputs("};\n", hashes); @@ -93,7 +93,7 @@ static int hash_fw(FILE *tp_fw, FILE *hashes) if (len != CONFIG_TOUCHPAD_VIRTUAL_SIZE) { warnx("Incorrect TP FW size (%d vs %d)", len, - CONFIG_TOUCHPAD_VIRTUAL_SIZE); + CONFIG_TOUCHPAD_VIRTUAL_SIZE); return 1; } @@ -109,16 +109,14 @@ int main(int argc, char **argv) FILE *tp_fw = NULL; FILE *hashes; const char short_opt[] = "f:ho:"; - const struct option long_opts[] = { - { "firmware", 1, NULL, 'f' }, - { "help", 0, NULL, 'h' }, - { "out", 1, NULL, 'o' }, - { NULL } - }; + const struct option long_opts[] = { { "firmware", 1, NULL, 'f' }, + { "help", 0, NULL, 'h' }, + { "out", 1, NULL, 'o' }, + { NULL } }; const char usage[] = "USAGE: %s -f -o \n"; - while ((nopt = getopt_long(argc, argv, short_opt, - long_opts, NULL)) != -1) { + while ((nopt = getopt_long(argc, argv, short_opt, long_opts, NULL)) != + -1) { switch (nopt) { case 'f': /* -f or --firmware */ tp_fw_name = optarg; -- cgit v1.2.1 From 71b2ef709dcb14260f5fdaa3ab4ced005a29fb46 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 12 Sep 2022 14:54:36 -0400 Subject: Update license boilerplate text in source code files Normally we don't do this, but enough changes have accumulated that we're doing a tree-wide one-off update of the name & style. BRANCH=none BUG=chromium:1098010 TEST=`repo upload` works Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b Signed-off-by: Mike Frysinger Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203 Reviewed-by: Jeremy Bettis Reviewed-by: Jack Rosenthal --- util/gen_touchpad_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/gen_touchpad_hash.c') diff --git a/util/gen_touchpad_hash.c b/util/gen_touchpad_hash.c index 3b2eb4cb07..98370038b7 100644 --- a/util/gen_touchpad_hash.c +++ b/util/gen_touchpad_hash.c @@ -1,4 +1,4 @@ -/* Copyright 2017 The Chromium OS Authors. All rights reserved. +/* Copyright 2017 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -- cgit v1.2.1