From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934404AbbEMNt4 (ORCPT ); Wed, 13 May 2015 09:49:56 -0400 Received: from 251.110.2.81.in-addr.arpa ([81.2.110.251]:52488 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933767AbbEMNtz (ORCPT ); Wed, 13 May 2015 09:49:55 -0400 Date: Wed, 13 May 2015 14:49:37 +0100 From: One Thousand Gnomes To: David Sterba Cc: Dan Carpenter , Andy Whitcroft , Joe Perches , linux-kernel@vger.kernel.org Subject: Re: [patch v2] checkpatch: complain about GW-BASIC style label names Message-ID: <20150513144937.67e7e383@lxorguk.ukuu.org.uk> In-Reply-To: <20150513131613.GI23255@twin.jikos.cz> References: <1431029858.18597.35.camel@perches.com> <20150513123712.GA2798@mwanda> <20150513131613.GI23255@twin.jikos.cz> Organization: Intel Corporation X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 13 May 2015 15:16:13 +0200 David Sterba wrote: > On Wed, May 13, 2015 at 03:37:12PM +0300, Dan Carpenter wrote: > > GW-BASIC style label names are annoying so we can warn about that in > > checkpatch. The warnings look like: > > > > WARNING: 'fail2' isn't informative - prefer descriptive label names > > #267: FILE: ./sound/ppc/beep.c:267: > > + fail2: snd_ctl_remove(chip->card, beep_ctl); > > > > This generates slightly under 2000 new warnings. None of them are > > false positives. > > Please whitelist fs/btrfs/* from this type of checkpatch warning. If you could whitelist the rest of the kernel too that would also be useful. There's nothing wrong with driver code that ends fail_3: xxx fail_2: yyy fail_1: blah return; if anything it makes it very clear which level of unravelling on error is occurring and at a glance enables you to see that the error handling is ordered properly.