From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756830AbcDFG3r (ORCPT ); Wed, 6 Apr 2016 02:29:47 -0400 Received: from smtprelay0192.hostedemail.com ([216.40.44.192]:45492 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751982AbcDFG3p (ORCPT ); Wed, 6 Apr 2016 02:29:45 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:541:599:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2197:2198:2199:2200:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3653:3865:3866:3867:3868:3870:3871:3874:4321:5007:6119:7903:8957:10004:10400:10848:11232:11658:11783:11914:12296:12517:12519:12555:12740:13069:13161:13229:13311:13357:13439:13548:13848:13894:14181:14659:14721:21080:21221:30012:30054:30070:30091,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:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: jewel32_1ab6493bee73d X-Filterd-Recvd-Size: 2071 Message-ID: <1459924182.6715.30.camel@perches.com> Subject: Re: [PATCH 2/2] staging: slicoss: fix missing blank line (fwd) From: Joe Perches To: Julia Lawall Cc: LKML , Andrew Morton Date: Tue, 05 Apr 2016 23:29:42 -0700 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.2-0ubuntu1 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 Wed, 2016-04-06 at 07:17 +0200, Julia Lawall wrote: > I have the impression that __iomem is in the wrong place in the following  > code.  Perhaps checkpatch could do something about that?  Coccinelle,  > unfortunately, skips over such annotations, to simplify parsing... [] >        __iomem struct slic_regs *slic_regs = adapter->slic_regs; Maybe so. There aren't many of these in the kernel tree. $ git grep -E "^\s+__iomem" | wc -l 46 And there are a whole lot more after the type, so maybe this is appropriate. ---  scripts/checkpatch.pl | 8 ++++++++  1 file changed, 8 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index e3d9c34..1b23495 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3400,6 +3400,14 @@ sub process {   }   }   +# check for attributions like __iomem before the type + while ($sline =~ m{(\b$Type\s*$Ident)}g) { + my $tmp = trim($1); + next if ($tmp !~ /^($Sparse)\b/); + WARN("ATTRIBUTE_LOCATION", +      "attribute '$1' should be positioned after the type\n" . $herecurr); + } +  # check for misordered declarations of char/short/int/long with signed/unsigned   while ($sline =~ m{(\b$TypeMisordered\b)}g) {   my $tmp = trim($1);