From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751843AbbCUWNC (ORCPT ); Sat, 21 Mar 2015 18:13:02 -0400 Received: from a.ns.miles-group.at ([95.130.255.143]:65275 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751494AbbCUWNA (ORCPT ); Sat, 21 Mar 2015 18:13:00 -0400 Message-ID: <550DECE9.3090801@nod.at> Date: Sat, 21 Mar 2015 23:12:57 +0100 From: Richard Weinberger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: =?windows-1252?Q?=22L=2E_Alberto_Gim=E9nez=22?= CC: LKML , Andy Whitcroft , Joe Perches Subject: Re: [PATCH] checkpatch.pl: Add warning for harmful goto labels References: <1426972574-12199-1-git-send-email-agimenez@sysvalve.es> <20150321220655.GA14583@bart.evergreen.loc> In-Reply-To: <20150321220655.GA14583@bart.evergreen.loc> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 21.03.2015 um 23:06 schrieb L. Alberto Giménez: > On Sat, Mar 21, 2015 at 10:40:46PM +0100, Richard Weinberger wrote: >> Huh? Since when? > > There are a lot of cases where a too generic goto label for cleanup > causes a bug or makes debugging harder. > > Last time was this G+ post, by Dan Carpenter: > > https://plus.google.com/106378716002406849458/posts/DfuAkt8szf2 > > >> rw@azrael:~/linux (for-v4.1/uml_misc $)> git grep -e "goto out;" | wc -l >> 26667 >> rw@azrael:~/linux (for-v4.1/uml_misc $)> git grep -e "goto fail;" | wc -l >> 3733 > > If something is already in the kernel code, does that mean that it's OK? > I honestly don't think so, and I think that goto labels for cleanup exit > paths should be a little more descriptive. I disagree. out and exit are perfectly fine labels. >> What is next? Variable name "i" considered harmful? > > No one complained about that so far. I might add that to checkpatch.pl > if needed. I *really* *really* hope you're kidding. >> Can we please stop this nonsense. > > It's just a proposal for a warning. If it is really not needed, it won't > be applied and life will go on :) checkpatch.pl is already more than annoying. It used to be a nice tool but it becomes more and more an harassment for guys who actually work on the kernel. Thanks, //richard