From 9f3f2d7d714908c1f8f3f77baebe9175682f02bc Mon Sep 17 00:00:00 2001 From: Karol Trzcinski Date: Wed, 13 May 2020 16:03:34 +0200 Subject: [PATCH] headers: Use full path to header Path added to include should end at 'include' as usual, then it is easy to see where specific headers comes from during reading source code. It is especially important for projects composed from a few parts, like firmware, driver, build and debug tools in this project. Moreover changed "" to <> in include directives because there is specified full path to file from project include root and to be aligned with code style from firmware repository, Signed-off-by: Karol Trzcinski --- CMakeLists.txt | 3 +-- src/cse.c | 6 +++--- src/css.c | 6 +++--- src/elf.c | 6 +++--- src/ext_manifest.c | 6 +++--- src/file_simple.c | 2 +- src/hash.c | 4 ++-- src/include/rimage/ext_manifest_gen.h | 2 +- src/include/rimage/manifest.h | 8 ++++---- src/include/rimage/rimage.h | 2 +- src/man_apl.c | 8 ++++---- src/man_cnl.c | 8 ++++---- src/man_kbl.c | 8 ++++---- src/man_sue.c | 8 ++++---- src/man_tgl.c | 8 ++++---- src/manifest.c | 12 ++++++------ src/pkcs1_5.c | 6 +++--- src/plat_auth.c | 6 +++--- src/rimage.c | 6 +++--- 19 files changed, 57 insertions(+), 58 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 559f9695a..fb0c5fdc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,8 +29,7 @@ target_compile_options(rimage PRIVATE target_link_libraries(rimage PRIVATE "-lcrypto") target_include_directories(rimage PRIVATE - src/include/rimage - src/include/rimage/sof + src/include/ ) install(TARGETS rimage DESTINATION bin) diff --git a/src/cse.c b/src/cse.c index f3bea3826..75f7630a6 100644 --- a/src/cse.c +++ b/src/cse.c @@ -6,9 +6,9 @@ // Keyon Jie #include -#include "rimage.h" -#include "cse.h" -#include "manifest.h" +#include +#include +#include void ri_cse_create(struct image *image) { diff --git a/src/css.c b/src/css.c index 1e9de6d8b..f2627e6f5 100644 --- a/src/css.c +++ b/src/css.c @@ -7,9 +7,9 @@ #include #include -#include "rimage.h" -#include "css.h" -#include "manifest.h" +#include +#include +#include void ri_css_v1_8_hdr_create(struct image *image) { diff --git a/src/elf.c b/src/elf.c index 34a9aa775..f53adcd75 100644 --- a/src/elf.c +++ b/src/elf.c @@ -7,9 +7,9 @@ #include #include -#include "rimage.h" -#include "cse.h" -#include "manifest.h" +#include +#include +#include static int elf_read_sections(struct image *image, struct module *module, int module_index) diff --git a/src/ext_manifest.c b/src/ext_manifest.c index bb220ae38..8f079bb9b 100644 --- a/src/ext_manifest.c +++ b/src/ext_manifest.c @@ -9,9 +9,9 @@ #include #include -#include "ext_manifest_gen.h" -#include "kernel/ext_manifest.h" -#include "rimage.h" +#include +#include +#include const struct ext_man_header ext_man_template = { .magic = EXT_MAN_MAGIC_NUMBER, diff --git a/src/file_simple.c b/src/file_simple.c index d570c5a8b..1adcaa738 100644 --- a/src/file_simple.c +++ b/src/file_simple.c @@ -8,7 +8,7 @@ #include #include -#include "rimage.h" +#include #define BYT_IRAM_BASE 0xff2c0000 #define BYT_IRAM_HOST_OFFSET 0x0C0000 diff --git a/src/hash.c b/src/hash.c index 62c4e2f35..a38e64c39 100644 --- a/src/hash.c +++ b/src/hash.c @@ -17,8 +17,8 @@ #include #include -#include "rimage.h" -#include "manifest.h" +#include +#include #if OPENSSL_VERSION_NUMBER < 0x10100000L void EVP_MD_CTX_free(EVP_MD_CTX *ctx); diff --git a/src/include/rimage/ext_manifest_gen.h b/src/include/rimage/ext_manifest_gen.h index 5bb8b7472..e91ba229c 100644 --- a/src/include/rimage/ext_manifest_gen.h +++ b/src/include/rimage/ext_manifest_gen.h @@ -27,7 +27,7 @@ #ifndef __EXT_MAN_H__ #define __EXT_MAN_H__ -#include "rimage.h" +#include #define EXT_MAN_DATA_SECTION ".fw_metadata" diff --git a/src/include/rimage/manifest.h b/src/include/rimage/manifest.h index 32e0574e8..7f74b80e7 100644 --- a/src/include/rimage/manifest.h +++ b/src/include/rimage/manifest.h @@ -7,10 +7,10 @@ #define __MANIFEST_H__ #include -#include -#include "css.h" -#include "cse.h" -#include "plat_auth.h" +#include +#include +#include +#include #define MAN_PAGE_SIZE 4096 diff --git a/src/include/rimage/rimage.h b/src/include/rimage/rimage.h index 3eb375c7c..04518ed59 100644 --- a/src/include/rimage/rimage.h +++ b/src/include/rimage/rimage.h @@ -14,7 +14,7 @@ #include #include #include -#include +#include #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) #define MAX_MODULES 32 diff --git a/src/man_apl.c b/src/man_apl.c index b81bb759b..616084b5f 100644 --- a/src/man_apl.c +++ b/src/man_apl.c @@ -2,10 +2,10 @@ // // Copyright(c) 2017 Intel Corporation. All rights reserved. -#include "css.h" -#include "cse.h" -#include "plat_auth.h" -#include "manifest.h" +#include +#include +#include +#include /* manifest template */ struct fw_image_manifest_v1_8 apl_manifest = { diff --git a/src/man_cnl.c b/src/man_cnl.c index 72ec89871..cf51089d3 100644 --- a/src/man_cnl.c +++ b/src/man_cnl.c @@ -2,10 +2,10 @@ // // Copyright(c) 2017 Intel Corporation. All rights reserved. -#include "css.h" -#include "cse.h" -#include "plat_auth.h" -#include "manifest.h" +#include +#include +#include +#include /* manifest template */ struct fw_image_manifest_v1_8 cnl_manifest = { diff --git a/src/man_kbl.c b/src/man_kbl.c index 4a078e5d9..9634e01a8 100644 --- a/src/man_kbl.c +++ b/src/man_kbl.c @@ -2,10 +2,10 @@ // // Copyright(c) 2018 Intel Corporation. All rights reserved. -#include "css.h" -#include "cse.h" -#include "plat_auth.h" -#include "manifest.h" +#include +#include +#include +#include /* * TODO: check if all platform for 1.5 are the same base and length. diff --git a/src/man_sue.c b/src/man_sue.c index e170d9952..8c7df5a29 100644 --- a/src/man_sue.c +++ b/src/man_sue.c @@ -2,10 +2,10 @@ // // Copyright(c) 2017 Intel Corporation. All rights reserved. -#include "css.h" -#include "cse.h" -#include "plat_auth.h" -#include "manifest.h" +#include +#include +#include +#include /* manifest template */ struct fw_image_manifest_v1_5_sue sue_manifest = { diff --git a/src/man_tgl.c b/src/man_tgl.c index f7c3c6f25..97ee4ed08 100644 --- a/src/man_tgl.c +++ b/src/man_tgl.c @@ -2,10 +2,10 @@ // // Copyright(c) 2019 Intel Corporation. All rights reserved. -#include "css.h" -#include "cse.h" -#include "plat_auth.h" -#include "manifest.h" +#include +#include +#include +#include /* manifest template */ struct fw_image_manifest_v2_5 tgl_manifest = { diff --git a/src/manifest.c b/src/manifest.c index ff99af9d1..6a389bad6 100644 --- a/src/manifest.c +++ b/src/manifest.c @@ -14,13 +14,13 @@ #include #include -#include +#include -#include "rimage.h" -#include "css.h" -#include "cse.h" -#include "plat_auth.h" -#include "manifest.h" +#include +#include +#include +#include +#include static int man_open_rom_file(struct image *image) { diff --git a/src/pkcs1_5.c b/src/pkcs1_5.c index a55abb9d3..b4718bd0c 100644 --- a/src/pkcs1_5.c +++ b/src/pkcs1_5.c @@ -17,9 +17,9 @@ #include #include -#include "rimage.h" -#include "css.h" -#include "manifest.h" +#include +#include +#include #if OPENSSL_VERSION_NUMBER < 0x10100000L void RSA_get0_key(const RSA *r, diff --git a/src/plat_auth.c b/src/plat_auth.c index e8645611f..9b451798a 100644 --- a/src/plat_auth.c +++ b/src/plat_auth.c @@ -5,9 +5,9 @@ // Author: Liam Girdwood // Keyon Jie -#include "rimage.h" -#include "manifest.h" -#include "plat_auth.h" +#include +#include +#include void ri_adsp_meta_data_create_v1_8(struct image *image, int meta_start_offset, int meta_end_offset) diff --git a/src/rimage.c b/src/rimage.c index 2bb0d6e77..5c5c15177 100644 --- a/src/rimage.c +++ b/src/rimage.c @@ -8,9 +8,9 @@ #include #include -#include "ext_manifest_gen.h" -#include "rimage.h" -#include "manifest.h" +#include +#include +#include static const struct adsp *machine[] = { &machine_byt,