[PATCH ath12k-ng 1/2] wifi: ath12k: Refactor data path pdev struct
Ripan Deuri
quic_rdeuri at quicinc.com
Tue Oct 7 03:51:30 PDT 2025
On 10/1/2025 10:02 PM, Jeff Johnson wrote:
> On 9/30/2025 11:18 AM, Ripan Deuri wrote:
>> diff --git a/drivers/net/wireless/ath/ath12k/dp.c b/drivers/net/wireless/ath/ath12k/dp.c
>> index 1bca998117b7..98af9a17dea2 100644
>> --- a/drivers/net/wireless/ath/ath12k/dp.c
>> +++ b/drivers/net/wireless/ath/ath12k/dp.c
> ...> +struct ath12k *ath12k_pdev_dp_to_ar(struct ath12k_pdev_dp *dp)
>> +{
>> + return container_of(dp, struct ath12k, dp);
>> +}
>
>> diff --git a/drivers/net/wireless/ath/ath12k/dp.h b/drivers/net/wireless/ath/ath12k/dp.h
>> index 546f73e46c41..084e0a3c1bbb 100644
>> --- a/drivers/net/wireless/ath/ath12k/dp.h
>> +++ b/drivers/net/wireless/ath/ath12k/dp.h
> ...> +struct ath12k *ath12k_pdev_dp_to_ar(struct ath12k_pdev_dp *dp);
>
> is there a reason this isn't a static inline?
>
> the implementation is trivial and this seems like an example where inlining
> would always produce a "better" executable.
It’s not static inline right now is to avoid introducing a core.h
dependency in dp.h (and prevent potential circular dependencies between
headers). Ideally, it can reside in dp_cmn.h, but struct ath12k_pdev_dp
depends on monitor-related structures, which will be refactored in a
later series. That said, it can be made static inline in core.h for now;
I’ll make this change in the next revision.
More information about the ath12k
mailing list