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/+/8698

-- gerrit

commit 8e7b29b00af659f3c1d6eb2f1382f9f750a8b1a3
Author: Antonio Borneo <borneo.anto...@gmail.com>
Date:   Fri Jan 10 12:13:30 2025 +0100

    rtt: drop useless typedefs
    
    There is no need to use extra typedef for the rtt functions.
    Declare the type of the functions in the struct.
    
    Change-Id: Idf2fee6e63ec3b3add38d042bbebe8d74613627c
    Signed-off-by: Antonio Borneo <borneo.anto...@gmail.com>

diff --git a/src/rtt/rtt.h b/src/rtt/rtt.h
index 49409074c4..d84fdb40b3 100644
--- a/src/rtt/rtt.h
+++ b/src/rtt/rtt.h
@@ -95,35 +95,27 @@ enum rtt_channel_type {
        RTT_CHANNEL_TYPE_DOWN
 };
 
-typedef int (*rtt_source_find_ctrl_block)(struct target *target,
+/** RTT source. */
+struct rtt_source {
+       int (*find_cb)(struct target *target,
                target_addr_t *address, size_t size, const char *id, bool 
*found,
                void *user_data);
-typedef int (*rtt_source_read_ctrl_block)(struct target *target,
+       int (*read_cb)(struct target *target,
                target_addr_t address, struct rtt_control *ctrl_block,
                void *user_data);
-typedef int (*rtt_source_read_channel_info)(struct target *target,
+       int (*read_channel_info)(struct target *target,
                const struct rtt_control *ctrl, unsigned int channel,
                enum rtt_channel_type type, struct rtt_channel_info *info,
                void *user_data);
-typedef int (*rtt_source_start)(struct target *target,
+       int (*start)(struct target *target,
                const struct rtt_control *ctrl, void *user_data);
-typedef int (*rtt_source_stop)(struct target *target, void *user_data);
-typedef int (*rtt_source_read)(struct target *target,
+       int (*stop)(struct target *target, void *user_data);
+       int (*read)(struct target *target,
                const struct rtt_control *ctrl, struct rtt_sink_list **sinks,
                size_t num_channels, void *user_data);
-typedef int (*rtt_source_write)(struct target *target,
+       int (*write)(struct target *target,
                struct rtt_control *ctrl, unsigned int channel,
                const uint8_t *buffer, size_t *length, void *user_data);
-
-/** RTT source. */
-struct rtt_source {
-       rtt_source_find_ctrl_block find_cb;
-       rtt_source_read_ctrl_block read_cb;
-       rtt_source_read_channel_info read_channel_info;
-       rtt_source_start start;
-       rtt_source_stop stop;
-       rtt_source_read read;
-       rtt_source_write write;
 };
 
 /**

-- 

Reply via email to