wcn36xx: use READ_ONCE() to access desc->ctrl

Kalle Valo kvalo at codeaurora.org
Thu Apr 19 09:23:37 PDT 2018


Daniel Mack <daniel at zonque.org> wrote:

> When accessing shared memory to check for the stat of submitted
> descriptors, make sure to use READ_ONCE(). This will guarantee the
> compiler treats these memory locations as volatile and doesn't apply
> any caching.
> 
> While this doesn't fix any particular problem I ran into, it's best
> practice to do it this way.
> 
> Note that this patch also removes the superflous extra condition check
> in the do-while loop in reap_tx_dxes(), as the loop will break
> instantly anyway in that case.
> 
> Signed-off-by: Daniel Mack <daniel at zonque.org>
> Signed-off-by: Kalle Valo <kvalo at codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

9ff6fde86fd2 wcn36xx: use READ_ONCE() to access desc->ctrl

-- 
https://patchwork.kernel.org/patch/10333551/

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




More information about the wcn36xx mailing list