From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754134AbbE1QV1 (ORCPT ); Thu, 28 May 2015 12:21:27 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:44751 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753964AbbE1QVT (ORCPT ); Thu, 28 May 2015 12:21:19 -0400 X-IronPort-AV: E=Sophos;i="5.13,513,1427752800"; d="scan'208";a="155725385" Date: Thu, 28 May 2015 18:21:16 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Joe Perches cc: Julia Lawall , Laurent Navet , gregkh@linuxfoundation.org, benchan@chromium.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: gdm72xx: remove unneeded test In-Reply-To: <1432792110.2846.199.camel@perches.com> Message-ID: References: <1432758345-8095-1-git-send-email-laurent.navet@gmail.com> <1432758608.2846.169.camel@perches.com> <1432792110.2846.199.camel@perches.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ; > > > : > > > > > > 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; } julia