Commit 03588e92 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Jakub Kicinski

ethernet: ucc_geth: use qe_muram_free_addr()

This removes the explicit NULL checks, and allows us to stop storing
at least some of the _offset values separately.
Signed-off-by: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 186b8daf
......@@ -1921,50 +1921,39 @@ static void ucc_geth_memclean(struct ucc_geth_private *ugeth)
ugeth->uccf = NULL;
}
if (ugeth->p_thread_data_tx) {
qe_muram_free(ugeth->thread_dat_tx_offset);
ugeth->p_thread_data_tx = NULL;
}
if (ugeth->p_thread_data_rx) {
qe_muram_free(ugeth->thread_dat_rx_offset);
ugeth->p_thread_data_rx = NULL;
}
if (ugeth->p_exf_glbl_param) {
qe_muram_free(ugeth->exf_glbl_param_offset);
ugeth->p_exf_glbl_param = NULL;
}
if (ugeth->p_rx_glbl_pram) {
qe_muram_free(ugeth->rx_glbl_pram_offset);
ugeth->p_rx_glbl_pram = NULL;
}
if (ugeth->p_tx_glbl_pram) {
qe_muram_free(ugeth->tx_glbl_pram_offset);
ugeth->p_tx_glbl_pram = NULL;
}
if (ugeth->p_send_q_mem_reg) {
qe_muram_free(ugeth->send_q_mem_reg_offset);
ugeth->p_send_q_mem_reg = NULL;
}
if (ugeth->p_scheduler) {
qe_muram_free(ugeth->scheduler_offset);
ugeth->p_scheduler = NULL;
}
if (ugeth->p_tx_fw_statistics_pram) {
qe_muram_free(ugeth->tx_fw_statistics_pram_offset);
ugeth->p_tx_fw_statistics_pram = NULL;
}
if (ugeth->p_rx_fw_statistics_pram) {
qe_muram_free(ugeth->rx_fw_statistics_pram_offset);
ugeth->p_rx_fw_statistics_pram = NULL;
}
if (ugeth->p_rx_irq_coalescing_tbl) {
qe_muram_free(ugeth->rx_irq_coalescing_tbl_offset);
ugeth->p_rx_irq_coalescing_tbl = NULL;
}
if (ugeth->p_rx_bd_qs_tbl) {
qe_muram_free(ugeth->rx_bd_qs_tbl_offset);
ugeth->p_rx_bd_qs_tbl = NULL;
}
qe_muram_free_addr(ugeth->p_thread_data_tx);
ugeth->p_thread_data_tx = NULL;
qe_muram_free_addr(ugeth->p_thread_data_rx);
ugeth->p_thread_data_rx = NULL;
qe_muram_free_addr(ugeth->p_exf_glbl_param);
ugeth->p_exf_glbl_param = NULL;
qe_muram_free_addr(ugeth->p_rx_glbl_pram);
ugeth->p_rx_glbl_pram = NULL;
qe_muram_free_addr(ugeth->p_tx_glbl_pram);
ugeth->p_tx_glbl_pram = NULL;
qe_muram_free_addr(ugeth->p_send_q_mem_reg);
ugeth->p_send_q_mem_reg = NULL;
qe_muram_free_addr(ugeth->p_scheduler);
ugeth->p_scheduler = NULL;
qe_muram_free_addr(ugeth->p_tx_fw_statistics_pram);
ugeth->p_tx_fw_statistics_pram = NULL;
qe_muram_free_addr(ugeth->p_rx_fw_statistics_pram);
ugeth->p_rx_fw_statistics_pram = NULL;
qe_muram_free_addr(ugeth->p_rx_irq_coalescing_tbl);
ugeth->p_rx_irq_coalescing_tbl = NULL;
qe_muram_free_addr(ugeth->p_rx_bd_qs_tbl);
ugeth->p_rx_bd_qs_tbl = NULL;
if (ugeth->p_init_enet_param_shadow) {
return_init_enet_entries(ugeth,
&(ugeth->p_init_enet_param_shadow->
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment