From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422933AbbFERne (ORCPT ); Fri, 5 Jun 2015 13:43:34 -0400 Received: from smtprelay0223.hostedemail.com ([216.40.44.223]:52408 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754774AbbFERnc (ORCPT ); Fri, 5 Jun 2015 13:43:32 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,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:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3868:3870:3871:3872:4250:4321:4605:5007:6261:7903:8828:10004:10400:10848:11026:11232:11658:11914:12043:12295:12517:12519:12740:13069:13311:13357:14096:14097: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:0:0 X-HE-Tag: sheep05_1e94b1a186c59 X-Filterd-Recvd-Size: 1809 Message-ID: <1433526209.2658.75.camel@perches.com> Subject: Re: False positive in checkpatch.pl ? From: Joe Perches To: Aseda Aboagye Cc: apw@canonical.com, linux-kernel@vger.kernel.org Date: Fri, 05 Jun 2015 10:43:29 -0700 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 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 On Fri, 2015-06-05 at 10:21 -0700, Aseda Aboagye wrote: > Hello CHECKPATCH maintainers, > > I encountered this error when using the checkpatch.pl script > complaining about my macro. > > Errors: > * checkpatch.pl errors/warnings > > ERROR: Macros with complex values should be enclosed in parenthesis > #92: FILE: include/libsharedobjs.h:28: > +#define SHAREDLIB(...) __attribute__ > ((section(".roshared"))) __VA_ARGS__ > > total: 1 errors, 0 warnings, 45 lines checked > > Since it's really an attribute, adding the parens wouldn't work. Just > thought I'd send this your way. Perhaps make an exception for cases > like these? SHAREDLIB is not used in the kernel tree. Maybe add an exception in your own checkpatch version. Though maybe adding a SHAREDLIB macro without the ... and make it a simple #define instead like below would be better #define SHAREDLIB __attribute__((section(".roshared")))