From: Jaehee Park <jhpark1013@gmail.com>
To: Julia Lawall <julia.lawall@inria.fr>
Cc: johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org,
greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org, outreachy@lists.linux.dev
Subject: Re: [PATCH 2/2] staging: greybus: remove return in an empty void function
Date: Tue, 12 Apr 2022 16:02:20 -0400 [thread overview]
Message-ID: <20220412200220.GA2963810@jaehee-ThinkPad-X1-Extreme> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2204120901380.3122@hadrien>
On Tue, Apr 12, 2022 at 09:04:08AM +0200, Julia Lawall wrote:
>
>
> On Mon, 11 Apr 2022, Jaehee Park wrote:
>
> > Issue found by checkpatch:
> > WARNING: void function return statements are not generally useful
>
> Even for a simple change, it wouldbe better to follow the model that the
> subject line should concisely orient the reader (eg "remove unneeded
> return") and the log message should give a more complete description.
> Simply repeating what checkpatch tells you is rarely a good idea. It says
> what the problem is in a general way, whereas you should be explaining the
> reasoning behind your fix in a specific case. Here you could say that an
> empty function with void return type does not need an explicit return, and
> that the problem was detected with checkpatch.
>
> julia
>
Thank you for your edits. I've submitted version 2 of the patchset just
now.
> >
> > Signed-off-by: Jaehee Park <jhpark1013@gmail.com>
> > ---
> > drivers/staging/greybus/audio_codec.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
> > index 0f50d1e51e2c..3e3a16568def 100644
> > --- a/drivers/staging/greybus/audio_codec.c
> > +++ b/drivers/staging/greybus/audio_codec.c
> > @@ -1032,7 +1032,6 @@ static int gbcodec_probe(struct snd_soc_component *comp)
> > static void gbcodec_remove(struct snd_soc_component *comp)
> > {
> > /* Empty function for now */
> > - return;
> > }
> >
> > static int gbcodec_write(struct snd_soc_component *comp, unsigned int reg,
> > --
> > 2.25.1
> >
> >
> >
next prev parent reply other threads:[~2022-04-12 20:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-12 1:50 [PATCH 0/2] staging: greybus: fix warnings reported by checkpatch Jaehee Park
2022-04-12 1:50 ` [PATCH 1/2] staging: greybus: correct typo in comment 'Atleast' to 'At least' Jaehee Park
2022-04-12 1:50 ` [PATCH 2/2] staging: greybus: remove return in an empty void function Jaehee Park
2022-04-12 7:04 ` Julia Lawall
2022-04-12 20:02 ` Jaehee Park [this message]
2022-04-12 7:28 ` Dan Carpenter
2022-04-12 20:03 ` Jaehee Park
2022-04-12 1:55 ` [PATCH 0/2] staging: greybus: fix warnings reported by checkpatch Alex Elder
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=20220412200220.GA2963810@jaehee-ThinkPad-X1-Extreme \
--to=jhpark1013@gmail.com \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=julia.lawall@inria.fr \
--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
all inboxes | Powered by JetHome®