target: remove needless "extern"s
authorDavid Brownell <dbrownell@users.sourceforge.net>
Tue, 8 Dec 2009 21:06:41 +0000 (13:06 -0800)
committerDavid Brownell <dbrownell@users.sourceforge.net>
Tue, 8 Dec 2009 21:06:41 +0000 (13:06 -0800)
Most of these happened to be in the target.h file.

Some of those are associated with symbols that could be
removed at some point ... e.g. NVP_ASSERT/true and its
sibling NVP_DEASSERT/false.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
src/target/cortex_a8.h
src/target/etm.c
src/target/target.c
src/target/target.h

index adffe935a33daa49cfdad20e79427b944dd8fd8b..82a34a762f7956c77feb4a6bed90cd3acf0cf7ac 100644 (file)
@@ -31,8 +31,6 @@
 
 #include <target/armv7a.h>
 
 
 #include <target/armv7a.h>
 
-extern char* cortex_a8_state_strings[];
-
 #define CORTEX_A8_COMMON_MAGIC 0x411fc082
 
 /* See Cortex-A8 TRM section 12.5 */
 #define CORTEX_A8_COMMON_MAGIC 0x411fc082
 
 /* See Cortex-A8 TRM section 12.5 */
index 3aace81ecd1a3c521539b86097f18dd468aab70c..e0671d5039dda7cf427bd143ea958e76db057180 100644 (file)
@@ -27,6 +27,8 @@
 #include "image.h"
 #include "arm_disassembler.h"
 #include "register.h"
 #include "image.h"
 #include "arm_disassembler.h"
 #include "register.h"
+#include "etm_dummy.h"
+#include "oocd_trace.h"
 
 
 /*
 
 
 /*
@@ -613,13 +615,7 @@ static int etm_write_reg(struct reg *reg, uint32_t value)
 }
 
 
 }
 
 
-/* ETM trace analysis functionality
- *
- */
-extern struct etm_capture_driver etm_dummy_capture_driver;
-#if BUILD_OOCD_TRACE == 1
-extern struct etm_capture_driver oocd_trace_capture_driver;
-#endif
+/* ETM trace analysis functionality */
 
 static struct etm_capture_driver *etm_capture_drivers[] =
 {
 
 static struct etm_capture_driver *etm_capture_drivers[] =
 {
index f249d380a7637312795f25d94ef48332d90b04e0..a9f4dd87462356087bb64047f042af4bccc40111 100644 (file)
@@ -90,7 +90,7 @@ struct target *all_targets = NULL;
 struct target_event_callback *target_event_callbacks = NULL;
 struct target_timer_callback *target_timer_callbacks = NULL;
 
 struct target_event_callback *target_event_callbacks = NULL;
 struct target_timer_callback *target_timer_callbacks = NULL;
 
-const Jim_Nvp nvp_assert[] = {
+static const Jim_Nvp nvp_assert[] = {
        { .name = "assert", NVP_ASSERT },
        { .name = "deassert", NVP_DEASSERT },
        { .name = "T", NVP_ASSERT },
        { .name = "assert", NVP_ASSERT },
        { .name = "deassert", NVP_DEASSERT },
        { .name = "T", NVP_ASSERT },
@@ -100,7 +100,7 @@ const Jim_Nvp nvp_assert[] = {
        { .name = NULL, .value = -1 }
 };
 
        { .name = NULL, .value = -1 }
 };
 
-const Jim_Nvp nvp_error_target[] = {
+static const Jim_Nvp nvp_error_target[] = {
        { .value = ERROR_TARGET_INVALID, .name = "err-invalid" },
        { .value = ERROR_TARGET_INIT_FAILED, .name = "err-init-failed" },
        { .value = ERROR_TARGET_TIMEOUT, .name = "err-timeout" },
        { .value = ERROR_TARGET_INVALID, .name = "err-invalid" },
        { .value = ERROR_TARGET_INIT_FAILED, .name = "err-init-failed" },
        { .value = ERROR_TARGET_TIMEOUT, .name = "err-timeout" },
@@ -178,7 +178,7 @@ static const Jim_Nvp nvp_target_event[] = {
        { .name = NULL, .value = -1 }
 };
 
        { .name = NULL, .value = -1 }
 };
 
-const Jim_Nvp nvp_target_state[] = {
+static const Jim_Nvp nvp_target_state[] = {
        { .name = "unknown", .value = TARGET_UNKNOWN },
        { .name = "running", .value = TARGET_RUNNING },
        { .name = "halted",  .value = TARGET_HALTED },
        { .name = "unknown", .value = TARGET_UNKNOWN },
        { .name = "running", .value = TARGET_RUNNING },
        { .name = "halted",  .value = TARGET_HALTED },
@@ -198,7 +198,7 @@ static const Jim_Nvp nvp_target_debug_reason [] = {
        { .name = NULL, .value = -1 },
 };
 
        { .name = NULL, .value = -1 },
 };
 
-const Jim_Nvp nvp_target_endian[] = {
+static const Jim_Nvp nvp_target_endian[] = {
        { .name = "big",    .value = TARGET_BIG_ENDIAN },
        { .name = "little", .value = TARGET_LITTLE_ENDIAN },
        { .name = "be",     .value = TARGET_BIG_ENDIAN },
        { .name = "big",    .value = TARGET_BIG_ENDIAN },
        { .name = "little", .value = TARGET_LITTLE_ENDIAN },
        { .name = "be",     .value = TARGET_BIG_ENDIAN },
@@ -206,7 +206,7 @@ const Jim_Nvp nvp_target_endian[] = {
        { .name = NULL,     .value = -1 },
 };
 
        { .name = NULL,     .value = -1 },
 };
 
-const Jim_Nvp nvp_reset_modes[] = {
+static const Jim_Nvp nvp_reset_modes[] = {
        { .name = "unknown", .value = RESET_UNKNOWN },
        { .name = "run"    , .value = RESET_RUN },
        { .name = "halt"   , .value = RESET_HALT },
        { .name = "unknown", .value = RESET_UNKNOWN },
        { .name = "run"    , .value = RESET_RUN },
        { .name = "halt"   , .value = RESET_HALT },
index dd3d4f7f5f2b0dcb9b74022ac2eb728dcdb3cecb..fededb95651890dff987417a4a5ae43f711f9306 100644 (file)
@@ -61,15 +61,11 @@ enum target_state
        TARGET_DEBUG_RUNNING = 4,
 };
 
        TARGET_DEBUG_RUNNING = 4,
 };
 
-extern const Jim_Nvp nvp_target_state[];
-
 enum nvp_assert {
        NVP_DEASSERT,
        NVP_ASSERT,
 };
 
 enum nvp_assert {
        NVP_DEASSERT,
        NVP_ASSERT,
 };
 
-extern const Jim_Nvp nvp_assert[];
-
 enum target_reset_mode
 {
        RESET_UNKNOWN = 0,
 enum target_reset_mode
 {
        RESET_UNKNOWN = 0,
@@ -78,8 +74,6 @@ enum target_reset_mode
        RESET_INIT = 3,         /* reset and halt target out of reset, then run init script */
 };
 
        RESET_INIT = 3,         /* reset and halt target out of reset, then run init script */
 };
 
-extern const Jim_Nvp nvp_reset_mode[];
-
 enum target_debug_reason
 {
        DBG_REASON_DBGRQ = 0,
 enum target_debug_reason
 {
        DBG_REASON_DBGRQ = 0,
@@ -97,8 +91,6 @@ enum target_endianess
        TARGET_BIG_ENDIAN = 1, TARGET_LITTLE_ENDIAN = 2
 };
 
        TARGET_BIG_ENDIAN = 1, TARGET_LITTLE_ENDIAN = 2
 };
 
-extern const Jim_Nvp nvp_target_endian[];
-
 struct working_area
 {
        uint32_t address;
 struct working_area
 {
        uint32_t address;
@@ -490,8 +482,6 @@ void target_all_handle_event(enum target_event e);
 #define ERROR_TARGET_NOT_RUNNING (-310)
 #define ERROR_TARGET_NOT_EXAMINED (-311)
 
 #define ERROR_TARGET_NOT_RUNNING (-310)
 #define ERROR_TARGET_NOT_EXAMINED (-311)
 
-extern const Jim_Nvp nvp_error_target[];
-
 const char *target_strerror_safe(int err);
 
 #endif /* TARGET_H */
 const char *target_strerror_safe(int err);
 
 #endif /* TARGET_H */

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)