From: Julia Lawall <julia.lawall@inria.fr>
To: Emily Peri <eperi1024@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
gregkh@linuxfoundation.org, outreachy@lists.linux.dev,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: Replace ternary statement with min function
Date: Fri, 28 Oct 2022 20:39:12 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2210282038450.2987@hadrien> (raw)
In-Reply-To: <Y1wWwZdlXNil/lug@marshmallow>
On Fri, 28 Oct 2022, Emily Peri wrote:
> On Thu, Oct 27, 2022 at 10:32:15AM +0300, Dan Carpenter wrote:
> > On Wed, Oct 26, 2022 at 06:26:54PM -0700, Emily Peri wrote:
> > > Ternary statements that pick the min of two values can be replaced by
> > > the built-in min() function. This improves readability, since its quicker
> > > to understand min(x, y) than x < y ? x : y. Issue found by coccicheck.
> > >
> > > Signed-off-by: Emily Peri <eperi1024@gmail.com>
> >
> > This breaks the build. Use min_t(uint, wps_ielen, MAX_WPS_IE_LEN);
> >
> > regards,
> > dan carpenter
>
> Oh! Thanks for the feedback, that makes sense! When you say 'breaks the
> build,' do you mean it didn't compile, or the module didn't load (or
> something else)? I'm trying to figure out what I did wrong when testing
> it.
Normally it means that it didn't compile. Check that you actually have a
.o file for the affected file.
julia
next prev parent reply other threads:[~2022-10-28 18:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-27 1:26 [PATCH] staging: rtl8723bs: Replace ternary statement with min function Emily Peri
2022-10-27 6:12 ` Julia Lawall
2022-10-28 17:20 ` Emily Peri
2022-10-27 7:32 ` Dan Carpenter
2022-10-28 17:52 ` Emily Peri
2022-10-28 18:39 ` Julia Lawall [this message]
2022-10-29 3:08 ` kernel test robot
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=alpine.DEB.2.22.394.2210282038450.2987@hadrien \
--to=julia.lawall@inria.fr \
--cc=dan.carpenter@oracle.com \
--cc=eperi1024@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=outreachy@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