Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751914AbbLIPr6 (ORCPT ); Wed, 9 Dec 2015 10:47:58 -0500 Received: from smtprelay0107.hostedemail.com ([216.40.44.107]:53862 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751538AbbLIPr5 (ORCPT ); Wed, 9 Dec 2015 10:47:57 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2551:2553:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3866:3867:3868:3870:3874:4321:5007:6261:10004:10400:10848:11026:11232:11658:11783:11889:11914:12043:12050:12296:12517:12519:12555:12740:13069:13311:13357:13870:13894:14659:21080:30054:30070:30090: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:2,LUA_SUMMARY:none X-HE-Tag: value83_ae47efb3750a X-Filterd-Recvd-Size: 2049 Message-ID: <1449676073.25389.5.camel@perches.com> Subject: Re: [PATCH v2] printk: help pr_debug and pr_devel to optimize out arguments From: Joe Perches To: Arnd Bergmann , Aaron Conole Cc: Andrew Morton , linux-kernel@vger.kernel.org, Jason Baron Date: Wed, 09 Dec 2015 07:47:53 -0800 In-Reply-To: <1652262.soph10NRXK@wuerfel> References: <5661BFEE.1050103@akamai.com> <1449265902-21781-1-git-send-email-aconole@redhat.com> <1652262.soph10NRXK@wuerfel> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.2-0ubuntu2 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 Content-Length: 1325 Lines: 36 On Wed, 2015-12-09 at 12:52 +0100, Arnd Bergmann wrote: > On Friday 04 December 2015 16:51:42 Aaron Conole wrote: > > --- a/include/linux/printk.h > > +++ b/include/linux/printk.h > > @@ -106,13 +106,14 @@ struct va_format { > > ? > > ?/* > > ? * Dummy printk for disabled debugging statements to use whilst maintaining > > - * gcc's format and side-effect checking. > > + * gcc's format checking. > > ? */ > > -static inline __printf(1, 2) > > -int no_printk(const char *fmt, ...) > > -{ > > -???????return 0; > > -} > > +#define no_printk(fmt, ...)????????????????????\ > > +do {???????????????????????????????????????????\ > > +???????if (0) {????????????????????????????????\ > > +???????????????printk(fmt, ##__VA_ARGS__);?????\ > > +???????}???????????????????????????????????????\ > > +} while (0) > > ? > > This change breaks compiling lib/842/, at least in some configurations: > > lib/842/842_decompress.c: In function '__do_index': > lib/842/842_decompress.c:205:12422: error: implicit declaration of function 'no_printk' Please specify a configuration that fails. -- 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/