xtensa: make local symbols static 67/7167/2
authorAntonio Borneo <borneo.antonio@gmail.com>
Mon, 5 Sep 2022 21:55:25 +0000 (23:55 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Tue, 13 Sep 2022 22:10:57 +0000 (22:10 +0000)
Symbols that are not exported should be declared as static.

Change-Id: Ieb627f7f896e4663b0d5b18c4ab1853b39d23d03
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7167
Reviewed-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Reviewed-by: Ian Thompson <ianst@cadence.com>
Tested-by: jenkins
src/target/espressif/esp32.c
src/target/espressif/esp32s2.c
src/target/espressif/esp32s3.c
src/target/espressif/esp_semihosting.c
src/target/xtensa/xtensa.c
src/target/xtensa/xtensa_chip.c

index 8ad8bad8351056c60561cb582f9dea9d27565dc9..9f36ca5a434c45f5cf35f57b9a223c9346683549 100644 (file)
@@ -101,7 +101,7 @@ static inline struct esp32_common *target_to_esp32(struct target *target)
  * 6. restore initial PC and the contents of ESP32_SMP_RTC_DATA_LOW
  * TODO: some state of RTC_CNTL is not reset during SW_SYS_RST. Need to reset that manually. */
 
-const uint8_t esp32_reset_stub_code[] = {
+static const uint8_t esp32_reset_stub_code[] = {
 #include "../../../contrib/loaders/reset/espressif/esp32/cpu_reset_handler_code.inc"
 };
 
@@ -365,7 +365,7 @@ static int esp32_target_create(struct target *target, Jim_Interp *interp)
        return ERROR_OK;
 }
 
-COMMAND_HELPER(esp32_cmd_flashbootstrap_do, struct esp32_common *esp32)
+static COMMAND_HELPER(esp32_cmd_flashbootstrap_do, struct esp32_common *esp32)
 {
        int state = -1;
 
index 4aef3791bf67ccf05a0b8dbddf857043a1ef2f20..089534cfe2c1fcccf51c6b66dd2d65ab612b0745 100644 (file)
@@ -122,7 +122,7 @@ static int esp32s2_deassert_reset(struct target *target)
        return ERROR_OK;
 }
 
-int esp32s2_soft_reset_halt(struct target *target)
+static int esp32s2_soft_reset_halt(struct target *target)
 {
        LOG_TARGET_DEBUG(target, "begin");
 
index 0da8552a35abb4a2e52500689c2ca940fd35e5db..58267956ab3f36fb15209b644cb8f20919418bf6 100644 (file)
@@ -96,7 +96,7 @@ struct esp32s3_common {
  * PRO CPU is halted, APP CPU is in reset.
  */
 
-const uint8_t esp32s3_reset_stub_code[] = {
+static const uint8_t esp32s3_reset_stub_code[] = {
 #include "../../../contrib/loaders/reset/espressif/esp32s3/cpu_reset_handler_code.inc"
 };
 
index b1edef31d02bdb18431554b4c72ea8923bb337b5..f9e8b020011f098f86e220327aa6216843765830 100644 (file)
@@ -15,7 +15,7 @@
 #include "esp_semihosting.h"
 #include "esp_xtensa.h"
 
-struct esp_semihost_data *target_to_esp_semihost_data(struct target *target)
+static struct esp_semihost_data __attribute__((unused)) *target_to_esp_semihost_data(struct target *target)
 {
        const char *arch = target_get_gdb_arch(target);
        if (arch) {
@@ -27,7 +27,7 @@ struct esp_semihost_data *target_to_esp_semihost_data(struct target *target)
        return NULL;
 }
 
-int esp_semihosting_sys_seek(struct target *target, uint64_t fd, uint32_t pos, size_t whence)
+static int esp_semihosting_sys_seek(struct target *target, uint64_t fd, uint32_t pos, size_t whence)
 {
        struct semihosting *semihosting = target->semihosting;
 
index 2e978b387fbed5e8ccfabe056ec49e4d42e79625..a6e50ccc71f8a4c4811c36ac8bb8adbe1c5ba292 100644 (file)
@@ -300,7 +300,7 @@ union xtensa_reg_val_u {
        uint8_t buf[4];
 };
 
-const struct xtensa_keyval_info_s xt_qerr[XT_QERR_NUM] = {
+static const struct xtensa_keyval_info_s xt_qerr[XT_QERR_NUM] = {
        { .chrval = "E00", .intval = ERROR_FAIL },
        { .chrval = "E01", .intval = ERROR_FAIL },
        { .chrval = "E02", .intval = ERROR_COMMAND_ARGUMENT_INVALID },
@@ -519,7 +519,7 @@ static int xtensa_queue_pwr_reg_write(struct xtensa *xtensa, unsigned int reg, u
 }
 
 /* NOTE: Assumes A3 has already been saved */
-int xtensa_window_state_save(struct target *target, uint32_t *woe)
+static int xtensa_window_state_save(struct target *target, uint32_t *woe)
 {
        struct xtensa *xtensa = target_to_xtensa(target);
        int woe_dis;
@@ -547,7 +547,7 @@ int xtensa_window_state_save(struct target *target, uint32_t *woe)
 }
 
 /* NOTE: Assumes A3 has already been saved */
-void xtensa_window_state_restore(struct target *target, uint32_t woe)
+static void xtensa_window_state_restore(struct target *target, uint32_t woe)
 {
        struct xtensa *xtensa = target_to_xtensa(target);
        if (xtensa->core_config->windowed) {
@@ -2983,7 +2983,7 @@ const char *xtensa_get_gdb_arch(struct target *target)
 }
 
 /* exe <ascii-encoded hexadecimal instruction bytes> */
-COMMAND_HELPER(xtensa_cmd_exe_do, struct target *target)
+static COMMAND_HELPER(xtensa_cmd_exe_do, struct target *target)
 {
        struct xtensa *xtensa = target_to_xtensa(target);
 
index c609245a2dc9d6e22587371c27281224139267f3..6e19313499ae50bd6f10bee8c7103d8f132f3ce9 100644 (file)
@@ -120,7 +120,7 @@ static int xtensa_chip_target_create(struct target *target, Jim_Interp *interp)
        return ERROR_OK;
 }
 
-void xtensa_chip_target_deinit(struct target *target)
+static void xtensa_chip_target_deinit(struct target *target)
 {
        struct xtensa *xtensa = target_to_xtensa(target);
        xtensa_target_deinit(target);
@@ -136,7 +136,7 @@ static int xtensa_chip_examine(struct target *target)
        return retval;
 }
 
-int xtensa_chip_jim_configure(struct target *target, struct jim_getopt_info *goi)
+static int xtensa_chip_jim_configure(struct target *target, struct jim_getopt_info *goi)
 {
        static bool dap_configured;
        int ret = adiv5_jim_configure(target, goi);

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)