Re: [PATCH ath-next v5] wifi: ath12k: avoid dynamic alloc when parsing wmi tb

Nicolas Escande
2026-04-02T10:44:05Z

On Mon Mar 30, 2026 at 9:38 PM CEST, Jeff Johnson wrote:
> On 3/30/2026 3:24 AM, Nicolas Escande wrote:
>> diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c
>> index c31c47fb5a73..76060d448920 100644
>> --- a/drivers/net/wireless/ath/ath12k/core.c
>> +++ b/drivers/net/wireless/ath/ath12k/core.c
>> @@ -2258,6 +2258,7 @@ void ath12k_core_free(struct ath12k_base *ab)
>> timer_delete_sync(&ab->rx_replenish_retry);
>> destroy_workqueue(ab->workqueue_aux);
>> destroy_workqueue(ab->workqueue);
>> + ath12k_wmi_free();
>
> nit:
> the order of init is ab, wq, wq_aux, wmi
> the order of free should be reversed: wmi, wq_aux, wq, ab
> which matches the init error path
Sure, I kept it as revers xmas tree because it looks nicer and doesn't change a
thing but lets keep it consistent no problem
>
>> kfree(ab);
>> }
>>
>
> other than that, this looks good to me