ATH11K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mihai Moldovan <ionic@ionic.de>
To: ath11k@lists.infradead.org
Subject: Re: [PATCH] wifi: ath11k: Fix NULL pointer check in ath11k_ce_rx_post_pipe()
Date: Mon, 25 Nov 2024 06:33:57 +0100	[thread overview]
Message-ID: <ff487372-2200-4100-af8f-108bf2fcb80c@ionic.de> (raw)
In-Reply-To: <20241125050821.149898-1-zghbqbc@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 528 bytes --]

* On 11/25/24 06:08, Baichuan Qi wrote:
> -	if (!(pipe->dest_ring || pipe->status_ring))
> +	if (!(pipe->dest_ring && pipe->status_ring))
>   		return 0;

Wouldn't the expanded form, i.e., if (!pipe->dest_ring || !pipe->status_ring) 
show the intention more clearly (return if any of these pointers is NULL) and 
avoid the whole confusion in the first place?

We all know that !(a && b) ~= !a || !b, so your expression is obviously 
functionally equivalent, but it's not exactly obvious at first glance.



Mihai

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  reply	other threads:[~2024-11-25  5:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-25  5:08 [PATCH] wifi: ath11k: Fix NULL pointer check in ath11k_ce_rx_post_pipe() Baichuan Qi
2024-11-25  5:33 ` Mihai Moldovan [this message]
2024-11-25  7:37   ` Baichuan Qi
2024-11-25 22:23     ` Mihai Moldovan
2024-11-25 10:34 ` Markus Elfring
2024-11-26  2:33   ` Baichuan Qi
2024-11-26 13:44     ` Markus Elfring
2024-11-27  3:28       ` zgBCQ
2024-11-27 12:40         ` Markus Elfring
2024-11-27 14:35           ` Re: wifi: ath11k: Fix NULL pointer check in ath11k_ce_rx_post_pipe() ERROR code Baichuan Qi
2024-11-27 14:38           ` [PATCH v5] wifi: ath11k: Fix NULL pointer check in ath11k_ce_rx_post_pipe() Baichuan Qi
2024-11-27 15:23             ` Vasanthakumar Thiagarajan
2024-11-28  6:09               ` Re: [PATCH v5] NAK Baichuan Qi
2024-11-27  3:32       ` [PATCH v2 1/1] wifi: ath11k: Fix NULL pointer check in ath11k_ce_rx_post_pipe() Baichuan Qi
2024-11-27  9:05         ` [PATCH v4?] " Markus Elfring
2024-11-27  9:43           ` [PATCH v3] " Baichuan Qi
2024-11-27 10:30             ` Kang Yang
2024-11-27 12:00               ` Baichuan Qi
2024-11-27 10:36             ` [PATCH v4?] " Markus Elfring
2024-11-27 11:43               ` [PATCH v4] " Baichuan Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ff487372-2200-4100-af8f-108bf2fcb80c@ionic.de \
    --to=ionic@ionic.de \
    --cc=ath11k@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox