From: Dan Carpenter <error27@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Alexander A. Klimov" <grandmaster@al2klimov.de>,
Vaibhav Agarwal <vaibhav.sr@gmail.com>,
Mark Greer <mgreer@animalcreek.com>,
Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>,
Elise Lennion <elise.lennion@gmail.com>,
"moderated list:GREYBUS SUBSYSTEM" <greybus-dev@lists.linaro.org>,
"open list:STAGING SUBSYSTEM" <linux-staging@lists.linux.dev>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: greybus: audio: expect 0 from kstrtoint(), not 1
Date: Sat, 23 May 2026 12:50:47 +0300 [thread overview]
Message-ID: <ahF4d--18ikUNOdJ@stanley.mountain> (raw)
In-Reply-To: <2026052249-shrank-trophy-14ff@gregkh>
On Fri, May 22, 2026 at 07:07:10AM +0200, Greg Kroah-Hartman wrote:
> > total: 1 errors, 0 warnings, 0 checks, 16 lines checked
> >
> > NOTE: For some of the reported defects, checkpatch may be able to
> > mechanically convert to the typical style using --fix or --fix-inplace.
>
> What about trying --strict?
>
> Anyway, think about rewriting the check for "== 0" now, that is not
> normal kernel style.
The checkpatch rules is only for NULL. You're, of course, right that
== 0 is bad style here but there are be times where it is idiomatic to
check for == 0 or != 0.
I only bring this up to promote my blog.
https://staticthinking.wordpress.com/2024/02/20/when-to-use-0/
#SEO
regards,
dan carpenter
prev parent reply other threads:[~2026-05-23 9:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260520180401.539215-1-grandmaster@al2klimov.de>
2026-05-20 18:03 ` [PATCH] staging: greybus: audio: expect 0 from kstrtoint(), not 1 Alexander A. Klimov
2026-05-21 8:38 ` Greg Kroah-Hartman
2026-05-21 18:42 ` Alexander A. Klimov
2026-05-22 5:07 ` Greg Kroah-Hartman
2026-05-22 5:54 ` Alexander A. Klimov
2026-05-23 9:50 ` 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=ahF4d--18ikUNOdJ@stanley.mountain \
--to=error27@gmail.com \
--cc=elder@kernel.org \
--cc=elise.lennion@gmail.com \
--cc=grandmaster@al2klimov.de \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mgreer@animalcreek.com \
--cc=vaibhav.sr@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