Search Linux Wireless

Re: [PATCH 07/50] wifi: ath12k: add dbring.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Johnson <quic_jjohnson@xxxxxxxxxxx> writes:

> On 8/12/2022 9:09 AM, Kalle Valo wrote:
>> From: Kalle Valo <quic_kvalo@xxxxxxxxxxx>
>>
>> (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@xxxxxxxxxxx>

[...]

>> +static int ath12k_dbring_fill_bufs(struct ath12k *ar,
>> +				   struct ath12k_dbring *ring,
>> +				   gfp_t gfp)
>> +{
>> +	struct ath12k_dbring_element *buff;
>> +	struct hal_srng *srng;
>> +	int num_remain, req_entries, num_free;
>> +	u32 align;
>> +	int size, ret;
>> +
>> +	srng = &ar->ab->hal.srng_list[ring->refill_srng.ring_id];
>
> there are several references to ar->ab in this function.
> suggest being consistent with ath12k_dbring_bufs_replenish() and define:
> 	struct ath12k_base *ab = ar->ab;
> and then s/ar->ab/ab/ in those accesses
>
> this suggestion applies to other functions below since there are
> multiple functions which have multiple ar->ab dereferences

Praneesh fixed this:

c568d8bc26de ath12k: convert payload[0] to payload[], use ab variable and fix __ath12k_dbg() signature


>> +int ath12k_dbring_buf_setup(struct ath12k *ar,
>> +			    struct ath12k_dbring *ring,
>> +			    struct ath12k_dbring_cap *db_cap)
>> +{
>> +	struct ath12k_base *ab = ar->ab;
>> +	struct hal_srng *srng;
>> +	int ret;
>> +
>> +	srng = &ab->hal.srng_list[ring->refill_srng.ring_id];
>> +	ring->bufs_max = ring->refill_srng.size /
>> +		ath12k_hal_srng_get_entrysize(ab, HAL_RXDMA_DIR_BUF);
>> +
>> +	ring->buf_sz = db_cap->min_buf_sz;
>> +	ring->buf_align = db_cap->min_buf_align;
>> +	ring->pdev_id = db_cap->pdev_id;
>> +	ring->hp_addr = ath12k_hal_srng_get_hp_addr(ar->ab, srng);
>> +	ring->tp_addr = ath12k_hal_srng_get_tp_addr(ar->ab, srng);
>
> s/ar->ab/ab/ in both of the above since you already have ab = ar->ab

This is still not fixed.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux