From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752855AbbCaQxS (ORCPT ); Tue, 31 Mar 2015 12:53:18 -0400 Received: from smtprelay0234.hostedemail.com ([216.40.44.234]:60159 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751323AbbCaQxP (ORCPT ); Tue, 31 Mar 2015 12:53:15 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:541:599:968:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2693:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3872:4250:4321:5007:6119:6261:7903:10004:10400:10848:11232:11658:11914:12043:12296:12517:12519:12740:13069:13255:13311:13357:13894: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: group86_735a8c27d6b09 X-Filterd-Recvd-Size: 1643 Message-ID: <1427820791.10376.24.camel@perches.com> Subject: Re: [PATCH] xen-blkback: define pr_fmt macro to avoid the duplication of DRV_PFX From: Joe Perches To: Roger Pau =?ISO-8859-1?Q?Monn=E9?= Cc: Tao Chen , konrad.wilk@oracle.com, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, wu.wubin@huawei.com, rudy.zhangmin@huawei.com Date: Tue, 31 Mar 2015 09:53:11 -0700 In-Reply-To: <551AB5D6.9080009@citrix.com> References: <1427836488-48092-1-git-send-email-boby.chen@huawei.com> <551AB5D6.9080009@citrix.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 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 Tue, 2015-03-31 at 16:57 +0200, Roger Pau Monné wrote: > El 31/03/15 a les 23.14, Tao Chen ha escrit: > > Define pr_fmt macro with {xen-blkback: } prefix, then remove all use > > of DRV_PFX in the pr and DPRINTK sentences. It will simplify the code. [] > > diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c [] > > @@ -14,6 +14,11 @@ > > > > */ > > > > +#define pr_fmt(fmt) "xen-blkback: " fmt > > +#define DPRINTK(fmt, args...) \ > > + pr_debug("(%s:%d) " fmt ".\n", \ > > + __func__, __LINE__, ##args) As dynamic debug can emit __func__ and __LINE__ I suggest converting DPRINTK to pr_debug.