Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934139AbcCHAXR (ORCPT ); Mon, 7 Mar 2016 19:23:17 -0500 Received: from smtprelay0093.hostedemail.com ([216.40.44.93]:33143 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933690AbcCHAUc (ORCPT ); Mon, 7 Mar 2016 19:20:32 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:355:379:541:800:960:966:968:973:988:989:1260:1345:1359:1437:1534:1543:1711:1730:1747:1777:1792:2194:2196:2199:2200:2393:2559:2562:2729:2895:2904:3138:3139:3140:3141:3142:3354:3865:3867:3868:3870:4225:4250:4321:4385:5007:6119:6261:7903:9592:10004:10848:11026:11473:11657:11658:11914:12043:12294:12296:12438:12517:12519:12555:12679:13161:13229:14093:14394:14721:21080:30045:30054:30070:30075,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,LFtime:2,LUA_SUMMARY:none X-HE-Tag: paper85_3e7b40bc4e663 X-Filterd-Recvd-Size: 4484 From: Joe Perches To: linux-kernel@vger.kernel.org Cc: Kalle Valo , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 5/5] ti: wl1251: Convert wl1251_info to wl1251_debug Date: Mon, 7 Mar 2016 16:19:37 -0800 Message-Id: X-Mailer: git-send-email 2.6.3.368.gf34be46 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3627 Lines: 107 These logging messages are always emitted at KERN_DEBUG. Add a DEBUG_ALWAYS enum to the debug type enum and convert the macro and uses from wl1251_info( to wl1251_debug(DEBUG_ALWAYS, Miscellanea: o Remove the now unused wl1251_info macro Signed-off-by: Joe Perches --- drivers/net/wireless/ti/wl1251/init.c | 10 +++++----- drivers/net/wireless/ti/wl1251/main.c | 4 ++-- drivers/net/wireless/ti/wl1251/sdio.c | 4 ++-- drivers/net/wireless/ti/wl1251/wl1251.h | 6 ++---- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers/net/wireless/ti/wl1251/init.c b/drivers/net/wireless/ti/wl1251/init.c index 796ccf4..29a990d 100644 --- a/drivers/net/wireless/ti/wl1251/init.c +++ b/drivers/net/wireless/ti/wl1251/init.c @@ -411,11 +411,11 @@ int wl1251_hw_init(struct wl1251 *wl) goto out_free_data_path; wl_mem_map = wl->target_mem_map; - wl1251_info("%d tx blocks at 0x%x, %d rx blocks at 0x%x", - wl_mem_map->num_tx_mem_blocks, - wl->data_path->tx_control_addr, - wl_mem_map->num_rx_mem_blocks, - wl->data_path->rx_control_addr); + wl1251_debug(DEBUG_ALWAYS, "%d tx blocks at 0x%x, %d rx blocks at 0x%x", + wl_mem_map->num_tx_mem_blocks, + wl->data_path->tx_control_addr, + wl_mem_map->num_rx_mem_blocks, + wl->data_path->rx_control_addr); return 0; diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c index 593bed9..32b8c98 100644 --- a/drivers/net/wireless/ti/wl1251/main.c +++ b/drivers/net/wireless/ti/wl1251/main.c @@ -423,7 +423,7 @@ static int wl1251_op_start(struct ieee80211_hw *hw) wl->state = WL1251_STATE_ON; - wl1251_info("firmware booted (%s)", wl->fw_ver); + wl1251_debug(DEBUG_ALWAYS, "firmware booted (%s)", wl->fw_ver); /* update hw/fw version info in wiphy struct */ wiphy->hw_version = wl->chip_id; @@ -442,7 +442,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw) { struct wl1251 *wl = hw->priv; - wl1251_info("down"); + wl1251_debug(DEBUG_ALWAYS, "down"); wl1251_debug(DEBUG_MAC80211, "mac80211 stop"); diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/drivers/net/wireless/ti/wl1251/sdio.c index cc52a97..d2fb7d1 100644 --- a/drivers/net/wireless/ti/wl1251/sdio.c +++ b/drivers/net/wireless/ti/wl1251/sdio.c @@ -290,12 +290,12 @@ static int wl1251_sdio_probe(struct sdio_func *func, wl1251_sdio_ops.enable_irq = wl1251_enable_line_irq; wl1251_sdio_ops.disable_irq = wl1251_disable_line_irq; - wl1251_info("using dedicated interrupt line"); + wl1251_debug(DEBUG_ALWAYS, "using dedicated interrupt line"); } else { wl1251_sdio_ops.enable_irq = wl1251_sdio_enable_irq; wl1251_sdio_ops.disable_irq = wl1251_sdio_disable_irq; - wl1251_info("using SDIO interrupt"); + wl1251_debug(DEBUG_ALWAYS, "using SDIO interrupt"); } ret = wl1251_init_ieee80211(wl); diff --git a/drivers/net/wireless/ti/wl1251/wl1251.h b/drivers/net/wireless/ti/wl1251/wl1251.h index 62a40cc..705573f 100644 --- a/drivers/net/wireless/ti/wl1251/wl1251.h +++ b/drivers/net/wireless/ti/wl1251/wl1251.h @@ -47,6 +47,7 @@ enum { DEBUG_MAC80211 = BIT(11), DEBUG_CMD = BIT(12), DEBUG_ACX = BIT(13), + DEBUG_ALWAYS = BIT(31), DEBUG_ALL = ~0, }; @@ -54,12 +55,9 @@ enum { #define DEBUG_DUMP_LIMIT 1024 -#define wl1251_info(fmt, arg...) \ - printk(KERN_DEBUG DRIVER_PREFIX fmt "\n", ##arg) - #define wl1251_debug(level, fmt, arg...) \ do { \ - if (level & DEBUG_LEVEL) \ + if (level == DEBUG_ALWAYS || (level & DEBUG_LEVEL)) \ printk(KERN_DEBUG DRIVER_PREFIX fmt "\n", ##arg); \ } while (0) -- 2.6.3.368.gf34be46