lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1432830808.2846.233.camel@perches.com>
Date:	Thu, 28 May 2015 09:33:28 -0700
From:	Joe Perches <joe@...ches.com>
To:	Julia Lawall <julia.lawall@...6.fr>
Cc:	Laurent Navet <laurent.navet@...il.com>,
	gregkh@...uxfoundation.org, benchan@...omium.org,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: gdm72xx: remove unneeded test

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/


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ