From: Joe Perches <joe@perches.com>
To: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Cc: linux-kernel@vger.kernel.org, Andy Whitcroft <apw@canonical.com>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>,
Dwaipayan Ray <dwaipayanray1@gmail.com>
Subject: Re: checkpatch false positive for "do not use assignment in if condition"
Date: Sun, 10 May 2026 12:31:00 -0700 [thread overview]
Message-ID: <9cae630a9e9b95caa90dd92b4e3252e8@perches.com> (raw)
In-Reply-To: <CADkSEUhvoT5bTW+VouaJQ3P0E3506CmX1AbxaUi0WknkFaopBA@mail.gmail.com>
On 2026-05-09 17:20, Ethan Nelson-Moore wrote:
> On Sat, May 9, 2026 at 2:53 PM Ethan Nelson-Moore
> <enelsonmoore@gmail.com> wrote:
>> These lines do not even contain =.
>> Could someone look into why this happened?
>
> The lines *after* the affected patch hunks do have an assignment in
> the if condition.
checkpatch is fundamentally stupid and an incomplete parser. Rely on
your brain to ignore its incorrect bleats when it's wrong.
FYI it's looking for a single equal sign in the statement
prev parent reply other threads:[~2026-05-10 19:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-09 21:53 checkpatch false positive for "do not use assignment in if condition" Ethan Nelson-Moore
2026-05-10 0:20 ` Ethan Nelson-Moore
2026-05-10 19:31 ` Joe Perches [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=9cae630a9e9b95caa90dd92b4e3252e8@perches.com \
--to=joe@perches.com \
--cc=apw@canonical.com \
--cc=dwaipayanray1@gmail.com \
--cc=enelsonmoore@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
/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