public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Brandon Crain <bcrain1606@gmail.com>,
	larry.finger@lwfinger.net, gregkh@linuxfoundation.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: rtl8712: Removed unnecessary parentheses
Date: Sat, 23 Mar 2024 23:19:41 +0100	[thread overview]
Message-ID: <c20f03dd-fa66-46ca-ab28-faaa97ae6b60@gmail.com> (raw)
In-Reply-To: <Zf2fuHV2gmSOSEnx@dev>

On 3/22/24 16:11, Brandon Crain wrote:
Please make your "Subject" line more unique. Consider that we may end up
with having dozen of commits like yours, all of them referring to
different removals and all without the necessary information to tell 
what they differ in (except the driver/subsystem). So it would help if 
you add the changed file or function to make it more unique.
> Removed uneccessary parentheses from source file

Please use a full sentences with final dot. Always consider that the why 
is most important to answer. In your case the answer would be "because 
it is unnecessary" My preferred proposal would be:

Remove unnecessary parentheses to increase readability.

> 
> Signed-off-by: Brandon Crain <bcrain1606@gmail.com>
> ---
>   drivers/staging/rtl8712/recv_linux.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8712/recv_linux.c b/drivers/staging/rtl8712/recv_linux.c
> index 215fca4abb3a..2bf4661432a9 100644
> --- a/drivers/staging/rtl8712/recv_linux.c
> +++ b/drivers/staging/rtl8712/recv_linux.c
> @@ -105,7 +105,7 @@ void r8712_recv_indicatepkt(struct _adapter *adapter,
>   	skb->data = recvframe->u.hdr.rx_data;
>   	skb->len = recvframe->u.hdr.len;
>   	skb_set_tail_pointer(skb, skb->len);
> -	if ((attrib->tcpchk_valid == 1) && (attrib->tcp_chkrpt == 1))
> +	if (attrib->tcpchk_valid == 1 && attrib->tcp_chkrpt == 1)

I am not so happy with this proposal I need to know the exact rules that 
the == has priority over &&. So I like to read it with brackets.

>   		skb->ip_summed = CHECKSUM_UNNECESSARY;
>   	else
>   		skb->ip_summed = CHECKSUM_NONE;

If you send in a second version of this patch please use a change 
history. Description from Dan under:
https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/

Thanks for your support.

Bye Philipp

  reply	other threads:[~2024-03-23 22:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-22 15:11 [PATCH] Staging: rtl8712: Removed unnecessary parentheses Brandon Crain
2024-03-23 22:19 ` Philipp Hortmann [this message]
2024-03-25 18:07 ` Greg KH

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=c20f03dd-fa66-46ca-ab28-faaa97ae6b60@gmail.com \
    --to=philipp.g.hortmann@gmail.com \
    --cc=bcrain1606@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=larry.finger@lwfinger.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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