This is an automated email from Gerrit.

"Antonio Borneo <borneo.anto...@gmail.com>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/8544

-- gerrit

commit 5d46414319c8a7a157746cf8b8ce15958d4aac8a
Author: Antonio Borneo <borneo.anto...@gmail.com>
Date:   Sat Nov 9 19:33:58 2024 +0100

    driver: mpsse: make local functions static
    
    The functions:
    - mpsse_divide_by_5_config();
    - mpsse_purge();
    - mpsse_rtck_config();
    - mpsse_set_divisor();
    are not referenced outside the file.
    
    Make them static.
    
    Change-Id: Id6930183a3ce26693b2113f622046168ba289df8
    Signed-off-by: Antonio Borneo <borneo.anto...@gmail.com>

diff --git a/src/jtag/drivers/mpsse.c b/src/jtag/drivers/mpsse.c
index 1ef9550a08..38393ad0ae 100644
--- a/src/jtag/drivers/mpsse.c
+++ b/src/jtag/drivers/mpsse.c
@@ -75,6 +75,8 @@ struct mpsse_ctx {
        int retval;
 };
 
+static void mpsse_purge(struct mpsse_ctx *ctx);
+
 /* Returns true if the string descriptor indexed by str_index in device 
matches string */
 static bool string_descriptor_equal(struct libusb_device_handle *device, 
uint8_t str_index,
        const char *string)
@@ -421,7 +423,7 @@ bool mpsse_is_high_speed(struct mpsse_ctx *ctx)
        return ctx->type != TYPE_FT2232C;
 }
 
-void mpsse_purge(struct mpsse_ctx *ctx)
+static void mpsse_purge(struct mpsse_ctx *ctx)
 {
        int err;
        LOG_DEBUG("-");
@@ -709,7 +711,7 @@ void mpsse_loopback_config(struct mpsse_ctx *ctx, bool 
enable)
        single_byte_boolean_helper(ctx, enable, 0x84, 0x85);
 }
 
-void mpsse_set_divisor(struct mpsse_ctx *ctx, uint16_t divisor)
+static void mpsse_set_divisor(struct mpsse_ctx *ctx, uint16_t divisor)
 {
        LOG_DEBUG("%d", divisor);
 
@@ -726,7 +728,7 @@ void mpsse_set_divisor(struct mpsse_ctx *ctx, uint16_t 
divisor)
        buffer_write_byte(ctx, divisor >> 8);
 }
 
-int mpsse_divide_by_5_config(struct mpsse_ctx *ctx, bool enable)
+static int mpsse_divide_by_5_config(struct mpsse_ctx *ctx, bool enable)
 {
        if (!mpsse_is_high_speed(ctx))
                return ERROR_FAIL;
@@ -737,7 +739,7 @@ int mpsse_divide_by_5_config(struct mpsse_ctx *ctx, bool 
enable)
        return ERROR_OK;
 }
 
-int mpsse_rtck_config(struct mpsse_ctx *ctx, bool enable)
+static int mpsse_rtck_config(struct mpsse_ctx *ctx, bool enable)
 {
        if (!mpsse_is_high_speed(ctx))
                return ERROR_FAIL;
diff --git a/src/jtag/drivers/mpsse.h b/src/jtag/drivers/mpsse.h
index 4a625d890b..e95f842c9b 100644
--- a/src/jtag/drivers/mpsse.h
+++ b/src/jtag/drivers/mpsse.h
@@ -59,9 +59,6 @@ void mpsse_set_data_bits_high_byte(struct mpsse_ctx *ctx, 
uint8_t data, uint8_t
 void mpsse_read_data_bits_low_byte(struct mpsse_ctx *ctx, uint8_t *data);
 void mpsse_read_data_bits_high_byte(struct mpsse_ctx *ctx, uint8_t *data);
 void mpsse_loopback_config(struct mpsse_ctx *ctx, bool enable);
-void mpsse_set_divisor(struct mpsse_ctx *ctx, uint16_t divisor);
-int mpsse_divide_by_5_config(struct mpsse_ctx *ctx, bool enable);
-int mpsse_rtck_config(struct mpsse_ctx *ctx, bool enable);
 
 /* Helper to set frequency in Hertz. Returns actual realizable frequency or 
negative error.
  * Frequency 0 means RTCK. */
@@ -69,6 +66,5 @@ int mpsse_set_frequency(struct mpsse_ctx *ctx, int frequency);
 
 /* Queue handling */
 int mpsse_flush(struct mpsse_ctx *ctx);
-void mpsse_purge(struct mpsse_ctx *ctx);
 
 #endif /* OPENOCD_JTAG_DRIVERS_MPSSE_H */

-- 

Reply via email to