Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946274AbbHGSH6 (ORCPT ); Fri, 7 Aug 2015 14:07:58 -0400 Received: from mga01.intel.com ([192.55.52.88]:37585 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946114AbbHGSHm (ORCPT ); Fri, 7 Aug 2015 14:07:42 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,630,1432623600"; d="scan'208";a="621323123" Message-ID: <1438970861.2293.1.camel@linux.intel.com> Subject: Re: false positives with checkpatch From: Ross Zwisler To: Joe Perches Cc: Andy Whitcroft , LKML , "sparse@chrisli.org" , Linus Torvalds Date: Fri, 07 Aug 2015 12:07:41 -0600 In-Reply-To: <1438961867.2322.43.camel@perches.com> References: <1438959684.17630.4.camel@linux.intel.com> <1438961867.2322.43.camel@perches.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 (3.12.11-1.fc21) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1743 Lines: 55 On Fri, 2015-08-07 at 08:37 -0700, Joe Perches wrote: > On Fri, 2015-08-07 at 09:01 -0600, Ross Zwisler wrote: > > When running checkpatch.pl against my latest patch set, I hit what I think are > > two false positives. Here are the related lines: > > > > +static inline void flush_cache_pmem(void __pmem *addr, size_t size) > > +{ > > + if (arch_has_pmem_api()) > > + arch_flush_cache_pmem(addr, size); > > +} > > > > The error was: > > > > ERROR: need consistent spacing around '*' (ctx:WxV) > > #88: FILE: include/linux/pmem.h:167: > > +static inline void flush_cache_pmem(void __pmem *addr, size_t size) > > ^ > > The (void __annotation *variable) syntax is correct, I believe, and is used > > consistently for both __iomem and __pmem annotations. > > checkpatch doesn't know what a __pmem is. > Neither did I until a second ago. > > Are there any other sparse annotations that were > added by this subsystem? (I don't notice any) This was the only sparse annotation that we added. > --- > scripts/checkpatch.pl | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index fd8e502..6362ec3 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -264,6 +264,7 @@ our $Sparse = qr{ > __kernel| > __force| > __iomem| > + __pmem| > __must_check| > __init_refok| > __kprobes| Yep, this works for me. Reviewed-by: Ross Zwisler -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/