]> www.infradead.org Git - users/borneoa/openocd-next.git/commitdiff
target: drop unused parameter to target_create()
authorAntonio Borneo <borneo.antonio@gmail.com>
Sun, 6 Apr 2025 12:10:28 +0000 (14:10 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 19 Apr 2025 09:23:18 +0000 (09:23 +0000)
The parameter Jim_Interp to the target API target_create() is not
used by any target.

Drop it.

Change-Id: I67c492078a6c808db974505f9e297c45165f64d0
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8831
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
36 files changed:
src/target/aarch64.c
src/target/arc.c
src/target/arm11.c
src/target/arm720t.c
src/target/arm7tdmi.c
src/target/arm920t.c
src/target/arm926ejs.c
src/target/arm946e.c
src/target/arm966e.c
src/target/arm9tdmi.c
src/target/avr32_ap7k.c
src/target/avrt.c
src/target/cortex_a.c
src/target/cortex_m.c
src/target/dsp563xx.c
src/target/dsp5680xx.c
src/target/esirisc.c
src/target/espressif/esp32.c
src/target/espressif/esp32s2.c
src/target/espressif/esp32s3.c
src/target/fa526.c
src/target/feroceon.c
src/target/hla_target.c
src/target/ls1_sap.c
src/target/mem_ap.c
src/target/mips_m4k.c
src/target/mips_mips64.c
src/target/openrisc/or1k.c
src/target/quark_d20xx.c
src/target/quark_x10xx.c
src/target/riscv/riscv.c
src/target/stm8.c
src/target/target.c
src/target/target_type.h
src/target/xscale.c
src/target/xtensa/xtensa_chip.c

index ce7808e3ac5134691cdaebb19654660b0453e3d8..101cb14408c8ac3a1f0e4f783a77de1a2d5ac811 100644 (file)
@@ -2814,7 +2814,7 @@ static int aarch64_init_arch_info(struct target *target,
        return ERROR_OK;
 }
 
-static int armv8r_target_create(struct target *target, Jim_Interp *interp)
+static int armv8r_target_create(struct target *target)
 {
        struct aarch64_private_config *pc = target->private_config;
        struct aarch64_common *aarch64;
@@ -2833,7 +2833,7 @@ static int armv8r_target_create(struct target *target, Jim_Interp *interp)
        return aarch64_init_arch_info(target, aarch64, pc->adiv5_config.dap);
 }
 
-static int aarch64_target_create(struct target *target, Jim_Interp *interp)
+static int aarch64_target_create(struct target *target)
 {
        struct aarch64_private_config *pc = target->private_config;
        struct aarch64_common *aarch64;
index 8757cafedc6ca0eaff896be5dbc4df6c3cccbeb9..f2482c25ef4a77220bf76439aa225ced7c4f0e73 100644 (file)
@@ -1424,7 +1424,7 @@ static void arc_deinit_target(struct target *target)
 }
 
 
-static int arc_target_create(struct target *target, Jim_Interp *interp)
+static int arc_target_create(struct target *target)
 {
        struct arc_common *arc = calloc(1, sizeof(*arc));
 
index 756b36b9597715b7331c75072d1f023c26107755..583830f948790551f9301232f8d081958bf860b8 100644 (file)
@@ -1079,7 +1079,7 @@ static int arm11_remove_breakpoint(struct target *target,
        return ERROR_OK;
 }
 
-static int arm11_target_create(struct target *target, Jim_Interp *interp)
+static int arm11_target_create(struct target *target)
 {
        struct arm11_common *arm11;
 
index beab632c257715329ea8e1431d245151dea606fb..d1433dde729b25b4d35a16d67d51440c2b0c61cd 100644 (file)
@@ -412,7 +412,7 @@ static int arm720t_init_arch_info(struct target *target,
        return ERROR_OK;
 }
 
-static int arm720t_target_create(struct target *target, Jim_Interp *interp)
+static int arm720t_target_create(struct target *target)
 {
        struct arm720t_common *arm720t = calloc(1, sizeof(*arm720t));
 
index 393d3b46af1b3c5af1a630266b3e5d350a071143..2f59254afd79187d37b8ce4911a43983e6767186 100644 (file)
@@ -669,7 +669,7 @@ int arm7tdmi_init_arch_info(struct target *target,
        return ERROR_OK;
 }
 
-static int arm7tdmi_target_create(struct target *target, Jim_Interp *interp)
+static int arm7tdmi_target_create(struct target *target)
 {
        struct arm7_9_common *arm7_9;
 
index 53b4d9d15f3ac6240f81c7fef9b8e9a6de46fa57..95cfd7ceb268af1ad42d8dd526446b2c6aa1f4a1 100644 (file)
@@ -833,7 +833,7 @@ static int arm920t_init_arch_info(struct target *target,
        return ERROR_OK;
 }
 
-static int arm920t_target_create(struct target *target, Jim_Interp *interp)
+static int arm920t_target_create(struct target *target)
 {
        struct arm920t_common *arm920t;
 
index add90c99786878b5a7550b682670088c242e8632..053110656263ffa72d9b1f553135e6ec01147ae5 100644 (file)
@@ -702,7 +702,7 @@ int arm926ejs_init_arch_info(struct target *target, struct arm926ejs_common *arm
        return ERROR_OK;
 }
 
-static int arm926ejs_target_create(struct target *target, Jim_Interp *interp)
+static int arm926ejs_target_create(struct target *target)
 {
        struct arm926ejs_common *arm926ejs = calloc(1, sizeof(struct arm926ejs_common));
 
index 03f7e443fb57a931f26adcdf16bbf3049442bbd9..828e70f4bcb21e4984ea830f599c39e6f44d12bd 100644 (file)
@@ -79,7 +79,7 @@ static int arm946e_init_arch_info(struct target *target,
        return ERROR_OK;
 }
 
-static int arm946e_target_create(struct target *target, Jim_Interp *interp)
+static int arm946e_target_create(struct target *target)
 {
        struct arm946e_common *arm946e = calloc(1, sizeof(struct arm946e_common));
 
index 8598d29d9b3438506d197119f2e261bd5655884c..b6bcc8ba9770b6c700622c3d93d5c8fcbaa0ef84 100644 (file)
@@ -38,7 +38,7 @@ int arm966e_init_arch_info(struct target *target, struct arm966e_common *arm966e
        return ERROR_OK;
 }
 
-static int arm966e_target_create(struct target *target, Jim_Interp *interp)
+static int arm966e_target_create(struct target *target)
 {
        struct arm966e_common *arm966e = calloc(1, sizeof(struct arm966e_common));
 
index 7e31306b6cfcf4921a47ab8cf4411a75d8b0fbfd..8ab12de3206dbf1be2c278bcdfdedaad1e09f619 100644 (file)
@@ -765,7 +765,7 @@ int arm9tdmi_init_arch_info(struct target *target,
        return ERROR_OK;
 }
 
-static int arm9tdmi_target_create(struct target *target, Jim_Interp *interp)
+static int arm9tdmi_target_create(struct target *target)
 {
        struct arm7_9_common *arm7_9 = calloc(1, sizeof(struct arm7_9_common));
 
index 1b051dc014e3ecf180801a39da175210a84c55d1..94962c20551c2e54514886067c0f5a00e3c95b14 100644 (file)
@@ -510,7 +510,7 @@ static int avr32_ap7k_init_target(struct command_context *cmd_ctx,
        return ERROR_OK;
 }
 
-static int avr32_ap7k_target_create(struct target *target, Jim_Interp *interp)
+static int avr32_ap7k_target_create(struct target *target)
 {
        struct avr32_ap7k_common *ap7k = calloc(1, sizeof(struct
                        avr32_ap7k_common));
index 3afe32015796cd8e5edab205eedc860b81b749be..e25718bcc2105fee336b7082e890a3865460330f 100644 (file)
@@ -16,7 +16,7 @@
 #define AVR_JTAG_INS_LEN       4
 
 /* forward declarations */
-static int avr_target_create(struct target *target, Jim_Interp *interp);
+static int avr_target_create(struct target *target);
 static int avr_init_target(struct command_context *cmd_ctx, struct target *target);
 
 static int avr_arch_state(struct target *target);
@@ -68,7 +68,7 @@ struct target_type avr_target = {
        .init_target = avr_init_target,
 };
 
-static int avr_target_create(struct target *target, Jim_Interp *interp)
+static int avr_target_create(struct target *target)
 {
        struct avr_common *avr = calloc(1, sizeof(struct avr_common));
 
index 9c60645586ab1e9af4b1fb4c6cccd3e359d9803a..ee27e1b21722c3cae01d413e4eef0e72eacc2a71 100644 (file)
@@ -3126,7 +3126,7 @@ static int cortex_a_init_arch_info(struct target *target,
        return ERROR_OK;
 }
 
-static int cortex_a_target_create(struct target *target, Jim_Interp *interp)
+static int cortex_a_target_create(struct target *target)
 {
        struct cortex_a_common *cortex_a;
        struct adiv5_private_config *pc;
@@ -3148,7 +3148,7 @@ static int cortex_a_target_create(struct target *target, Jim_Interp *interp)
        return cortex_a_init_arch_info(target, cortex_a, pc->dap);
 }
 
-static int cortex_r4_target_create(struct target *target, Jim_Interp *interp)
+static int cortex_r4_target_create(struct target *target)
 {
        struct cortex_a_common *cortex_a;
        struct adiv5_private_config *pc;
index e17f23c1d3476404019ee03b62ea6bada3204100..ba9d83d79faf66b020ac0f573edb673e7beef4a9 100644 (file)
@@ -2916,7 +2916,7 @@ static int cortex_m_init_arch_info(struct target *target,
        return ERROR_OK;
 }
 
-static int cortex_m_target_create(struct target *target, Jim_Interp *interp)
+static int cortex_m_target_create(struct target *target)
 {
        struct adiv5_private_config *pc;
 
index 9b6f4756c9c674910976cb2a8b0c7a41fdd92d27..dc85a218009780cdb432b029c20854268c08b2b3 100644 (file)
@@ -880,7 +880,7 @@ static void dsp563xx_invalidate_x_context(struct target *target,
        }
 }
 
-static int dsp563xx_target_create(struct target *target, Jim_Interp *interp)
+static int dsp563xx_target_create(struct target *target)
 {
        struct dsp563xx_common *dsp563xx = calloc(1, sizeof(struct dsp563xx_common));
 
index 3f9a6742c43eb54914b926f3029d2c77f46c0413..65efbae32420cf3784c18ba227569e9982998cd7 100644 (file)
@@ -855,7 +855,7 @@ static int eonce_pc_store(struct target *target)
        return ERROR_OK;
 }
 
-static int dsp5680xx_target_create(struct target *target, Jim_Interp *interp)
+static int dsp5680xx_target_create(struct target *target)
 {
        struct dsp5680xx_common *dsp5680xx =
                calloc(1, sizeof(struct dsp5680xx_common));
index da40928da91c538bcd541b3ba204fcdbbc6b1ba7..fac5dc72ee69f8601218826ac30eaf3c83d73d09 100644 (file)
@@ -1575,7 +1575,7 @@ static int esirisc_identify(struct target *target)
        return ERROR_OK;
 }
 
-static int esirisc_target_create(struct target *target, Jim_Interp *interp)
+static int esirisc_target_create(struct target *target)
 {
        struct jtag_tap *tap = target->tap;
        struct esirisc_common *esirisc;
index 4deb5e070914012fb8b0dced2ee6960db6c2894f..399ba8e7cd7ef84e8966b3e184a24ed7a231c12a 100644 (file)
@@ -326,7 +326,7 @@ static const struct esp_semihost_ops esp32_semihost_ops = {
        .prepare = esp32_disable_wdts
 };
 
-static int esp32_target_create(struct target *target, Jim_Interp *interp)
+static int esp32_target_create(struct target *target)
 {
        struct xtensa_debug_module_config esp32_dm_cfg = {
                .dbg_ops = &esp32_dbg_ops,
index 4f3914f66acb20551ac739c94c2492573df397c9..b86e43e626c32eb252cceff9d303311dff94096c 100644 (file)
@@ -445,7 +445,7 @@ static const struct esp_semihost_ops esp32s2_semihost_ops = {
        .prepare = esp32s2_disable_wdts
 };
 
-static int esp32s2_target_create(struct target *target, Jim_Interp *interp)
+static int esp32s2_target_create(struct target *target)
 {
        struct xtensa_debug_module_config esp32s2_dm_cfg = {
                .dbg_ops = &esp32s2_dbg_ops,
index 7507c11c245834785aa9c4a2908b41e29015aef2..82413f77fb0ccbf19ea0922ebc90ce54500f70a1 100644 (file)
@@ -320,7 +320,7 @@ static const struct esp_semihost_ops esp32s3_semihost_ops = {
        .prepare = esp32s3_disable_wdts
 };
 
-static int esp32s3_target_create(struct target *target, Jim_Interp *interp)
+static int esp32s3_target_create(struct target *target)
 {
        struct xtensa_debug_module_config esp32s3_dm_cfg = {
                .dbg_ops = &esp32s3_dbg_ops,
index 38b7ab2e9df8eb63f672bee09fb9508b85f33136..d832d3e7d13c67ada7de550e6295fdf4574fb140 100644 (file)
@@ -329,7 +329,7 @@ static int fa526_init_arch_info(struct target *target,
        return ERROR_OK;
 }
 
-static int fa526_target_create(struct target *target, Jim_Interp *interp)
+static int fa526_target_create(struct target *target)
 {
        struct arm920t_common *arm920t = calloc(1, sizeof(struct arm920t_common));
 
index 840ca1b62b2969d7e1f47b968a704a7b2be656a0..cf2c838b7d8c42a3b61dd3e67e0f205da4121cdf 100644 (file)
@@ -622,7 +622,7 @@ static void feroceon_common_setup(struct target *target)
        arm7_9->wp1_used_default = -1;
 }
 
-static int feroceon_target_create(struct target *target, Jim_Interp *interp)
+static int feroceon_target_create(struct target *target)
 {
        struct arm926ejs_common *arm926ejs = calloc(1, sizeof(struct arm926ejs_common));
 
@@ -640,7 +640,7 @@ static int feroceon_target_create(struct target *target, Jim_Interp *interp)
        return ERROR_OK;
 }
 
-static int dragonite_target_create(struct target *target, Jim_Interp *interp)
+static int dragonite_target_create(struct target *target)
 {
        struct arm966e_common *arm966e = calloc(1, sizeof(struct arm966e_common));
 
index ef05df20278c1c39e3aace1ba9d19b26ab2b553e..983cd87394cb896ed82255add0b035cac3cbd319 100644 (file)
@@ -187,8 +187,7 @@ static int adapter_init_target(struct command_context *cmd_ctx,
        return ERROR_OK;
 }
 
-static int adapter_target_create(struct target *target,
-               Jim_Interp *interp)
+static int adapter_target_create(struct target *target)
 {
        LOG_DEBUG("%s", __func__);
        struct adiv5_private_config *pc = target->private_config;
index 692f4cc9e42697a54aed0670d49c133f5d674933..49335a8b9f03d293e0b27446c265d71532ce389d 100644 (file)
@@ -17,7 +17,7 @@ struct ls1_sap {
        struct jtag_tap *tap;
 };
 
-static int ls1_sap_target_create(struct target *target, Jim_Interp *interp)
+static int ls1_sap_target_create(struct target *target)
 {
        struct ls1_sap *ls1_sap = calloc(1, sizeof(struct ls1_sap));
 
index fdc52c307150e29d57650c1e35ef9e10b82a1f55..c5618c9ccd709d5367e1deb751e3743c2eab174a 100644 (file)
@@ -24,7 +24,7 @@ struct mem_ap {
        uint64_t ap_num;
 };
 
-static int mem_ap_target_create(struct target *target, Jim_Interp *interp)
+static int mem_ap_target_create(struct target *target)
 {
        struct mem_ap *mem_ap;
        struct adiv5_private_config *pc;
index dc74501086ce4372b3098025b043d491356f3d41..4e27914a9da7d7c929f2af217bdce9b7008d6749 100644 (file)
@@ -1158,7 +1158,7 @@ static int mips_m4k_init_arch_info(struct target *target,
        return ERROR_OK;
 }
 
-static int mips_m4k_target_create(struct target *target, Jim_Interp *interp)
+static int mips_m4k_target_create(struct target *target)
 {
        struct mips_m4k_common *mips_m4k = calloc(1, sizeof(struct mips_m4k_common));
 
index 85e3779375fdf47620106ea08e1240db82f4a441..a181a154ee49e5c8df0b5664b0d17194044a0afc 100644 (file)
@@ -1082,7 +1082,7 @@ static int mips_mips64_init_target(struct command_context *cmd_ctx,
        return mips64_build_reg_cache(target);
 }
 
-static int mips_mips64_target_create(struct target *target, Jim_Interp *interp)
+static int mips_mips64_target_create(struct target *target)
 {
        struct mips_mips64_common *mips_mips64;
        struct mips64_common *mips64;
index 4b9d3bca689df976fb3f25fe695acf1f140fa7d1..4aa2bd7347e234c290c61ce82bbe580f7b15d1f9 100644 (file)
@@ -1097,7 +1097,7 @@ static int or1k_init_target(struct command_context *cmd_ctx,
        return ERROR_OK;
 }
 
-static int or1k_target_create(struct target *target, Jim_Interp *interp)
+static int or1k_target_create(struct target *target)
 {
        if (!target->tap)
                return ERROR_FAIL;
index 90cf6670ec19180558cc0fcf210c6b439b432773..931f0dab7de4e8036fb145af94c9933da1e7f963 100644 (file)
@@ -32,7 +32,7 @@
 #include "lakemont.h"
 #include "x86_32_common.h"
 
-static int quark_d20xx_target_create(struct target *t, Jim_Interp *interp)
+static int quark_d20xx_target_create(struct target *t)
 {
        struct x86_32_common *x86_32 = calloc(1, sizeof(struct x86_32_common));
        if (!x86_32) {
index 0daa642b858887ba04c9571096a5a18ccb6e5e0d..2abc32ab7bdf951f81b2d38d4064110f8b832f64 100644 (file)
@@ -40,7 +40,7 @@
 #include "lakemont.h"
 #include "x86_32_common.h"
 
-static int quark_x10xx_target_create(struct target *t, Jim_Interp *interp)
+static int quark_x10xx_target_create(struct target *t)
 {
        struct x86_32_common *x86_32 = calloc(1, sizeof(*x86_32));
 
index 6a8577f5cb1a746a77921cceac00f760f6981cf3..11ef8f9b92ca1b104297942b5651d6b44733fc83 100644 (file)
@@ -427,7 +427,7 @@ static struct target_type *get_target_type(struct target *target)
        }
 }
 
-static int riscv_create_target(struct target *target, Jim_Interp *interp)
+static int riscv_create_target(struct target *target)
 {
        LOG_DEBUG("riscv_create_target()");
        target->arch_info = calloc(1, sizeof(struct riscv_info));
index 76482e87896347200a90fac7445ecd02a560d764..c80ea0eb20d8ffdc461e6ec02c6ce32b1351d4f9 100644 (file)
@@ -1106,8 +1106,7 @@ static int stm8_init_arch_info(struct target *target,
        return ERROR_OK;
 }
 
-static int stm8_target_create(struct target *target,
-               Jim_Interp *interp)
+static int stm8_target_create(struct target *target)
 {
 
        struct stm8_common *stm8 = calloc(1, sizeof(struct stm8_common));
index 99481622db43a6f9210dc998d09491e5da9bc41d..40c8d3ed360eb2c37e72a3f18c93fc19667f9c7e 100644 (file)
@@ -5865,7 +5865,7 @@ COMMAND_HANDLER(handle_target_create)
        }
 
        if (target->type->target_create) {
-               retval = (*target->type->target_create)(target, CMD_CTX->interp);
+               retval = (*target->type->target_create)(target);
                if (retval != ERROR_OK) {
                        LOG_DEBUG("target_create failed");
                        free(target->cmd_name);
index ce98cbad277bb65bda51403c5b351df8d6457050..eddedbf34fe5ddce308ab13b8b7c16eebcba8a68 100644 (file)
@@ -194,7 +194,7 @@ struct target_type {
        const struct command_registration *commands;
 
        /* called when target is created */
-       int (*target_create)(struct target *target, Jim_Interp *interp);
+       int (*target_create)(struct target *target);
 
        /* called for various config parameters */
        /* returns JIM_CONTINUE - if option not understood */
index 5cc790a311acaaebd1970a170ed9996580e00fe2..84318a905fa10c5af1eab2a3eff81a87c8369055 100644 (file)
@@ -3012,7 +3012,7 @@ static int xscale_init_arch_info(struct target *target,
        return ERROR_OK;
 }
 
-static int xscale_target_create(struct target *target, Jim_Interp *interp)
+static int xscale_target_create(struct target *target)
 {
        struct xscale_common *xscale;
 
index ce6d35cabfbc7609c2efb567aafeb1ebf66d53d6..aab7ee37c5c96465cef70347ec4c8a2c6e442b81 100644 (file)
@@ -81,7 +81,7 @@ static const struct xtensa_power_ops xtensa_chip_dm_pwr_ops = {
        .queue_reg_write = xtensa_dm_queue_pwr_reg_write
 };
 
-static int xtensa_chip_target_create(struct target *target, Jim_Interp *interp)
+static int xtensa_chip_target_create(struct target *target)
 {
        struct xtensa_debug_module_config xtensa_chip_dm_cfg = {
                .dbg_ops = &xtensa_chip_dm_dbg_ops,