From: "Nicolas Escande" <nico.escande@gmail.com>
To: "Baochen Qiang" <baochen.qiang@oss.qualcomm.com>,
"Nicolas Escande" <nico.escande@gmail.com>,
<ath12k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH ath-next v3] wifi: ath12k: avoid dynamic alloc when parsing wmi tb
Date: Mon, 16 Mar 2026 11:57:00 +0100 [thread overview]
Message-ID: <DH45I9X47H77.74AIOL6V8R49@gmail.com> (raw)
In-Reply-To: <d38acb9f-60dc-4d37-a3b5-8cd09f76939e@oss.qualcomm.com>
On Mon Mar 16, 2026 at 11:42 AM CET, Baochen Qiang wrote:
[...]
>> --- a/drivers/net/wireless/ath/ath12k/core.c
>> +++ b/drivers/net/wireless/ath/ath12k/core.c
>> @@ -2321,5 +2321,24 @@ struct ath12k_base *ath12k_core_alloc(struct device *dev, size_t priv_size,
>> return NULL;
>> }
>>
>> +static int ath12k_init(void)
>> +{
>> + int ret;
>> +
>> + ret = ath12k_wmi_alloc();
>> + if (ret)
>> + return ret;
>> +
>> + return 0;
>
> nit: you can simply
>
> return ath12k_wmi_alloc();
Yes we can, but I did this in case we need to add more stuff in that function at
some later point. It would generate less code chrun. But I'm ok with a direct
return statement if you think that's better. Just tell me and I'll send the v4.
>
>> +}
>> +
>> +static void ath12k_exit(void)
>> +{
>> + ath12k_wmi_free();
>> +}
>> +
>> +module_init(ath12k_init);
>> +module_exit(ath12k_exit);
>> +
>> MODULE_DESCRIPTION("Driver support for Qualcomm Technologies WLAN devices");
>> MODULE_LICENSE("Dual BSD/GPL");
>> diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
>> index 59c193b24764..02ee6c718621 100644
>> --- a/drivers/net/wireless/ath/ath12k/core.h
>> +++ b/drivers/net/wireless/ath/ath12k/core.h
>> @@ -19,6 +19,7 @@
>> #include <linux/average.h>
>> #include <linux/of.h>
>> #include <linux/rhashtable.h>
>> +#include <linux/percpu.h>
>
> does it make more sense to add this to wmi.c instead?
Indeed it does. I'll fix it.
next prev parent reply other threads:[~2026-03-16 10:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 10:32 [PATCH ath-next v3] wifi: ath12k: avoid dynamic alloc when parsing wmi tb Nicolas Escande
2026-03-16 10:42 ` Baochen Qiang
2026-03-16 10:57 ` Nicolas Escande [this message]
2026-03-17 3:32 ` Baochen Qiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DH45I9X47H77.74AIOL6V8R49@gmail.com \
--to=nico.escande@gmail.com \
--cc=ath12k@lists.infradead.org \
--cc=baochen.qiang@oss.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox