From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932383AbcG0BYS (ORCPT ); Tue, 26 Jul 2016 21:24:18 -0400 Received: from smtprelay0056.hostedemail.com ([216.40.44.56]:50747 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932149AbcG0BYL (ORCPT ); Tue, 26 Jul 2016 21:24:11 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:2919:3138:3139:3140:3141:3142:3352:3622:3865:3866:3868:3871:3872:3874:4321:5007:8603:10004:10400:10848:11026:11232:11473:11658:11783:11914:12296:12517:12519:12740:13069:13311:13357:13439:13894:14659:14721:21080:30012:30054:30079:30091,0,RBL:error,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:error,Custom_rules:0:0:0,LFtime:2000,LUA_SUMMARY:none X-HE-Tag: gun36_5d98b0e92c045 X-Filterd-Recvd-Size: 2002 Message-ID: <1469582642.4159.4.camel@perches.com> Subject: Re: [PATCH] qed: Add and use specific logging functions to reduce object size From: Joe Perches To: Yuval Mintz , Ariel Elior , everest-linux-l2@qlogic.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Date: Tue, 26 Jul 2016 18:24:02 -0700 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.2-0ubuntu3 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, 2016-07-26 at 14:25 -0700, Joe Perches wrote: > Current DP_ macros generate a lot of code. > Using functions with vsprintf extension %pV helps reduce that size. Yuval, I used the same KERN_ output types, but it is unusual that DP_INFO outputs at KERN_NOTICE. Was that a copy/paste defect or should it be emitted at KERN_INFO and DP_VERBOSE be emitted at KERN_DEBUG? > define DP_INFO(cdev, fmt, ...)       \ > - do {       \ > - if (unlikely((cdev)->dp_level <= QED_LEVEL_INFO)) {   \ > - pr_notice("[%s:%d(%s)]" fmt,       \ > -   __func__, __LINE__,       \ > -   DP_NAME(cdev) ? DP_NAME(cdev) : "", \ > -   ## __VA_ARGS__);       \ > - }       \ > - } while (0) [] > -#define DP_VERBOSE(cdev, module, fmt, ...) \ > - do { \ > - if (unlikely(((cdev)->dp_level <= QED_LEVEL_VERBOSE) && \ > -      ((cdev)->dp_module & module))) { \ > - pr_notice("[%s:%d(%s)]" fmt, \ > -   __func__, __LINE__, \ > -   DP_NAME(cdev) ? DP_NAME(cdev) : "", \ > -   ## __VA_ARGS__); \ > - } \ > - } while (0)