From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-000f0801.pphosted.com (mx0b-000f0801.pphosted.com [67.231.152.113]) by dpdk.org (Postfix) with ESMTP id 551CFC656 for ; Thu, 30 Jul 2015 19:03:36 +0200 (CEST) Received: from pps.filterd (m0000700.ppops.net [127.0.0.1]) by mx0b-000f0801.pphosted.com (8.15.0.59/8.15.0.59) with SMTP id t6UGWmBd030852; Thu, 30 Jul 2015 10:03:34 -0700 Received: from hq1wp-exchub01.corp.brocade.com ([144.49.131.13]) by mx0b-000f0801.pphosted.com with ESMTP id 1vyp8p8ac7-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Thu, 30 Jul 2015 10:03:34 -0700 Received: from HQ1WP-EXMB11.corp.brocade.com (10.70.20.185) by HQ1WP-EXCHUB01.corp.brocade.com (10.70.36.99) with Microsoft SMTP Server (TLS) id 14.3.123.3; Thu, 30 Jul 2015 10:03:33 -0700 Received: from urahara (172.16.180.50) by Hq1wp-exmb11.corp.brocade.com (10.70.20.185) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Thu, 30 Jul 2015 10:03:32 -0700 Date: Thu, 30 Jul 2015 10:03:38 -0700 From: Stephen Hemminger To: Message-ID: <20150730100338.76cd581b@urahara> In-Reply-To: <1428514670-7982-2-git-send-email-stephen@networkplumber.org> References: <1428514670-7982-1-git-send-email-stephen@networkplumber.org> <1428514670-7982-2-git-send-email-stephen@networkplumber.org> Organization: Brocade MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [172.16.180.50] X-ClientProxiedBy: hq1wp-excas12.corp.brocade.com (10.70.38.22) To Hq1wp-exmb11.corp.brocade.com (10.70.20.185) X-Proofpoint-Spam-Reason: safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151, 1.0.33, 0.0.0000 definitions=2015-07-30_08:2015-07-30,2015-07-30,1970-01-01 signatures=0 Cc: dev@dpdk.org Subject: [dpdk-dev] [PATCH v2] enic: silence log message unless debug enabled X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jul 2015 17:03:36 -0000 This blocks the annoying ENIC driver initialization message unless debug is enabled. Drivers should speak only when spoken to and not be chatty. Signed-off-by: Stephen Hemminger --- drivers/net/enic/enic_compat.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/enic/enic_compat.h b/drivers/net/enic/enic_compat.h index f3598ed..94656c8 100644 --- a/drivers/net/enic/enic_compat.h +++ b/drivers/net/enic/enic_compat.h @@ -82,7 +82,11 @@ #define dev_err(x, args...) dev_printk(ERR, args) #define dev_info(x, args...) dev_printk(INFO, args) #define dev_warning(x, args...) dev_printk(WARNING, args) +#ifdef RTE_LIBRTE_ENIC_DEBUG #define dev_debug(x, args...) dev_printk(DEBUG, args) +#else +#define dev_debug(x, args...) do { } while(0) +#endif #define __le16 u16 #define __le32 u32 -- 2.1.4