[PATCH] wifi: ath11k: Fix NULL pointer check in ath11k_ce_rx_post_pipe()

Mihai Moldovan ionic at ionic.de
Mon Nov 25 14:23:07 PST 2024


* On 11/25/24 08:37, Baichuan Qi wrote:
> thanks for your reply
> 
>> !(pipe->dest_ring && pipe->status_ring)
> means both pipe->dest_ring and pipe->status_ring must
> be NON-NULL , previous code means ONE of these two rings
> is NON-NULL.

Yes, I understand that, and I already implied that your fix is fine 
functionally. I can also spell it out more directly.

However, I do believe that !pipe->dest_ring || !pipe->status_ring - which is 
functionally equivalent to !(pipe->dest_ring && pipe->status_ring) - is more 
maintainable and easier to parse for humans because it conveys what is meant 
better at a glance - namely that we want to handle the situation as an error if 
any of the given pointers is NULL.



Mihai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/ath11k/attachments/20241125/41dfe649/attachment.sig>


More information about the ath11k mailing list