From 3903d9104f1fe3d20681d146c4baf42fdda3e332 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 25 Mar 2024 08:41:23 -0400 Subject: [PATCH] MT#55283 remove unused DEL_TARGET method Change-Id: I126416d87af0f7a0b3c7c22df48fc12e0d423e42 --- daemon/kernel.c | 1 - kernel-module/xt_RTPENGINE.c | 21 --------------------- kernel-module/xt_RTPENGINE.h | 6 ------ 3 files changed, 28 deletions(-) diff --git a/daemon/kernel.c b/daemon/kernel.c index 868fd6988..fa773d720 100644 --- a/daemon/kernel.c +++ b/daemon/kernel.c @@ -72,7 +72,6 @@ static int kernel_open_table(unsigned int id) { .msg_size = { [REMG_NOOP] = sizeof(struct rtpengine_command_noop), [REMG_ADD_TARGET] = sizeof(struct rtpengine_command_add_target), - [REMG_DEL_TARGET] = sizeof(struct rtpengine_command_del_target), [REMG_DEL_TARGET_STATS] = sizeof(struct rtpengine_command_del_target_stats), [REMG_ADD_DESTINATION] = sizeof(struct rtpengine_command_destination), [REMG_ADD_CALL] = sizeof(struct rtpengine_command_add_call), diff --git a/kernel-module/xt_RTPENGINE.c b/kernel-module/xt_RTPENGINE.c index 5c69a04c4..756124ac6 100644 --- a/kernel-module/xt_RTPENGINE.c +++ b/kernel-module/xt_RTPENGINE.c @@ -1957,21 +1957,6 @@ out: -// removes target from table and releases the reference to free it -static int table_del_target(struct rtpengine_table *t, const struct re_address *local) { - struct rtpengine_target *g = table_steal_target(t, local); - - if (IS_ERR(g)) - return PTR_ERR(g); - - target_put(g); - - return 0; -} - - - - // removes target from table and returns the stats before releasing the target static int table_del_target_stats(struct rtpengine_table *t, const struct re_address *local, struct rtpengine_stats_info *i, int reset) @@ -3694,7 +3679,6 @@ out: static const size_t min_req_sizes[__REMG_LAST] = { [REMG_NOOP] = sizeof(struct rtpengine_command_noop), [REMG_ADD_TARGET] = sizeof(struct rtpengine_command_add_target), - [REMG_DEL_TARGET] = sizeof(struct rtpengine_command_del_target), [REMG_DEL_TARGET_STATS] = sizeof(struct rtpengine_command_del_target_stats), [REMG_ADD_DESTINATION] = sizeof(struct rtpengine_command_destination), [REMG_ADD_CALL] = sizeof(struct rtpengine_command_add_call), @@ -3709,7 +3693,6 @@ static const size_t min_req_sizes[__REMG_LAST] = { static const size_t max_req_sizes[__REMG_LAST] = { [REMG_NOOP] = sizeof(struct rtpengine_command_noop), [REMG_ADD_TARGET] = sizeof(struct rtpengine_command_add_target), - [REMG_DEL_TARGET] = sizeof(struct rtpengine_command_del_target), [REMG_DEL_TARGET_STATS] = sizeof(struct rtpengine_command_del_target_stats), [REMG_ADD_DESTINATION] = sizeof(struct rtpengine_command_destination), [REMG_ADD_CALL] = sizeof(struct rtpengine_command_add_call), @@ -3823,10 +3806,6 @@ static inline ssize_t proc_control_read_write(struct file *file, char __user *ub err = table_new_target(t, &msg.add_target->target); break; - case REMG_DEL_TARGET: - err = table_del_target(t, &msg.del_target->local); - break; - case REMG_DEL_TARGET_STATS: err = -EINVAL; if (writeable) diff --git a/kernel-module/xt_RTPENGINE.h b/kernel-module/xt_RTPENGINE.h index 4988795e0..e6754a02f 100644 --- a/kernel-module/xt_RTPENGINE.h +++ b/kernel-module/xt_RTPENGINE.h @@ -185,7 +185,6 @@ struct rtpengine_stats_info { enum rtpengine_command { REMG_NOOP = 1, REMG_ADD_TARGET, - REMG_DEL_TARGET, REMG_ADD_DESTINATION, REMG_ADD_CALL, REMG_DEL_CALL, @@ -222,11 +221,6 @@ struct rtpengine_command_add_target { struct rtpengine_target_info target; }; -struct rtpengine_command_del_target { - enum rtpengine_command cmd; - struct re_address local; -}; - struct rtpengine_command_del_target_stats { enum rtpengine_command cmd; struct re_address local; // input