From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751620AbbCVC4o (ORCPT ); Sat, 21 Mar 2015 22:56:44 -0400 Received: from smtprelay0114.hostedemail.com ([216.40.44.114]:53299 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751502AbbCVC4n (ORCPT ); Sat, 21 Mar 2015 22:56:43 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 30,2,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:355:379:541:599:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1981:2110:2194:2199:2393:2559:2562:2693:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4321:5007:6119:6261:7903:8531:9108:10010:10400:10450:10455:10848:11232:11473:11658:11914:12517:12519:12740:13069:13161:13229:13311:13357:13894:14096:14097:19904:19999:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:1:0 X-HE-Tag: cap98_222fd4bf719 X-Filterd-Recvd-Size: 2253 Message-ID: <1426992999.20324.9.camel@perches.com> Subject: Re: [PATCH] checkpatch.pl: Add warning for harmful goto labels From: Joe Perches To: Richard Weinberger Cc: "\"L. Alberto" =?ISO-8859-1?Q?Gim=E9nez=22?= , LKML , Andy Whitcroft Date: Sat, 21 Mar 2015 19:56:39 -0700 In-Reply-To: <550DECE9.3090801@nod.at> References: <1426972574-12199-1-git-send-email-agimenez@sysvalve.es> <20150321220655.GA14583@bart.evergreen.loc> <550DECE9.3090801@nod.at> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2015-03-21 at 23:12 +0100, Richard Weinberger wrote: > Am 21.03.2015 um 23:06 schrieb L. Alberto Giménez: > > There are a lot of cases where a too generic goto label for cleanup > > causes a bug or makes debugging harder. [] > > 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. I agree with you Richard. While the form of the patch is fine, but content is not. There might be a case for a coccinelle style patch that looks for more than a single label in a function and looks at the label name choices, but I think it'd be pretty dubious at best. > > It's just a proposal for a warning. If it is really not needed, it won't > > be applied and life will go on :) In that case, it'd be nicer to preface the patch subject with RFC > 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. Richard, what sub-optimal messages do you think checkpatch produces by default? cheers, Joe