summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2022-11-22 08:57:44 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-11-22 18:00:37 +0000
commit5d893f998d936f16d8894225ec44a58abf31f7e9 (patch)
tree698f971a96975428c75e303a22ef68acbc796ca5 /extra
parent05c088702242600fa4878cd3a6057d6dfd74bdfb (diff)
downloadchrome-ec-5d893f998d936f16d8894225ec44a58abf31f7e9.tar.gz
extra: Sort header files
Sort all includes in extra with the clang-format rules used by the zephyr project. BRANCH=None BUG=b:247100970 TEST=zmake build -a TEST=./twister --clobber -v -i TEST=make -j$(nproc) buildall_only runtests TEST=zmake compare-builds Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I407b20fbc45280c7593fe46e6014f7944068cb85 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4047097 Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'extra')
-rw-r--r--extra/ftdi_hostcmd/test_cmds.c8
-rw-r--r--extra/lightbar/input.c6
-rw-r--r--extra/lightbar/main.c9
-rw-r--r--extra/lightbar/simulation.h7
-rw-r--r--extra/lightbar/windows.c7
-rw-r--r--extra/rma_reset/rma_reset.c23
-rw-r--r--extra/sps_errs/prog.c8
-rw-r--r--extra/touchpad_updater/touchpad_updater.c8
-rw-r--r--extra/usb_console/usb_console.c8
-rw-r--r--extra/usb_gpio/usb_gpio.c3
-rw-r--r--extra/usb_updater/desc_parser.c7
-rw-r--r--extra/usb_updater/usb_updater2.c14
12 files changed, 57 insertions, 51 deletions
diff --git a/extra/ftdi_hostcmd/test_cmds.c b/extra/ftdi_hostcmd/test_cmds.c
index 748b862b56..ba985717bf 100644
--- a/extra/ftdi_hostcmd/test_cmds.c
+++ b/extra/ftdi_hostcmd/test_cmds.c
@@ -3,16 +3,16 @@
* found in the LICENSE file.
*/
+#include "ec_commands.h"
+#include "mpsse.h"
+
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
-#include "mpsse.h"
-
-#include "ec_commands.h"
+#include <unistd.h>
static int opt_verbose;
diff --git a/extra/lightbar/input.c b/extra/lightbar/input.c
index 5b605600ea..1ddfe2e1b3 100644
--- a/extra/lightbar/input.c
+++ b/extra/lightbar/input.c
@@ -3,17 +3,17 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+#include "simulation.h"
+
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#include "simulation.h"
-
#ifdef HAS_GNU_READLINE
-#include <readline/readline.h>
#include <readline/history.h>
+#include <readline/readline.h>
char *get_input(const char *prompt)
{
diff --git a/extra/lightbar/main.c b/extra/lightbar/main.c
index 321c0c73d2..e08aefc114 100644
--- a/extra/lightbar/main.c
+++ b/extra/lightbar/main.c
@@ -3,18 +3,19 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+#include "simulation.h"
+
#include <assert.h>
#include <errno.h>
#include <inttypes.h>
-#include <pthread.h>
+#include <stdarg.h>
#include <stdint.h>
-#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#include <stdarg.h>
+#include <string.h>
#include <time.h>
-#include "simulation.h"
+#include <pthread.h>
static void *(*thread_fns[])(void *) = {
entry_windows,
diff --git a/extra/lightbar/simulation.h b/extra/lightbar/simulation.h
index c77583e6c9..93f0a957c0 100644
--- a/extra/lightbar/simulation.h
+++ b/extra/lightbar/simulation.h
@@ -6,15 +6,16 @@
#ifndef __EXTRA_SIMULATION_H
#define __EXTRA_SIMULATION_H
+#include "lb_common.h"
+#include "lightbar.h"
+
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#include <unistd.h>
-#include "lb_common.h"
-#include "lightbar.h"
+#include <unistd.h>
/* Functions specific to our simulation environment */
void *entry_windows(void *);
diff --git a/extra/lightbar/windows.c b/extra/lightbar/windows.c
index e0b14fae42..3371cd42f5 100644
--- a/extra/lightbar/windows.c
+++ b/extra/lightbar/windows.c
@@ -3,16 +3,17 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+#include "simulation.h"
+
#include <assert.h>
-#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#include <xcb/xcb.h>
-#include "simulation.h"
+#include <pthread.h>
+#include <xcb/xcb.h>
/*****************************************************************************/
/* Window drawing stuff */
diff --git a/extra/rma_reset/rma_reset.c b/extra/rma_reset/rma_reset.c
index d437b63f1a..4c2ce76803 100644
--- a/extra/rma_reset/rma_reset.c
+++ b/extra/rma_reset/rma_reset.c
@@ -3,27 +3,28 @@
* found in the LICENSE file.
*/
+#include "base32.h"
+#include "curve25519.h"
+#include "rma_auth.h"
+#include "sha256.h"
+
#include <ctype.h>
-#include <endian.h>
#include <errno.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#include <endian.h>
#include <fcntl.h>
#include <getopt.h>
#include <openssl/bn.h>
#include <openssl/ec.h>
#include <openssl/obj_mac.h>
#include <openssl/rand.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
#include <unistd.h>
-#include "rma_auth.h"
-#include "curve25519.h"
-#include "sha256.h"
-#include "base32.h"
-
#define EC_COORDINATE_SZ 32
#define EC_PRIV_KEY_SZ 32
#define EC_P256_UNCOMPRESSED_PUB_KEY_SZ (EC_COORDINATE_SZ * 2 + 1)
diff --git a/extra/sps_errs/prog.c b/extra/sps_errs/prog.c
index bf44dd182c..5c614ec55d 100644
--- a/extra/sps_errs/prog.c
+++ b/extra/sps_errs/prog.c
@@ -3,16 +3,16 @@
* found in the LICENSE file.
*/
+#include "ec_commands.h"
+#include "mpsse.h"
+
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
-#include "mpsse.h"
-
-#include "ec_commands.h"
+#include <unistd.h>
static int opt_verbose;
static size_t stop_after = -1;
diff --git a/extra/touchpad_updater/touchpad_updater.c b/extra/touchpad_updater/touchpad_updater.c
index fee898ca06..608a847cd6 100644
--- a/extra/touchpad_updater/touchpad_updater.c
+++ b/extra/touchpad_updater/touchpad_updater.c
@@ -5,17 +5,17 @@
*/
#include <errno.h>
-#include <getopt.h>
-#include <poll.h>
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/select.h>
-#include <unistd.h>
+#include <getopt.h>
#include <libusb.h>
+#include <poll.h>
+#include <sys/select.h>
+#include <unistd.h>
/* Command line options */
static uint16_t vid = 0x18d1; /* Google */
diff --git a/extra/usb_console/usb_console.c b/extra/usb_console/usb_console.c
index aea9eb8293..db1f2a4bec 100644
--- a/extra/usb_console/usb_console.c
+++ b/extra/usb_console/usb_console.c
@@ -5,17 +5,17 @@
*/
#include <errno.h>
-#include <getopt.h>
-#include <poll.h>
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/select.h>
-#include <unistd.h>
+#include <getopt.h>
#include <libusb.h>
+#include <poll.h>
+#include <sys/select.h>
+#include <unistd.h>
/* Options */
static uint16_t vid = 0x18d1; /* Google */
diff --git a/extra/usb_gpio/usb_gpio.c b/extra/usb_gpio/usb_gpio.c
index 7f2121d2b0..41810a6a0e 100644
--- a/extra/usb_gpio/usb_gpio.c
+++ b/extra/usb_gpio/usb_gpio.c
@@ -4,11 +4,12 @@
* found in the LICENSE file.
*/
-#include <libusb.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
+#include <libusb.h>
#include <unistd.h>
#define CHECK(expression) \
diff --git a/extra/usb_updater/desc_parser.c b/extra/usb_updater/desc_parser.c
index 7e9f583902..d75677f0e0 100644
--- a/extra/usb_updater/desc_parser.c
+++ b/extra/usb_updater/desc_parser.c
@@ -4,15 +4,16 @@
* found in the LICENSE file.
*/
+#include "desc_parser.h"
+
#include <ctype.h>
#include <errno.h>
-#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/stat.h>
-#include "desc_parser.h"
+#include <malloc.h>
+#include <sys/stat.h>
static FILE *hash_file_;
static int line_count_;
diff --git a/extra/usb_updater/usb_updater2.c b/extra/usb_updater/usb_updater2.c
index d591811a2b..744bf94b30 100644
--- a/extra/usb_updater/usb_updater2.c
+++ b/extra/usb_updater/usb_updater2.c
@@ -4,29 +4,29 @@
* found in the LICENSE file.
*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
#include <asm/byteorder.h>
#include <endian.h>
#include <fcntl.h>
+#include <fmap.h>
#include <getopt.h>
#include <libusb.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <time.h>
#include <unistd.h>
-#include <fmap.h>
-
#ifndef __packed
#define __packed __attribute__((packed))
#endif
#include "compile_time_macros.h"
#include "misc_util.h"
-#include "usb_descriptor.h"
#include "update_fw.h"
+#include "usb_descriptor.h"
#include "vb21_struct.h"
#ifdef DEBUG