rtlwifi: btcoexist: Convert BTC_PRINTK to btc_<foo>_dbg

Use a more common logging style.

Miscellanea:

o Add specific logging macros for ALGORITHM and INTERFACE types
o Output the messages at KERN_DEBUG
o Coalesce formats
o Align arguments
o Whitespace style adjustments for only these changes

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Joe Perches 2016-03-17 17:00:21 -07:00 committed by Kalle Valo
parent 1e81245820
commit 466414a084
7 changed files with 1851 additions and 1985 deletions

View File

@ -141,8 +141,8 @@ static u8 halbtc_get_wifi_central_chnl(struct btc_coexist *btcoexist)
if (rtlphy->current_channel != 0)
chnl = rtlphy->current_channel;
BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE,
"static halbtc_get_wifi_central_chnl:%d\n", chnl);
btc_alg_dbg(ALGO_TRACE,
"static halbtc_get_wifi_central_chnl:%d\n", chnl);
return chnl;
}

View File

@ -116,12 +116,17 @@ extern u32 btc_dbg_type[];
#define WIFI_P2P_GO_CONNECTED BIT3
#define WIFI_P2P_GC_CONNECTED BIT4
#define BTC_PRINT(dbgtype, dbgflag, printstr, ...) \
do { \
if (unlikely(btc_dbg_type[dbgtype] & dbgflag)) {\
printk(printstr, ##__VA_ARGS__); \
} \
} while (0)
#define btc_alg_dbg(dbgflag, fmt, ...) \
do { \
if (unlikely(btc_dbg_type[BTC_MSG_ALGORITHM] & dbgflag)) \
printk(KERN_DEBUG fmt, ##__VA_ARGS__); \
} while (0)
#define btc_iface_dbg(dbgflag, fmt, ...) \
do { \
if (unlikely(btc_dbg_type[BTC_MSG_INTERFACE] & dbgflag)) \
printk(KERN_DEBUG fmt, ##__VA_ARGS__); \
} while (0)
#define BTC_RSSI_HIGH(_rssi_) \
((_rssi_ == BTC_RSSI_STATE_HIGH || \