All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Andrei Khomenkov <khomenkov@mailbox.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ethan Tidmore <ethantidmore06@gmail.com>,
	linux-staging@lists.linux.dev
Subject: Re: [PATCH v4 0/3] staging: rtl8723bs: cleanup booleans and style
Date: Wed, 8 Apr 2026 10:49:45 +0300	[thread overview]
Message-ID: <adYImQMCJN9ImTKX@stanley.mountain> (raw)
In-Reply-To: <20260405160135.22291-1-khomenkov@mailbox.org>

On Sun, Apr 05, 2026 at 07:01:32PM +0300, Andrei Khomenkov wrote:
> This series of patches cleans up the rtl8723bs driver code to improve
> readability and alignment with the Linux kernel coding style. The
> changes affect if-statements and while-loops, including:
>  - Simplifying boolean comparisons by removing redundant ' == true',
>    ' != true', and ' == false'.
>  - Adding spaces around bitwise operators.
>  - Removing redundant parentheses.
>  - Wrapping logical operators to the previous line.
>  
> Changes are limited to 'if' and 'while' statements, where both logic
> and style are cleaned up at once. No functional changes are intended.
> 
> Link: https://lore.kernel.org/linux-staging/20260402150429.14761-1-khomenkov@mailbox.org
> 
> v4:
>  - Combined logic and style cleanups into single commits to
>    avoid fragmented changes, as suggested by Dan Carpenter.

I'm sorry I wasn't clear enough...  I meant if you change:

	if ((foo == false) || (bar == true)) {

Then don't leave the extra parentheses:

 Bad:	if ((!foo) || (bar)) {
Good:   if (!foo || bar) {

However, if you leave a comparison operation then *DO* leave the
parentheses.  Also moving the && around or deleting white space
is unrelated.  Don't do unrelated things.

However in the case of the parentheses it *IS* related because now
the parentheses look crazy.  You *HAVE* to make that kind of change.
The one thing per patch rule cuts both ways, we don't want two things
per patch but we also don't want half a thing per patch.

regards,
dan carpenter


      parent reply	other threads:[~2026-04-08  7:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-05 16:01 [PATCH v4 0/3] staging: rtl8723bs: cleanup booleans and style Andrei Khomenkov
2026-04-05 16:01 ` [PATCH v4 1/3] staging: rtl8723bs: core: " Andrei Khomenkov
2026-04-06 20:51   ` Ethan Tidmore
2026-04-05 16:01 ` [PATCH v4 2/3] staging: rtl8723bs: hal: " Andrei Khomenkov
2026-04-05 16:01 ` [PATCH v4 3/3] staging: rtl8723bs: os_dep: " Andrei Khomenkov
2026-04-08  7:49 ` Dan Carpenter [this message]

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=adYImQMCJN9ImTKX@stanley.mountain \
    --to=error27@gmail.com \
    --cc=ethantidmore06@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=khomenkov@mailbox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.