This is an automated email from Gerrit.

Antonio Borneo ([email protected]) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/5676

-- gerrit

commit b10accb145945bba428fda892d7eba418db4d46f
Author: Antonio Borneo <[email protected]>
Date:   Wed May 13 16:51:00 2020 +0200

    helper/command: make script_debug() static
    
    Now that all commands are executed through the common handler
    command_unknown(), the message about command execution is logged
    by command_unknown(). There is no need, for "native" commands
    (.jim_handler) at root level to log the message (again) by itself.
    
    Remove calls to script_debug() apart from command_unknown().
    Make script_debug() static as only used in command.c.
    
    Change-Id: I9b2728b69e7643d6121c4b35a96bc825bcb5488d
    Signed-off-by: Antonio Borneo <[email protected]>

diff --git a/src/helper/command.c b/src/helper/command.c
index a5101e1..c5b0b93 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -143,7 +143,7 @@ extern struct command_context *global_cmd_ctx;
 
 /* dump a single line to the log for the command.
  * Do nothing in case we are not at debug level 3 */
-void script_debug(Jim_Interp *interp, unsigned int argc, Jim_Obj * const *argv)
+static void script_debug(Jim_Interp *interp, unsigned int argc, Jim_Obj * 
const *argv)
 {
        if (debug_level < LOG_LVL_DEBUG)
                return;
diff --git a/src/helper/command.h b/src/helper/command.h
index b98dff4..784ac34 100644
--- a/src/helper/command.h
+++ b/src/helper/command.h
@@ -436,6 +436,4 @@ COMMAND_HELPER(handle_command_parse_bool, bool *out, const 
char *label);
 #define COMMAND_PARSE_ENABLE(in, out) \
        COMMAND_PARSE_BOOL(in, out, "enable", "disable")
 
-void script_debug(Jim_Interp *interp, unsigned int argc, Jim_Obj * const 
*argv);
-
 #endif /* OPENOCD_HELPER_COMMAND_H */
diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c
index 01210bd..06cb301 100644
--- a/src/jtag/tcl.c
+++ b/src/jtag/tcl.c
@@ -108,8 +108,6 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, 
Jim_Obj *const *args
 
        endstate = TAP_IDLE;
 
-       script_debug(interp, argc, args);
-
        /* validate arguments as numbers */
        e = JIM_OK;
        for (i = 2; i < argc; i += 2) {
@@ -229,8 +227,6 @@ static int Jim_Command_pathmove(Jim_Interp *interp, int 
argc, Jim_Obj *const *ar
                return JIM_ERR;
        }
 
-       script_debug(interp, argc, args);
-
        int i;
        for (i = 0; i < argc-1; i++) {
                const char *cp;
@@ -261,8 +257,6 @@ static int Jim_Command_pathmove(Jim_Interp *interp, int 
argc, Jim_Obj *const *ar
 
 static int Jim_Command_flush_count(Jim_Interp *interp, int argc, Jim_Obj 
*const *args)
 {
-       script_debug(interp, argc, args);
-
        Jim_SetResult(interp, Jim_NewIntObj(interp, 
jtag_get_flush_queue_count()));
 
        return JIM_OK;

-- 


_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to