From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758789AbbCDQca (ORCPT ); Wed, 4 Mar 2015 11:32:30 -0500 Received: from smtprelay0205.hostedemail.com ([216.40.44.205]:56132 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932495AbbCDQcZ (ORCPT ); Wed, 4 Mar 2015 11:32:25 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::,RULES_HIT:41:355:379:541:599:960:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2559:2562:2693:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3872:4250:4321:5007:6119:6261:7808:7901:7903:10004:10400:10848:11232:11658:11914:12296:12517:12519:12740:13069:13311:13357: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: bit74_6bd56a17c9c2a X-Filterd-Recvd-Size: 2205 Message-ID: <1425486739.2712.12.camel@perches.com> Subject: Re: [PATCH v2] xen-scsiback: use DRV_PFX in the pr macros and DPRINTK From: Joe Perches To: Tao Chen Cc: jgross@suse.com, konrad.wilk@oracle.com, boris.ostrovsky@oracle.com, david.vrabel@citrix.com, xen-devel@lists.xenproject.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, wu.wubin@huawei.com, rudy.zhangmin@huawei.com Date: Wed, 04 Mar 2015 08:32:19 -0800 In-Reply-To: <1425493951-41801-1-git-send-email-boby.chen@huawei.com> References: <1425493951-41801-1-git-send-email-boby.chen@huawei.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: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2015-03-04 at 18:32 +0000, Tao Chen wrote: > Defined the string of {xen-pvscsi: } as DRV_PFX, then use it in the pr sentences and DPRINTK. > Also fixed up some comments just as eliminate redundant white spaces and format the code. > These will make the code easier to read. It'd probaby be better just to use pr_fmt before any include and remove all the DRV_PRV uses #define pr_fmt(fmt) "xen-pvscsi: " fmt > diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c [] > @@ -69,8 +69,10 @@ > #include > #include > > +#define DRV_PFX "xen-pvscsi: " > #define DPRINTK(_f, _a...) \ > - pr_debug("(file=%s, line=%d) " _f, __FILE__ , __LINE__ , ## _a) > + pr_debug(DRV_PFX "(file=%s, line=%d) " _f, \ > + __FILE__ , __LINE__ , ## _a) I'd also remove DPRINTK and just use pr_debug directly as dynamic_debug can emit file and line as desired. > @@ -84,7 +86,7 @@ struct ids_tuple { > > struct v2p_entry { > struct ids_tuple v; /* translate from */ > - struct scsiback_tpg *tpg; /* translate to */ > + struct scsiback_tpg *tpg; /* translate to */ superfluous change.