Re: [PATCH 08/50] wifi: ath12k: add dbring.h

Kalle Valo
2022-10-21T11:13:03Z

Kalle Valo <kvalo@kernel.org> writes:

> Jeff Johnson <quic_jjohnson@quicinc.com> writes:
>
>> On 8/12/2022 9:09 AM, Kalle Valo wrote:
>>
>>> From: Kalle Valo <quic_kvalo@quicinc.com>
>>>
>>> (Patches split into one patch per file for easier review, but the final
>>> commit will be one big patch. See the cover letter for more info.)
>>>
>>> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
>>> ---
>>> drivers/net/wireless/ath/ath12k/dbring.h | 80 ++++++++++++++++++++++++++++++++
>>> 1 file changed, 80 insertions(+)
>>>
>>> diff --git a/drivers/net/wireless/ath/ath12k/dbring.h
>>> b/drivers/net/wireless/ath/ath12k/dbring.h
>>> new file mode 100644
>>> index 000000000000..2be2d8def3f0
>>> --- /dev/null
>>> +++ b/drivers/net/wireless/ath/ath12k/dbring.h
>>> @@ -0,0 +1,80 @@
>>> +/* SPDX-License-Identifier: BSD-3-Clause-Clear */
>>> +/*
>>> + * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
>>> + * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
>>> + */
>>> +
>>> +#ifndef ATH12K_DBRING_H
>>> +#define ATH12K_DBRING_H
>>> +
>>> +#include <linux/types.h>
>>> +#include <linux/idr.h>
>>> +#include <linux/spinlock.h>
>>> +#include "dp.h"
>>> +
>>> +struct ath12k_dbring_element {
>>> + dma_addr_t paddr;
>>> + u8 payload[0];
>>
>> should just be payload[]
>>
>> <https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays>
>
> Praneesh fixed this:
>
> c568d8bc26de ath12k: convert payload[0] to payload[], use ab variable
> and fix __ath12k_dbg() signature

But there's still more of these:

ce.h:138: struct sk_buff *skb[0];
core.h:738: u8 drv_priv[0] __aligned(sizeof(void *));
dp.h:1336: u8 data[0];
dp.h:1341: u8 value[0];
dp.h:1597: u8 payload[0];
rx_desc.h:1397: u8 msdu_payload[0];
rx_desc.h:1418: u8 msdu_payload[0];

I added these to my todo list, need to investigate in detail.

--