From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751116AbeAVVE1 (ORCPT ); Mon, 22 Jan 2018 16:04:27 -0500 Received: from smtprelay0181.hostedemail.com ([216.40.44.181]:60073 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750892AbeAVVEZ (ORCPT ); Mon, 22 Jan 2018 16:04:25 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:973:981:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2110:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3871:3872:3873:3874:4321:5007:6119:7903:8828:10004:10400:10848:11026:11232:11658:11914:12296:12740:12760:12895:13069:13071:13311:13357:13439:14180:14659:14721:21060:21080:21433:21451:21627:30029:30054:30056:30064:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: sugar71_909d51e5bf0d X-Filterd-Recvd-Size: 1865 Message-ID: <1516655059.8378.21.camel@perches.com> Subject: Re: [PATCH TRIVIAL] bsg: use pr_debug instead of hand crafted macros From: Joe Perches To: Bart Van Assche , "jthumshirn@suse.de" , "axboe@fb.com" Cc: "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" Date: Mon, 22 Jan 2018 13:04:19 -0800 In-Reply-To: <1516653723.2545.37.camel@wdc.com> References: <20180122075348.6974-1-jthumshirn@suse.de> <1516652629.8378.14.camel@perches.com> <1516653723.2545.37.camel@wdc.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-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 Mon, 2018-01-22 at 20:42 +0000, Bart Van Assche wrote: > On Mon, 2018-01-22 at 12:23 -0800, Joe Perches wrote: > > On Mon, 2018-01-22 at 08:53 +0100, Johannes Thumshirn wrote: > > > Use pr_debug instead of hand crafted macros. This way it is not needed to > > > re-compile the kernel to enable bsg debug outputs and it's possible to > > > selectively enable specific prints. > > > > Perhaps better to use > > > > #define bsg_dbg(bd, fmt, ...) \ > > pr_debug(bd->name, fmt, ##__VA_ARGS__) That was written with my brain switched off and was obviously incorrect. > Hello Joe, Hi Bart. > Why do you think that would be better? All of the messages save one already emit bd->name (and that one that doesn't use bd->name could likely use it too) So maybe this is better: #define bsg_dbg(bd, fmt, ...) \ pr_debug("%s: " fmt, (bd)->name, ##__VA_ARGS__) cheers, Joe