Skip to content

Commit 84058ff

Browse files
simingwaherbertx
authored andcommitted
crypto: qat - rename get_sla_arr_of_type()
The function get_sla_arr_of_type() returns a pointer to an SLA type specific array. Rename it and expose it as it will be used externally to this module. This does not introduce any functional change. Signed-off-by: Siming Wan <[email protected]> Reviewed-by: Giovanni Cabiddu <[email protected]> Reviewed-by: Damian Muszynski <[email protected]> Signed-off-by: Xin Zeng <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 680302d commit 84058ff

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

drivers/crypto/intel/qat/qat_common/adf_rl.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,14 @@ static enum adf_cfg_service_type srv_to_cfg_svc_type(enum adf_base_services rl_s
183183
}
184184

185185
/**
186-
* get_sla_arr_of_type() - Returns a pointer to SLA type specific array
186+
* adf_rl_get_sla_arr_of_type() - Returns a pointer to SLA type specific array
187187
* @rl_data: pointer to ratelimiting data
188188
* @type: SLA type
189189
* @sla_arr: pointer to variable where requested pointer will be stored
190190
*
191191
* Return: Max number of elements allowed for the returned array
192192
*/
193-
static u32 get_sla_arr_of_type(struct adf_rl *rl_data, enum rl_node_type type,
193+
u32 adf_rl_get_sla_arr_of_type(struct adf_rl *rl_data, enum rl_node_type type,
194194
struct rl_sla ***sla_arr)
195195
{
196196
switch (type) {
@@ -778,7 +778,7 @@ static void clear_sla(struct adf_rl *rl_data, struct rl_sla *sla)
778778
rp_in_use[sla->ring_pairs_ids[i]] = false;
779779

780780
update_budget(sla, old_cir, true);
781-
get_sla_arr_of_type(rl_data, sla->type, &sla_type_arr);
781+
adf_rl_get_sla_arr_of_type(rl_data, sla->type, &sla_type_arr);
782782
assign_node_to_parent(rl_data->accel_dev, sla, true);
783783
adf_rl_send_admin_delete_msg(rl_data->accel_dev, node_id, sla->type);
784784
mark_rps_usage(sla, rl_data->rp_in_use, false);
@@ -875,7 +875,7 @@ static int add_update_sla(struct adf_accel_dev *accel_dev,
875875

876876
if (!is_update) {
877877
mark_rps_usage(sla, rl_data->rp_in_use, true);
878-
get_sla_arr_of_type(rl_data, sla->type, &sla_type_arr);
878+
adf_rl_get_sla_arr_of_type(rl_data, sla->type, &sla_type_arr);
879879
sla_type_arr[sla->node_id] = sla;
880880
rl_data->sla[sla->sla_id] = sla;
881881
}
@@ -1065,7 +1065,7 @@ void adf_rl_remove_sla_all(struct adf_accel_dev *accel_dev, bool incl_default)
10651065

10661066
/* Unregister and remove all SLAs */
10671067
for (j = RL_LEAF; j >= end_type; j--) {
1068-
max_id = get_sla_arr_of_type(rl_data, j, &sla_type_arr);
1068+
max_id = adf_rl_get_sla_arr_of_type(rl_data, j, &sla_type_arr);
10691069

10701070
for (i = 0; i < max_id; i++) {
10711071
if (!sla_type_arr[i])

drivers/crypto/intel/qat/qat_common/adf_rl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ struct rl_sla {
151151
u16 ring_pairs_cnt;
152152
};
153153

154+
u32 adf_rl_get_sla_arr_of_type(struct adf_rl *rl_data, enum rl_node_type type,
155+
struct rl_sla ***sla_arr);
154156
int adf_rl_add_sla(struct adf_accel_dev *accel_dev,
155157
struct adf_rl_sla_input_data *sla_in);
156158
int adf_rl_update_sla(struct adf_accel_dev *accel_dev,

0 commit comments

Comments
 (0)