From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753907AbdBIWju (ORCPT ); Thu, 9 Feb 2017 17:39:50 -0500 Received: from smtprelay0006.hostedemail.com ([216.40.44.6]:53097 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752047AbdBIWjt (ORCPT ); Thu, 9 Feb 2017 17:39:49 -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:1539:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3867:3870:3871:3872:4321:5007:6119:9545:10004:10400:10848:11232:11658:11914:12296:12740:12760:12895:13069:13161:13229:13311:13357:13439:14659:14721:21080:21451:30054: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: eye20_8f51f8a7c5d5a X-Filterd-Recvd-Size: 1626 Message-ID: <1486679983.2162.4.camel@perches.com> Subject: Re: [PATCH 1/4] cxgb3: Use more common logging style From: Joe Perches To: Steve Wise Cc: "'Doug Ledford'" , "'Sean Hefty'" , "'Hal Rosenstock'" , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 09 Feb 2017 14:39:43 -0800 In-Reply-To: <04c801d28324$a8459740$f8d0c5c0$@opengridcomputing.com> References: <15772862930dfd2f2e10574b86c063d781976a89.1486678686.git.joe@perches.com> <04c801d28324$a8459740$f8d0c5c0$@opengridcomputing.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.3-0ubuntu0.1 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 Thu, 2017-02-09 at 16:34 -0600, Steve Wise wrote: > > Subject: [PATCH 1/4] cxgb3: Use more common logging style [] > > -#define MOD "iw_cxgb3: " > > -#define PDBG(fmt, args...) pr_debug(MOD fmt, ## args) > > +#ifdef pr_fmt > > +#undef pr_fmt > > +#endif > > Is the ifdef/undef needed? I see other modules just define pr_fmt() regardless. Yes. Because kernel.h may be included before this file, kernel.h creates a define for pr_fmt, so this must be undef'd before redefining it. The other option, done in most files, is to add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt before any #include