From: Joe Perches <joe@perches.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Laurent Navet <laurent.navet@gmail.com>,
gregkh@linuxfoundation.org, benchan@chromium.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: gdm72xx: remove unneeded test
Date: Thu, 28 May 2015 09:33:28 -0700 [thread overview]
Message-ID: <1432830808.2846.233.camel@perches.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1505281820140.2464@hadrien>
On Thu, 2015-05-28 at 18:21 +0200, Julia Lawall wrote:
>
> On Wed, 27 May 2015, Joe Perches wrote:
>
> > On Thu, 2015-05-28 at 07:43 +0200, Julia Lawall wrote:
> > > On Wed, 27 May 2015, Joe Perches wrote:
> > > > Perhaps all of the uses like:
> > > >
> > > > goto <foo>;
> > > > <foo>:
> > > >
> > > > could be modified. There are ~150 in the kernel.
> > >
> > > I wrote a semantic patch recently for that as well... Maybe I can take
> > > care of it.
> >
> > Great. Thanks Julia.
> >
> > There may be some reorganization of code that is
> > possible for many of these than coccinelle may
> > not perform well though.
>
> As what looks like an extreme example, wouldn't this function be better as
> just return inet6_register_protosw(&rawv6_protosw); ?
>
> int __init rawv6_init(void)
> {
> int ret;
>
> ret = inet6_register_protosw(&rawv6_protosw);
> if (ret)
> goto out;
> out:
> return ret;
> }
That style is exactly what I was thinking about.
Yes, I think this would indeed be much better as a
single line and might have been better still removed
altogether but for the rawv6_protosw hiding.
There are a couple others just like it in net/
next prev parent reply other threads:[~2015-05-28 16:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-27 20:25 [PATCH] staging: gdm72xx: remove unneeded test Laurent Navet
2015-05-27 20:30 ` Joe Perches
2015-05-28 5:43 ` Julia Lawall
2015-05-28 5:48 ` Joe Perches
2015-05-28 16:21 ` Julia Lawall
2015-05-28 16:33 ` Joe Perches [this message]
2015-05-28 7:14 ` Dan Carpenter
2015-05-28 8:06 ` Joe Perches
2015-05-28 8:33 ` Julia Lawall
2015-05-28 8:41 ` Joe Perches
2015-05-27 20:46 ` Fabio Estevam
2015-05-28 7:20 ` Dan Carpenter
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=1432830808.2846.233.camel@perches.com \
--to=joe@perches.com \
--cc=benchan@chromium.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=julia.lawall@lip6.fr \
--cc=laurent.navet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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