Re: [PATCH] staging: gdm72xx: remove unneeded test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux