Received: by 10.223.176.46 with SMTP id f43csp3374033wra; Mon, 22 Jan 2018 13:05:08 -0800 (PST) X-Google-Smtp-Source: AH8x226nDyVhxeYv1B9crSf6KRH/Ejmf/bgEoOIfGjV+mZ/BbYHeGAkjSyWiuCvYT9woROLFGhfO X-Received: by 10.36.87.83 with SMTP id u80mr247004ita.140.1516655108308; Mon, 22 Jan 2018 13:05:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516655108; cv=none; d=google.com; s=arc-20160816; b=a8iGNrTPIvLd+09UzhkqU1XtmIUliTEeNfEGEtNAv87kXOZgfcmQsUb7sVACIkuyqp nBIFQcW3Xw+1zan31lVMAlZAxEvvBRdJfayW5/I4lTab+m35JF/6jChoKa476F7NeA/b Am6J7yF9TaLM/ZCOYm+Vd3rStspL2V7I+y7TS5I21b2RpU4u2ffm/oOkpN9xX97cI2E8 rrlRj/QML6Ry8IA6RO5GlKpVpobyXETgQL6Mc+d3EqfWabFKZ2LRv//C1/Dl4sXxrlmy +WX0oJ9LHMUSWEsVjIuIWmYGG/1FLWWTrQ75o6JiANMMO3XZQno2CAbb7lcxHCquImEE z6UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=qDOsPCS1YUFKeYR143SHkp8vdBEzY+4VmJpXWyAGC5k=; b=uak8uVp5RGu6bYyEE1VKPMcc4ROu5nUv6rgBaUwFwyacl91zpfeYbVLBHq8Hh2E1nA IW2Gn+eOL9oXvIYgO5JXWAWVRWrIwK1x1gl3umDNkW0vznOTTmaH3/F6exeKTqTeRruv x/5ZAz0giceYshPGaS8rVJnVIMzebSDkqYcOhj8fNu/gDkw2tAtVksqdjYVK0bjWBdm/ q1MVoxQS9qy7PsGFXupQAULnZLleVQbeaozmbKpWktHENHQswBo8FyhGEp17E7/1MlV4 /MSrLvYxCeUFOfohi1/BI4I0BghFvbUvmY/7RFTbxiedvw4VFaJh7Yt3/2I85pH9q5C3 mOtg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i137si6762657ita.163.2018.01.22.13.04.55; Mon, 22 Jan 2018 13:05:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751104AbeAVVE1 (ORCPT + 99 others); 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 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay07.hostedemail.com (Postfix) with ESMTP id 578C1181D3417; Mon, 22 Jan 2018 21:04:24 +0000 (UTC) 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 Received: from XPS-9350 (unknown [172.56.39.144]) (Authenticated sender: joe@perches.com) by omf07.hostedemail.com (Postfix) with ESMTPA; Mon, 22 Jan 2018 21:04:21 +0000 (UTC) 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 Precedence: bulk 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