From patchwork Sat Oct 11 18:14:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 5069651 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3B2449F2F1 for ; Sat, 11 Oct 2014 18:14:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 61A462017D for ; Sat, 11 Oct 2014 18:14:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6723520176 for ; Sat, 11 Oct 2014 18:14:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752508AbaJKSOu (ORCPT ); Sat, 11 Oct 2014 14:14:50 -0400 Received: from smtprelay0036.hostedemail.com ([216.40.44.36]:46240 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752502AbaJKSOt (ORCPT ); Sat, 11 Oct 2014 14:14:49 -0400 Received: from filter.hostedemail.com (ff-bigip1 [10.5.19.254]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id B853A6A9B6; Sat, 11 Oct 2014 18:14:48 +0000 (UTC) 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:1261:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1981:2194:2198:2199:2200:2393:2559:2562:2691:2828:2892:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3871:3872:4250:4321:4605:5007:7652:10004:10400:10848:11026:11232:11657:11658:11914:12043:12295:12296:12438:12517:12519:12530:12555:12740:13069:13095:13161:13229:13255: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: car61_29dab8bff103a X-Filterd-Recvd-Size: 2406 Received: from [192.168.1.155] (pool-71-103-235-196.lsanca.fios.verizon.net [71.103.235.196]) (Authenticated sender: joe@perches.com) by omf05.hostedemail.com (Postfix) with ESMTPA; Sat, 11 Oct 2014 18:14:47 +0000 (UTC) Message-ID: <1413051286.22149.2.camel@joe-AO725> Subject: Re: [PATCH V3.18] rtlwifi: rtl8192ee: Prevent log spamming for switch statements From: Joe Perches To: Larry Finger Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org, troy_tan@realsil.com.cn, netdev@vger.kernel.org Date: Sat, 11 Oct 2014 11:14:46 -0700 In-Reply-To: <1413050393-6257-1-git-send-email-Larry.Finger@lwfinger.net> References: <1413050393-6257-1-git-send-email-Larry.Finger@lwfinger.net> X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Sat, 2014-10-11 at 12:59 -0500, Larry Finger wrote: > The driver logs a message when the default branch of switch statements are > taken. Such information is useful when debugging, but these log items should > not be seen for standard usage. Hey Larry. At some point, it'd be good to make RT_TRACE use the generic dynamic_debug facility. Something like the below, but I believe there are some issues with include ordering and #define DEBUG when dynamic_debug is not #defined. --- drivers/net/wireless/rtlwifi/debug.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/rtlwifi/debug.h b/drivers/net/wireless/rtlwifi/debug.h index fc794b3..fbc8185 100644 --- a/drivers/net/wireless/rtlwifi/debug.h +++ b/drivers/net/wireless/rtlwifi/debug.h @@ -178,17 +178,14 @@ do { \ do { \ if (unlikely(((comp) & rtlpriv->dbg.global_debugcomponents) && \ ((level) <= rtlpriv->dbg.global_debuglevel))) { \ - printk(KERN_DEBUG KBUILD_MODNAME ":%s():<%lx-%x> " fmt, \ - __func__, in_interrupt(), in_atomic(), \ - ##__VA_ARGS__); \ + pr_debug(fmt, ##__VA_ARGS__); \ } \ } while (0) #define RTPRINT(rtlpriv, dbgtype, dbgflag, fmt, ...) \ do { \ if (unlikely(rtlpriv->dbg.dbgp_type[dbgtype] & dbgflag)) { \ - printk(KERN_DEBUG KBUILD_MODNAME ": " fmt, \ - ##__VA_ARGS__); \ + pr_debug(fmt, ##__VA_ARGS__); \ } \ } while (0)