Linux-Wireless Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/6] rtlwifi: Convert RT_TRACE to rtl_dbg and neatening
@ 2020-07-25 19:55 Joe Perches
  2020-07-25 19:55 ` [PATCH 2/6] rtlwifi: Remove unnecessary parenthese in rtl_dbg uses Joe Perches
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Joe Perches @ 2020-07-25 19:55 UTC (permalink / raw)
  To: Ping-Ke Shih, Larry Finger, linux-wireless
  Cc: Kalle Valo, David S. Miller, Jakub Kicinski, netdev, linux-kernel

RT_TRACE seems like it should be associated to tracing but it's not.
It's a generic debug logging mechanism.
Rename it to a more typical name.
Miscellaneous neatening around these changes.

Joe Perches (6):
  rtlwifi: Convert RT_TRACE to rtl_dbg
  rtlwifi: Remove unnecessary parenthese in rtl_dbg uses
  rtlwifi: Better spacing around rtl_dbg uses
  rtlwifi: Convert rtl_dbg embedded function names to %s: ..., __func__
  rtlwifi: Avoid multiline dereferences in rtl_dbg uses
  rtlwifi: Convert sleeped to slept in rtl_dbg uses

 drivers/net/wireless/realtek/rtlwifi/base.c   | 144 +--
 .../rtlwifi/btcoexist/halbtc8192e2ant.c       | 733 ++++++++--------
 .../rtlwifi/btcoexist/halbtc8723b1ant.c       | 366 ++++----
 .../rtlwifi/btcoexist/halbtc8723b2ant.c       | 720 +++++++--------
 .../rtlwifi/btcoexist/halbtc8821a1ant.c       | 670 +++++++-------
 .../rtlwifi/btcoexist/halbtc8821a2ant.c       | 760 ++++++++--------
 .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c  |  36 +-
 .../realtek/rtlwifi/btcoexist/rtl_btc.c       |   6 +-
 drivers/net/wireless/realtek/rtlwifi/cam.c    |  82 +-
 drivers/net/wireless/realtek/rtlwifi/core.c   | 261 +++---
 drivers/net/wireless/realtek/rtlwifi/debug.c  |   4 +-
 drivers/net/wireless/realtek/rtlwifi/debug.h  |  11 +-
 drivers/net/wireless/realtek/rtlwifi/efuse.c  |  72 +-
 drivers/net/wireless/realtek/rtlwifi/pci.c    | 290 +++---
 drivers/net/wireless/realtek/rtlwifi/ps.c     |  98 +--
 drivers/net/wireless/realtek/rtlwifi/regd.c   |  18 +-
 .../wireless/realtek/rtlwifi/rtl8188ee/dm.c   | 201 +++--
 .../wireless/realtek/rtlwifi/rtl8188ee/fw.c   |  90 +-
 .../wireless/realtek/rtlwifi/rtl8188ee/hw.c   | 194 ++---
 .../wireless/realtek/rtlwifi/rtl8188ee/led.c  |  20 +-
 .../wireless/realtek/rtlwifi/rtl8188ee/phy.c  | 385 ++++----
 .../wireless/realtek/rtlwifi/rtl8188ee/rf.c   |   6 +-
 .../wireless/realtek/rtlwifi/rtl8188ee/trx.c  |  24 +-
 .../realtek/rtlwifi/rtl8192c/dm_common.c      | 225 +++--
 .../realtek/rtlwifi/rtl8192c/fw_common.c      |  88 +-
 .../realtek/rtlwifi/rtl8192c/phy_common.c     | 268 +++---
 .../wireless/realtek/rtlwifi/rtl8192ce/dm.c   |  40 +-
 .../wireless/realtek/rtlwifi/rtl8192ce/hw.c   | 178 ++--
 .../wireless/realtek/rtlwifi/rtl8192ce/led.c  |  12 +-
 .../wireless/realtek/rtlwifi/rtl8192ce/phy.c  | 121 ++-
 .../wireless/realtek/rtlwifi/rtl8192ce/rf.c   |   6 +-
 .../wireless/realtek/rtlwifi/rtl8192ce/trx.c  |  14 +-
 .../wireless/realtek/rtlwifi/rtl8192cu/dm.c   |  40 +-
 .../wireless/realtek/rtlwifi/rtl8192cu/hw.c   | 154 ++--
 .../wireless/realtek/rtlwifi/rtl8192cu/led.c  |  10 +-
 .../wireless/realtek/rtlwifi/rtl8192cu/mac.c  |  66 +-
 .../wireless/realtek/rtlwifi/rtl8192cu/phy.c  | 134 +--
 .../wireless/realtek/rtlwifi/rtl8192cu/rf.c   |   6 +-
 .../wireless/realtek/rtlwifi/rtl8192cu/trx.c  |  58 +-
 .../wireless/realtek/rtlwifi/rtl8192de/dm.c   | 314 +++----
 .../wireless/realtek/rtlwifi/rtl8192de/fw.c   | 116 +--
 .../wireless/realtek/rtlwifi/rtl8192de/hw.c   | 206 ++---
 .../wireless/realtek/rtlwifi/rtl8192de/led.c  |  10 +-
 .../wireless/realtek/rtlwifi/rtl8192de/phy.c  | 422 ++++-----
 .../wireless/realtek/rtlwifi/rtl8192de/rf.c   |  30 +-
 .../wireless/realtek/rtlwifi/rtl8192de/trx.c  |  20 +-
 .../wireless/realtek/rtlwifi/rtl8192ee/dm.c   |  66 +-
 .../wireless/realtek/rtlwifi/rtl8192ee/fw.c   | 102 +--
 .../wireless/realtek/rtlwifi/rtl8192ee/hw.c   | 208 ++---
 .../wireless/realtek/rtlwifi/rtl8192ee/led.c  |  18 +-
 .../wireless/realtek/rtlwifi/rtl8192ee/phy.c  | 357 ++++----
 .../wireless/realtek/rtlwifi/rtl8192ee/rf.c   |   6 +-
 .../wireless/realtek/rtlwifi/rtl8192ee/trx.c  |  32 +-
 .../wireless/realtek/rtlwifi/rtl8192se/dm.c   |  42 +-
 .../wireless/realtek/rtlwifi/rtl8192se/fw.c   |  40 +-
 .../wireless/realtek/rtlwifi/rtl8192se/hw.c   | 158 ++--
 .../wireless/realtek/rtlwifi/rtl8192se/led.c  |  10 +-
 .../wireless/realtek/rtlwifi/rtl8192se/phy.c  | 215 +++--
 .../wireless/realtek/rtlwifi/rtl8192se/rf.c   |  70 +-
 .../wireless/realtek/rtlwifi/rtl8192se/sw.c   |   4 +-
 .../wireless/realtek/rtlwifi/rtl8192se/trx.c  |  10 +-
 .../wireless/realtek/rtlwifi/rtl8723ae/dm.c   | 162 ++--
 .../wireless/realtek/rtlwifi/rtl8723ae/fw.c   |  64 +-
 .../rtlwifi/rtl8723ae/hal_bt_coexist.c        | 151 ++--
 .../realtek/rtlwifi/rtl8723ae/hal_btc.c       | 654 +++++++-------
 .../wireless/realtek/rtlwifi/rtl8723ae/hw.c   | 234 ++---
 .../wireless/realtek/rtlwifi/rtl8723ae/led.c  |  12 +-
 .../wireless/realtek/rtlwifi/rtl8723ae/phy.c  | 344 ++++----
 .../wireless/realtek/rtlwifi/rtl8723ae/rf.c   |   6 +-
 .../wireless/realtek/rtlwifi/rtl8723ae/trx.c  |  14 +-
 .../wireless/realtek/rtlwifi/rtl8723be/dm.c   | 119 ++-
 .../wireless/realtek/rtlwifi/rtl8723be/fw.c   |  66 +-
 .../wireless/realtek/rtlwifi/rtl8723be/hw.c   | 202 ++---
 .../wireless/realtek/rtlwifi/rtl8723be/led.c  |  10 +-
 .../wireless/realtek/rtlwifi/rtl8723be/phy.c  | 309 ++++---
 .../wireless/realtek/rtlwifi/rtl8723be/rf.c   |   6 +-
 .../wireless/realtek/rtlwifi/rtl8723be/trx.c  |  24 +-
 .../realtek/rtlwifi/rtl8723com/fw_common.c    |  22 +-
 .../realtek/rtlwifi/rtl8723com/phy_common.c   |  36 +-
 .../wireless/realtek/rtlwifi/rtl8821ae/dm.c   | 823 +++++++++---------
 .../wireless/realtek/rtlwifi/rtl8821ae/fw.c   | 134 +--
 .../wireless/realtek/rtlwifi/rtl8821ae/hw.c   | 466 +++++-----
 .../wireless/realtek/rtlwifi/rtl8821ae/led.c  |  32 +-
 .../wireless/realtek/rtlwifi/rtl8821ae/phy.c  | 538 ++++++------
 .../wireless/realtek/rtlwifi/rtl8821ae/rf.c   |   6 +-
 .../wireless/realtek/rtlwifi/rtl8821ae/trx.c  |  58 +-
 drivers/net/wireless/realtek/rtlwifi/usb.c    |  18 +-
 87 files changed, 6766 insertions(+), 6811 deletions(-)

-- 
2.26.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 2/6] rtlwifi: Remove unnecessary parenthese in rtl_dbg uses
  2020-07-25 19:55 [PATCH 0/6] rtlwifi: Convert RT_TRACE to rtl_dbg and neatening Joe Perches
@ 2020-07-25 19:55 ` Joe Perches
  2020-07-27  6:07   ` Pkshih
  2020-07-25 19:55 ` [PATCH 3/6] rtlwifi: Better spacing around " Joe Perches
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Joe Perches @ 2020-07-25 19:55 UTC (permalink / raw)
  To: Ping-Ke Shih, Larry Finger
  Cc: Kalle Valo, David S. Miller, Jakub Kicinski, linux-wireless,
	netdev, linux-kernel

Make these statements a little simpler.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/realtek/rtlwifi/base.c   | 14 +++++------
 .../rtlwifi/btcoexist/halbtc8192e2ant.c       | 23 ++++++++++---------
 .../rtlwifi/btcoexist/halbtc8821a2ant.c       | 12 +++++-----
 .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c  |  9 ++++----
 drivers/net/wireless/realtek/rtlwifi/pci.c    |  2 +-
 5 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c
index 270aea0f841b..b8d184950dac 100644
--- a/drivers/net/wireless/realtek/rtlwifi/base.c
+++ b/drivers/net/wireless/realtek/rtlwifi/base.c
@@ -1385,7 +1385,7 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
 			if (mac->act_scanning)
 				return false;
 
-			rtl_dbg(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
+			rtl_dbg(rtlpriv, COMP_SEND | COMP_RECV, DBG_DMESG,
 				"%s ACT_ADDBAREQ From :%pM\n",
 				is_tx ? "Tx" : "Rx", hdr->addr2);
 			RT_PRINT_DATA(rtlpriv, COMP_INIT, DBG_DMESG, "req\n",
@@ -1428,12 +1428,12 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
 			}
 			break;
 		case ACT_ADDBARSP:
-			rtl_dbg(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
+			rtl_dbg(rtlpriv, COMP_SEND | COMP_RECV, DBG_DMESG,
 				"%s ACT_ADDBARSP From :%pM\n",
 				is_tx ? "Tx" : "Rx", hdr->addr2);
 			break;
 		case ACT_DELBA:
-			rtl_dbg(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
+			rtl_dbg(rtlpriv, COMP_SEND | COMP_RECV, DBG_DMESG,
 				"ACT_ADDBADEL From :%pM\n", hdr->addr2);
 			break;
 		}
@@ -1519,9 +1519,9 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx,
 				/* 68 : UDP BOOTP client
 				 * 67 : UDP BOOTP server
 				 */
-				rtl_dbg(rtlpriv, (COMP_SEND | COMP_RECV),
+				rtl_dbg(rtlpriv, COMP_SEND | COMP_RECV,
 					DBG_DMESG, "dhcp %s !!\n",
-					(is_tx) ? "Tx" : "Rx");
+					is_tx ? "Tx" : "Rx");
 
 				if (is_tx)
 					setup_special_tx(rtlpriv, ppsc,
@@ -1540,8 +1540,8 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx,
 		rtlpriv->btcoexist.btc_info.in_4way = true;
 		rtlpriv->btcoexist.btc_info.in_4way_ts = jiffies;
 
-		rtl_dbg(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
-			"802.1X %s EAPOL pkt!!\n", (is_tx) ? "Tx" : "Rx");
+		rtl_dbg(rtlpriv, COMP_SEND | COMP_RECV, DBG_DMESG,
+			"802.1X %s EAPOL pkt!!\n", is_tx ? "Tx" : "Rx");
 
 		if (is_tx) {
 			rtlpriv->ra.is_special_data = true;
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8192e2ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8192e2ant.c
index 4989fd3bae15..30c782d61d70 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8192e2ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8192e2ant.c
@@ -801,8 +801,8 @@ static void btc8192e2ant_bt_auto_report(struct btc_coexist *btcoexist,
 
 	rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
 		"[BTCoex], %s BT Auto report = %s\n",
-		(force_exec ? "force to" : ""),
-		((enable_auto_report) ? "Enabled" : "Disabled"));
+		force_exec ? "force to" : "",
+		enable_auto_report ? "Enabled" : "Disabled");
 	coex_dm->cur_bt_auto_report = enable_auto_report;
 
 	if (!force_exec) {
@@ -878,9 +878,9 @@ static void btc8192e2ant_rf_shrink(struct btc_coexist *btcoexist,
 	struct rtl_priv *rtlpriv = btcoexist->adapter;
 
 	rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
-		"[BTCoex], %s turn Rx RF Shrink = %s\n",
-		(force_exec ? "force to" : ""),
-		((rx_rf_shrink_on) ? "ON" : "OFF"));
+		"[BTCoex], %sturn Rx RF Shrink = %s\n",
+		force_exec ? "force to " : "",
+		rx_rf_shrink_on ? "ON" : "OFF");
 	coex_dm->cur_rf_rx_lpf_shrink = rx_rf_shrink_on;
 
 	if (!force_exec) {
@@ -927,9 +927,10 @@ static void btc8192e2ant_dac_swing(struct btc_coexist *btcoexist,
 	struct rtl_priv *rtlpriv = btcoexist->adapter;
 
 	rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
-		"[BTCoex], %s turn DacSwing=%s, dac_swing_lvl = 0x%x\n",
-		(force_exec ? "force to" : ""),
-		((dac_swing_on) ? "ON" : "OFF"), dac_swing_lvl);
+		"[BTCoex], %sturn DacSwing=%s, dac_swing_lvl = 0x%x\n",
+		force_exec ? "force to " : "",
+		dac_swing_on ? "ON" : "OFF",
+		dac_swing_lvl);
 	coex_dm->cur_dac_swing_on = dac_swing_on;
 	coex_dm->cur_dac_swing_lvl = dac_swing_lvl;
 
@@ -987,9 +988,9 @@ static void btc8192e2ant_agc_table(struct btc_coexist *btcoexist,
 	struct rtl_priv *rtlpriv = btcoexist->adapter;
 
 	rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
-		"[BTCoex], %s %s Agc Table\n",
-		(force_exec ? "force to" : ""),
-		((agc_table_en) ? "Enable" : "Disable"));
+		"[BTCoex], %s%s Agc Table\n",
+		force_exec ? "force to " : "",
+		agc_table_en ? "Enable" : "Disable");
 	coex_dm->cur_agc_table_en = agc_table_en;
 
 	if (!force_exec) {
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c
index d2f4287da9a5..43bd52a62c4f 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c
@@ -732,9 +732,9 @@ static void btc8821a2ant_low_penalty_ra(struct btc_coexist *btcoexist,
 	struct rtl_priv *rtlpriv = btcoexist->adapter;
 
 	rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
-		"[BTCoex], %s turn LowPenaltyRA = %s\n",
-		(force_exec ? "force to" : ""),
-		((low_penalty_ra) ? "ON" : "OFF"));
+		"[BTCoex], %sturn LowPenaltyRA = %s\n",
+		force_exec ? "force to " : "",
+		low_penalty_ra ? "ON" : "OFF");
 	coex_dm->cur_low_penalty_ra = low_penalty_ra;
 
 	if (!force_exec) {
@@ -780,9 +780,9 @@ static void btc8821a2ant_dac_swing(struct btc_coexist *btcoexist,
 	struct rtl_priv *rtlpriv = btcoexist->adapter;
 
 	rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
-		"[BTCoex], %s turn DacSwing = %s, dac_swing_lvl = 0x%x\n",
-		(force_exec ? "force to" : ""),
-		((dac_swing_on) ? "ON" : "OFF"),
+		"[BTCoex], %sturn DacSwing = %s, dac_swing_lvl = 0x%x\n",
+		force_exec ? "force to " : "",
+		dac_swing_on ? "ON" : "OFF",
 		dac_swing_lvl);
 	coex_dm->cur_dac_swing_on = dac_swing_on;
 	coex_dm->cur_dac_swing_lvl = dac_swing_lvl;
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
index 8d28c68f083e..f9a2d8a6730c 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
@@ -874,11 +874,10 @@ static void halbtc_display_wifi_status(struct btc_coexist *btcoexist,
 	seq_printf(m, "\n %-35s = %s / %s/ %s/ AP=%d ",
 		   "Wifi freq/ bw/ traffic",
 		   gl_btc_wifi_freq_string[wifi_freq],
-		   ((wifi_under_b_mode) ? "11b" :
-		    gl_btc_wifi_bw_string[wifi_bw]),
-		   ((!wifi_busy) ? "idle" : ((BTC_WIFI_TRAFFIC_TX ==
-					      wifi_traffic_dir) ? "uplink" :
-					     "downlink")),
+		   wifi_under_b_mode ? "11b" : gl_btc_wifi_bw_string[wifi_bw],
+		   (!wifi_busy ? "idle" :
+		    wifi_traffic_dir == BTC_WIFI_TRAFFIC_TX ? "uplink" :
+		    "downlink"),
 		   ap_num);
 
 	/* power status	 */
diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c
index 1d0af72ee780..3189d1c50d52 100644
--- a/drivers/net/wireless/realtek/rtlwifi/pci.c
+++ b/drivers/net/wireless/realtek/rtlwifi/pci.c
@@ -557,7 +557,7 @@ static void _rtl_pci_tx_isr(struct ieee80211_hw *hw, int prio)
 		if (rtlpriv->rtlhal.earlymode_enable)
 			skb_pull(skb, EM_HDR_LEN);
 
-		rtl_dbg(rtlpriv, (COMP_INTR | COMP_SEND), DBG_TRACE,
+		rtl_dbg(rtlpriv, COMP_INTR | COMP_SEND, DBG_TRACE,
 			"new ring->idx:%d, free: skb_queue_len:%d, free: seq:%x\n",
 			ring->idx,
 			skb_queue_len(&ring->queue),
-- 
2.26.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 3/6] rtlwifi: Better spacing around rtl_dbg uses
  2020-07-25 19:55 [PATCH 0/6] rtlwifi: Convert RT_TRACE to rtl_dbg and neatening Joe Perches
  2020-07-25 19:55 ` [PATCH 2/6] rtlwifi: Remove unnecessary parenthese in rtl_dbg uses Joe Perches
@ 2020-07-25 19:55 ` Joe Perches
  2020-07-25 19:55 ` [PATCH 4/6] rtlwifi: Convert rtl_dbg embedded function names to %s: ..., __func__ Joe Perches
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Joe Perches @ 2020-07-25 19:55 UTC (permalink / raw)
  To: Ping-Ke Shih, Larry Finger
  Cc: Kalle Valo, David S. Miller, Jakub Kicinski, linux-wireless,
	netdev, linux-kernel

Use a more typical kernel style for rtl_dbg uses.

Miscellanea:

o Remove unnecessary braces and unindent a case statement
o Realign or'd values and add parentheses

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/realtek/rtlwifi/ps.c     |  4 +-
 .../wireless/realtek/rtlwifi/rtl8188ee/hw.c   |  2 +-
 .../wireless/realtek/rtlwifi/rtl8192cu/hw.c   |  2 +-
 .../wireless/realtek/rtlwifi/rtl8192ee/fw.c   | 36 +++++++--------
 .../wireless/realtek/rtlwifi/rtl8192ee/phy.c  | 10 ++---
 .../rtlwifi/rtl8723ae/hal_bt_coexist.c        |  6 ++-
 .../realtek/rtlwifi/rtl8723ae/hal_btc.c       |  6 ++-
 .../wireless/realtek/rtlwifi/rtl8821ae/dm.c   |  2 +-
 .../wireless/realtek/rtlwifi/rtl8821ae/hw.c   |  2 +-
 .../wireless/realtek/rtlwifi/rtl8821ae/phy.c  | 44 +++++++++----------
 10 files changed, 59 insertions(+), 55 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/ps.c b/drivers/net/wireless/realtek/rtlwifi/ps.c
index 949fe8278cae..38442a36f599 100644
--- a/drivers/net/wireless/realtek/rtlwifi/ps.c
+++ b/drivers/net/wireless/realtek/rtlwifi/ps.c
@@ -901,7 +901,7 @@ void rtl_p2p_ps_cmd(struct ieee80211_hw *hw , u8 p2p_ps_state)
 	struct rtl_ps_ctl *rtlps = rtl_psc(rtl_priv(hw));
 	struct rtl_p2p_ps_info  *p2pinfo = &(rtlpriv->psc.p2p_ps_info);
 
-	rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD, " p2p state %x\n" , p2p_ps_state);
+	rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD, " p2p state %x\n", p2p_ps_state);
 	switch (p2p_ps_state) {
 	case P2P_PS_DISABLE:
 		p2pinfo->p2p_ps_state = p2p_ps_state;
@@ -955,7 +955,7 @@ void rtl_p2p_ps_cmd(struct ieee80211_hw *hw , u8 p2p_ps_state)
 	}
 	rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD,
 		"ctwindow %x oppps %x\n",
-		p2pinfo->ctwindow , p2pinfo->opp_ps);
+		p2pinfo->ctwindow, p2pinfo->opp_ps);
 	rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD,
 		"count %x duration %x index %x interval %x start time %x noa num %x\n",
 		p2pinfo->noa_count_type[0],
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c
index 8433b54159ff..2a751801e35f 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c
@@ -1561,7 +1561,7 @@ static void read_power_value_fromprom(struct ieee80211_hw *hw,
 
 	rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
 		"hal_ReadPowerValueFromPROM88E():PROMContent[0x%x]=0x%x\n",
-		(eeaddr+1), hwinfo[eeaddr+1]);
+		eeaddr + 1, hwinfo[eeaddr + 1]);
 	if (0xFF == hwinfo[eeaddr+1])  /*YJ,add,120316*/
 		autoload_fail = true;
 
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c
index f2a9cbbc31ed..ff88c09be601 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c
@@ -1438,7 +1438,7 @@ void rtl92cu_set_beacon_related_registers(struct ieee80211_hw *hw)
 	rtl_write_dword(rtlpriv, REG_TCR, value32);
 	value32 |= TSFRST;
 	rtl_write_dword(rtlpriv, REG_TCR, value32);
-	rtl_dbg(rtlpriv, COMP_INIT|COMP_BEACON, DBG_LOUD,
+	rtl_dbg(rtlpriv, COMP_INIT | COMP_BEACON, DBG_LOUD,
 		"SetBeaconRelatedRegisters8192CUsb(): Set TCR(%x)\n",
 		value32);
 	/* TODO: Modify later (Find the right parameters)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c
index 31677e563b03..88b7a715f4c5 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c
@@ -36,7 +36,7 @@ static void _rtl92ee_write_fw(struct ieee80211_hw *hw,
 	u32 pagenums, remainsize;
 	u32 page, offset;
 
-	rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD , "FW size is %d bytes,\n", size);
+	rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD, "FW size is %d bytes,\n", size);
 
 	rtl_fill_dummy(bufferptr, &size);
 
@@ -119,7 +119,7 @@ int rtl92ee_download_fw(struct ieee80211_hw *hw, bool buse_wake_on_wlan_fw)
 	pfwdata = (u8 *)rtlhal->pfirmware;
 	fwsize = rtlhal->fwsize;
 	rtl_dbg(rtlpriv, COMP_FW, DBG_DMESG,
-		"normal Firmware SIZE %d\n" , fwsize);
+		"normal Firmware SIZE %d\n", fwsize);
 
 	if (IS_FW_HEADER_EXIST(pfwheader)) {
 		rtl_dbg(rtlpriv, COMP_FW, DBG_DMESG,
@@ -180,12 +180,12 @@ static void _rtl92ee_fill_h2c_command(struct ieee80211_hw *hw, u8 element_id,
 
 	if (ppsc->dot11_psmode != EACTIVE ||
 	    ppsc->inactive_pwrstate == ERFOFF) {
-		rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD ,
+		rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
 			"FillH2CCommand8192E(): Return because RF is off!!!\n");
 		return;
 	}
 
-	rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD , "come in\n");
+	rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD, "come in\n");
 
 	/* 1. Prevent race condition in setting H2C cmd.
 	 * (copy from MgntActSet_RF_State().)
@@ -193,7 +193,7 @@ static void _rtl92ee_fill_h2c_command(struct ieee80211_hw *hw, u8 element_id,
 	while (true) {
 		spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag);
 		if (rtlhal->h2c_setinprogress) {
-			rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD ,
+			rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
 				"H2C set in progress! Wait to set..element_id(%d).\n",
 				element_id);
 
@@ -201,7 +201,7 @@ static void _rtl92ee_fill_h2c_command(struct ieee80211_hw *hw, u8 element_id,
 				spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock,
 						       flag);
 				h2c_waitcounter++;
-				rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD ,
+				rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
 					"Wait 100 us (%d times)...\n",
 					h2c_waitcounter);
 				udelay(100);
@@ -263,7 +263,7 @@ static void _rtl92ee_fill_h2c_command(struct ieee80211_hw *hw, u8 element_id,
 			while (!isfw_read) {
 				wait_h2c_limmit--;
 				if (wait_h2c_limmit == 0) {
-					rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD ,
+					rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
 						"Waiting too long for FW read clear HMEBox(%d)!!!\n",
 						boxnum);
 					break;
@@ -272,7 +272,7 @@ static void _rtl92ee_fill_h2c_command(struct ieee80211_hw *hw, u8 element_id,
 				isfw_read =
 				  _rtl92ee_check_fw_read_last_h2c(hw, boxnum);
 				u1b_tmp = rtl_read_byte(rtlpriv, 0x130);
-				rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD ,
+				rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
 					"Waiting for FW read clear HMEBox(%d)!!! 0x130 = %2x\n",
 					boxnum, u1b_tmp);
 			}
@@ -282,7 +282,7 @@ static void _rtl92ee_fill_h2c_command(struct ieee80211_hw *hw, u8 element_id,
 		 * H2C cmd, break and give up this H2C.
 		 */
 		if (!isfw_read) {
-			rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD ,
+			rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
 				"Write H2C reg BOX[%d] fail,Fw don't read.\n",
 				boxnum);
 			break;
@@ -291,7 +291,7 @@ static void _rtl92ee_fill_h2c_command(struct ieee80211_hw *hw, u8 element_id,
 		memset(boxcontent, 0, sizeof(boxcontent));
 		memset(boxextcontent, 0, sizeof(boxextcontent));
 		boxcontent[0] = element_id;
-		rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD ,
+		rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
 			"Write element_id box_reg(%4x) = %2x\n",
 			box_reg, element_id);
 
@@ -340,7 +340,7 @@ static void _rtl92ee_fill_h2c_command(struct ieee80211_hw *hw, u8 element_id,
 		if (rtlhal->last_hmeboxnum == 4)
 			rtlhal->last_hmeboxnum = 0;
 
-		rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD ,
+		rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
 			"pHalData->last_hmeboxnum  = %d\n",
 			rtlhal->last_hmeboxnum);
 	}
@@ -349,7 +349,7 @@ static void _rtl92ee_fill_h2c_command(struct ieee80211_hw *hw, u8 element_id,
 	rtlhal->h2c_setinprogress = false;
 	spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag);
 
-	rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD , "go out\n");
+	rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD, "go out\n");
 }
 
 void rtl92ee_fill_h2c_cmd(struct ieee80211_hw *hw,
@@ -388,7 +388,7 @@ void rtl92ee_firmware_selfreset(struct ieee80211_hw *hw)
 	u1b_tmp = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1);
 	rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN + 1, (u1b_tmp | BIT(2)));
 
-	rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD ,
+	rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
 		"  _8051Reset92E(): 8051 reset success .\n");
 }
 
@@ -750,7 +750,7 @@ void rtl92ee_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool b_dl_finished)
 		b_dlok = true;
 
 	if (b_dlok) {
-		rtl_dbg(rtlpriv, COMP_POWER, DBG_LOUD ,
+		rtl_dbg(rtlpriv, COMP_POWER, DBG_LOUD,
 			"Set RSVD page location to Fw.\n");
 		RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_LOUD ,
 			      "H2C_RSVDPAGE:\n", u1rsvdpageloc, 3);
@@ -783,11 +783,11 @@ void rtl92ee_set_p2p_ps_offload_cmd(struct ieee80211_hw *hw, u8 p2p_ps_state)
 
 	switch (p2p_ps_state) {
 	case P2P_PS_DISABLE:
-		rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD , "P2P_PS_DISABLE\n");
+		rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD, "P2P_PS_DISABLE\n");
 		memset(p2p_ps_offload, 0, sizeof(*p2p_ps_offload));
 		break;
 	case P2P_PS_ENABLE:
-		rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD , "P2P_PS_ENABLE\n");
+		rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD, "P2P_PS_ENABLE\n");
 		/* update CTWindow value. */
 		if (p2pinfo->ctwindow > 0) {
 			p2p_ps_offload->ctwindow_en = 1;
@@ -838,11 +838,11 @@ void rtl92ee_set_p2p_ps_offload_cmd(struct ieee80211_hw *hw, u8 p2p_ps_state)
 		}
 		break;
 	case P2P_PS_SCAN:
-		rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD , "P2P_PS_SCAN\n");
+		rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD, "P2P_PS_SCAN\n");
 		p2p_ps_offload->discovery = 1;
 		break;
 	case P2P_PS_SCAN_DONE:
-		rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD , "P2P_PS_SCAN_DONE\n");
+		rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD, "P2P_PS_SCAN_DONE\n");
 		p2p_ps_offload->discovery = 0;
 		p2pinfo->p2p_ps_state = P2P_PS_ENABLE;
 		break;
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
index e1b4755a7ea9..469dbdba57ef 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
@@ -663,7 +663,7 @@ static bool _rtl92ee_phy_config_mac_with_headerfile(struct ieee80211_hw *hw)
 	arraylength = RTL8192EE_MAC_ARRAY_LEN;
 	ptrarray = RTL8192EE_MAC_ARRAY;
 	rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
-		"Img:RTL8192EE_MAC_ARRAY LEN %d\n" , arraylength);
+		"Img:RTL8192EE_MAC_ARRAY LEN %d\n", arraylength);
 	for (i = 0; i < arraylength; i = i + 2)
 		rtl_write_byte(rtlpriv, ptrarray[i], (u8)ptrarray[i + 1]);
 	return true;
@@ -915,7 +915,7 @@ bool rtl92ee_phy_config_rf_with_headerfile(struct ieee80211_hw  *hw,
 		len = RTL8192EE_RADIOA_ARRAY_LEN;
 		array = RTL8192EE_RADIOA_ARRAY;
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
-			"Radio_A:RTL8192EE_RADIOA_ARRAY %d\n" , len);
+			"Radio_A:RTL8192EE_RADIOA_ARRAY %d\n", len);
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "Radio No %x\n", rfpath);
 		for (i = 0; i < len; i = i + 2) {
 			v1 = array[i];
@@ -962,7 +962,7 @@ bool rtl92ee_phy_config_rf_with_headerfile(struct ieee80211_hw  *hw,
 		len = RTL8192EE_RADIOB_ARRAY_LEN;
 		array = RTL8192EE_RADIOB_ARRAY;
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
-			"Radio_A:RTL8192EE_RADIOB_ARRAY %d\n" , len);
+			"Radio_A:RTL8192EE_RADIOB_ARRAY %d\n", len);
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "Radio No %x\n", rfpath);
 		for (i = 0; i < len; i = i + 2) {
 			v1 = array[i];
@@ -2724,7 +2724,7 @@ static void _rtl92ee_phy_set_rfpath_switch(struct ieee80211_hw *hw,
 	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
 	struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
 
-	rtl_dbg(rtlpriv, COMP_INIT , DBG_LOUD , "\n");
+	rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "\n");
 
 	if (is_hal_stop(rtlhal)) {
 		u8 u1btmp;
@@ -2998,7 +2998,7 @@ static void rtl92ee_phy_set_io(struct ieee80211_hw *hw)
 	case IO_CMD_RESUME_DM_BY_SCAN:
 		rtl92ee_dm_write_dig(hw, rtlphy->initgain_backup.xaagccore1);
 		rtl92ee_dm_write_cck_cca_thres(hw, rtlphy->initgain_backup.cca);
-		rtl_dbg(rtlpriv, COMP_CMD, DBG_TRACE , "no set txpower\n");
+		rtl_dbg(rtlpriv, COMP_CMD, DBG_TRACE, "no set txpower\n");
 		rtl92ee_phy_set_txpower_level(hw, rtlphy->current_channel);
 		break;
 	case IO_CMD_PAUSE_BAND0_DM_BY_SCAN:
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_bt_coexist.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_bt_coexist.c
index 4459c7f82f06..bfa736138034 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_bt_coexist.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_bt_coexist.c
@@ -369,8 +369,10 @@ void rtl8723e_dm_bt_balance(struct ieee80211_hw *hw,
 
 	rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_TRACE,
 		"[DM][BT], Balance=[%s:%dms:%dms], write 0xc=0x%x\n",
-		balance_on ? "ON" : "OFF", ms0, ms1, h2c_parameter[0]<<16 |
-		h2c_parameter[1]<<8 | h2c_parameter[2]);
+		balance_on ? "ON" : "OFF", ms0, ms1,
+		(h2c_parameter[0] << 16 |
+		 h2c_parameter[1] << 8 |
+		 h2c_parameter[2]));
 
 	rtl8723e_fill_h2c_cmd(hw, 0xc, 3, h2c_parameter);
 }
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_btc.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_btc.c
index 3cc9dd29eac5..879fbe6ed4c3 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_btc.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_btc.c
@@ -70,7 +70,9 @@ void rtl_8723e_bt_wifi_media_status_notify(struct ieee80211_hw *hw,
 
 	rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_DMESG,
 		"[BTCoex], FW write 0x19=0x%x\n",
-		h2c_parameter[0]<<16|h2c_parameter[1]<<8|h2c_parameter[2]);
+		(h2c_parameter[0] << 16 |
+		 h2c_parameter[1] << 8 |
+		 h2c_parameter[2]));
 
 	rtl8723e_fill_h2c_cmd(hw, 0x19, 3, h2c_parameter);
 }
@@ -1704,7 +1706,7 @@ void rtl_8723e_c2h_command_handle(struct ieee80211_hw *hw)
 	c2h_event.cmd_seq = rtl_read_byte(rtlpriv, REG_C2HEVT_MSG_NORMAL + 1);
 	rtl_dbg(rtlpriv, COMP_FW, DBG_DMESG,
 		"cmd_id: %d, cmd_len: %d, cmd_seq: %d\n",
-		c2h_event.cmd_id , c2h_event.cmd_len, c2h_event.cmd_seq);
+		c2h_event.cmd_id, c2h_event.cmd_len, c2h_event.cmd_seq);
 	u1b_tmp = rtl_read_byte(rtlpriv, 0x01AF);
 	if (u1b_tmp == C2H_EVT_HOST_CLOSE) {
 		return;
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c
index 7351fd41366d..9f4a9f3c0f60 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c
@@ -1651,7 +1651,7 @@ void rtl8812ae_dm_txpower_tracking_callback_thermalmeter(
 				"[Path-%c] PowerIndexOffset(%d) =DeltaPowerIndex(%d) -DeltaPowerIndexLast(%d)\n",
 				(p == RF90_PATH_A ? 'A' : 'B'),
 				rtldm->power_index_offset[p],
-				rtldm->delta_power_index[p] ,
+				rtldm->delta_power_index[p],
 				rtldm->delta_power_index_last[p]);
 
 			rtldm->ofdm_index[p] =
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
index ff20d84daced..55f3e0f3b8f0 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
@@ -761,7 +761,7 @@ void rtl8821ae_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
 		u32	us_nav_upper = *(u32 *)val;
 
 		if (us_nav_upper > HAL_92C_NAV_UPPER_UNIT * 0xFF) {
-			rtl_dbg(rtlpriv, COMP_INIT , DBG_WARNING,
+			rtl_dbg(rtlpriv, COMP_INIT, DBG_WARNING,
 				"The setting value (0x%08X us) of NAV_UPPER is larger than (%d * 0xFF)!!!\n",
 				us_nav_upper, HAL_92C_NAV_UPPER_UNIT);
 			break;
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
index 0aaf532375cd..1c6988d6d597 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
@@ -3722,7 +3722,7 @@ static void _rtl8821ae_iqk_rx_fill_iqc(struct ieee80211_hw *hw,
 		rtl_set_bbreg(hw, 0xc10, 0x03ff0000, rx_y>>1);
 		rtl_dbg(rtlpriv, COMP_IQK, DBG_LOUD,
 			"rx_x = %x;;rx_y = %x ====>fill to IQC\n",
-			rx_x>>1, rx_y>>1);
+			rx_x >> 1, rx_y >> 1);
 		rtl_dbg(rtlpriv, COMP_IQK, DBG_LOUD,
 			"0xc10 = %x ====>fill to IQC\n",
 			rtl_read_dword(rtlpriv, 0xc10));
@@ -4028,21 +4028,21 @@ static void _rtl8821ae_iqk_tx(struct ieee80211_hw *hw, enum radio_path path)
 						}
 						break;
 					case 2:
-						{
-							rtl_dbg(rtlpriv, COMP_IQK, DBG_LOUD,
-								"VDF_Y[1] = %x;;;VDF_Y[0] = %x\n",
-								vdf_y[1]>>21 & 0x00007ff, vdf_y[0]>>21 & 0x00007ff);
-							rtl_dbg(rtlpriv, COMP_IQK, DBG_LOUD,
-								"VDF_X[1] = %x;;;VDF_X[0] = %x\n",
-								vdf_x[1]>>21 & 0x00007ff, vdf_x[0]>>21 & 0x00007ff);
-							rx_dt[cal] = (vdf_y[1]>>20)-(vdf_y[0]>>20);
-							rtl_dbg(rtlpriv, COMP_IQK, DBG_LOUD, "Rx_dt = %d\n", rx_dt[cal]);
-							rx_dt[cal] = ((16*rx_dt[cal])*10000/13823);
-							rx_dt[cal] = (rx_dt[cal] >> 1)+(rx_dt[cal] & BIT(0));
-							rtl_write_dword(rtlpriv, 0xc80, 0x18008c20);/* TX_TONE_idx[9:0], TxK_Mask[29] TX_Tone = 16 */
-							rtl_write_dword(rtlpriv, 0xc84, 0x38008c20);/* RX_TONE_idx[9:0], RxK_Mask[29] */
-							rtl_set_bbreg(hw, 0xce8, 0x00003fff, rx_dt[cal] & 0x00003fff);
-						}
+						rtl_dbg(rtlpriv, COMP_IQK, DBG_LOUD,
+							"VDF_Y[1] = %x;;;VDF_Y[0] = %x\n",
+							vdf_y[1] >> 21 & 0x00007ff,
+							vdf_y[0] >> 21 & 0x00007ff);
+						rtl_dbg(rtlpriv, COMP_IQK, DBG_LOUD,
+							"VDF_X[1] = %x;;;VDF_X[0] = %x\n",
+							vdf_x[1] >> 21 & 0x00007ff,
+							vdf_x[0] >> 21 & 0x00007ff);
+						rx_dt[cal] = (vdf_y[1] >> 20) - (vdf_y[0] >> 20);
+						rtl_dbg(rtlpriv, COMP_IQK, DBG_LOUD, "Rx_dt = %d\n", rx_dt[cal]);
+						rx_dt[cal] = ((16 * rx_dt[cal]) * 10000 / 13823);
+						rx_dt[cal] = (rx_dt[cal] >> 1) + (rx_dt[cal] & BIT(0));
+						rtl_write_dword(rtlpriv, 0xc80, 0x18008c20);/* TX_TONE_idx[9:0], TxK_Mask[29] TX_Tone = 16 */
+						rtl_write_dword(rtlpriv, 0xc84, 0x38008c20);/* RX_TONE_idx[9:0], RxK_Mask[29] */
+						rtl_set_bbreg(hw, 0xce8, 0x00003fff, rx_dt[cal] & 0x00003fff);
 						break;
 					default:
 						break;
@@ -4359,13 +4359,13 @@ static void _rtl8821ae_iqk_tx(struct ieee80211_hw *hw, enum radio_path path)
 
 		for (i = 0; i < tx_average; i++) {
 			rtl_dbg(rtlpriv, COMP_IQK, DBG_LOUD,
-				"TX_X0_RXK[%d] = %x ;; TX_Y0_RXK[%d] = %x\n", i,
-				(tx_x0_rxk[i])>>21&0x000007ff, i,
-				(tx_y0_rxk[i])>>21&0x000007ff);
+				"TX_X0_RXK[%d] = %x ;; TX_Y0_RXK[%d] = %x\n",
+				i, (tx_x0_rxk[i]) >> 21 & 0x000007ff,
+				i, (tx_y0_rxk[i]) >> 21 & 0x000007ff);
 			rtl_dbg(rtlpriv, COMP_IQK, DBG_LOUD,
-				"TX_X0[%d] = %x ;; TX_Y0[%d] = %x\n", i,
-				(tx_x0[i])>>21&0x000007ff, i,
-				(tx_y0[i])>>21&0x000007ff);
+				"TX_X0[%d] = %x ;; TX_Y0[%d] = %x\n",
+				i, (tx_x0[i]) >> 21 & 0x000007ff,
+				i, (tx_y0[i]) >> 21 & 0x000007ff);
 		}
 		for (i = 0; i < tx_average; i++) {
 			for (ii = i+1; ii < tx_average; ii++) {
-- 
2.26.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 4/6] rtlwifi: Convert rtl_dbg embedded function names to %s: ..., __func__
  2020-07-25 19:55 [PATCH 0/6] rtlwifi: Convert RT_TRACE to rtl_dbg and neatening Joe Perches
  2020-07-25 19:55 ` [PATCH 2/6] rtlwifi: Remove unnecessary parenthese in rtl_dbg uses Joe Perches
  2020-07-25 19:55 ` [PATCH 3/6] rtlwifi: Better spacing around " Joe Perches
@ 2020-07-25 19:55 ` Joe Perches
  2020-07-25 19:55 ` [PATCH 5/6] rtlwifi: Avoid multiline dereferences in rtl_dbg uses Joe Perches
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Joe Perches @ 2020-07-25 19:55 UTC (permalink / raw)
  To: Ping-Ke Shih, Larry Finger
  Cc: Kalle Valo, David S. Miller, Jakub Kicinski, linux-wireless,
	netdev, linux-kernel

Use a more typical kernel style for embedded function names in
debug logging statements.

Signed-off-by: Joe Perches <joe@perches.com>
---
 .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c       |  3 +--
 drivers/net/wireless/realtek/rtlwifi/cam.c         | 14 ++++++--------
 drivers/net/wireless/realtek/rtlwifi/core.c        |  7 ++++---
 drivers/net/wireless/realtek/rtlwifi/efuse.c       |  8 ++++----
 .../net/wireless/realtek/rtlwifi/rtl8188ee/dm.c    |  3 +--
 .../wireless/realtek/rtlwifi/rtl8192c/dm_common.c  |  3 +--
 .../net/wireless/realtek/rtlwifi/rtl8192ee/phy.c   |  3 +--
 .../net/wireless/realtek/rtlwifi/rtl8723ae/dm.c    |  2 +-
 .../realtek/rtlwifi/rtl8723ae/hal_bt_coexist.c     | 11 +++++------
 .../net/wireless/realtek/rtlwifi/rtl8723be/dm.c    |  3 +--
 .../net/wireless/realtek/rtlwifi/rtl8723be/phy.c   |  3 +--
 .../net/wireless/realtek/rtlwifi/rtl8821ae/dm.c    | 11 ++++-------
 .../net/wireless/realtek/rtlwifi/rtl8821ae/hw.c    |  4 ++--
 .../net/wireless/realtek/rtlwifi/rtl8821ae/phy.c   | 11 ++++-------
 .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.c   | 10 ++++++----
 15 files changed, 42 insertions(+), 54 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
index f9a2d8a6730c..5f8baf78589b 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
@@ -129,8 +129,7 @@ static u8 halbtc_get_wifi_central_chnl(struct btc_coexist *btcoexist)
 
 	if (rtlphy->current_channel != 0)
 		chnl = rtlphy->current_channel;
-	rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
-		"static halbtc_get_wifi_central_chnl:%d\n", chnl);
+	rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, "%s:%d\n", __func__, chnl);
 	return chnl;
 }
 
diff --git a/drivers/net/wireless/realtek/rtlwifi/cam.c b/drivers/net/wireless/realtek/rtlwifi/cam.c
index fb321b34a592..7aa28da39409 100644
--- a/drivers/net/wireless/realtek/rtlwifi/cam.c
+++ b/drivers/net/wireless/realtek/rtlwifi/cam.c
@@ -142,9 +142,9 @@ int rtl_cam_delete_one_entry(struct ieee80211_hw *hw,
 	rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], ul_command);
 
 	rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
-		"rtl_cam_delete_one_entry(): WRITE A4: %x\n", 0);
+		"%s: WRITE A4: %x\n", __func__, 0);
 	rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
-		"rtl_cam_delete_one_entry(): WRITE A0: %x\n", ul_command);
+		"%s: WRITE A0: %x\n", __func__, ul_command);
 
 	return 0;
 
@@ -196,9 +196,9 @@ void rtl_cam_mark_invalid(struct ieee80211_hw *hw, u8 uc_index)
 	rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], ul_command);
 
 	rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
-		"rtl_cam_mark_invalid(): WRITE A4: %x\n", ul_content);
+		"%s: WRITE A4: %x\n", __func__, ul_content);
 	rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
-		"rtl_cam_mark_invalid(): WRITE A0: %x\n", ul_command);
+		"%s: WRITE A0: %x\n", __func__, ul_command);
 }
 EXPORT_SYMBOL(rtl_cam_mark_invalid);
 
@@ -246,11 +246,9 @@ void rtl_cam_empty_entry(struct ieee80211_hw *hw, u8 uc_index)
 		rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], ul_command);
 
 		rtl_dbg(rtlpriv, COMP_SEC, DBG_LOUD,
-			"rtl_cam_empty_entry(): WRITE A4: %x\n",
-			ul_content);
+			"%s: WRITE A4: %x\n", __func__, ul_content);
 		rtl_dbg(rtlpriv, COMP_SEC, DBG_LOUD,
-			"rtl_cam_empty_entry(): WRITE A0: %x\n",
-			ul_command);
+			"%s: WRITE A0: %x\n", __func__, ul_command);
 	}
 
 }
diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c
index 6ecbcd6222eb..f97a88408a9b 100644
--- a/drivers/net/wireless/realtek/rtlwifi/core.c
+++ b/drivers/net/wireless/realtek/rtlwifi/core.c
@@ -1766,7 +1766,8 @@ bool rtl_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version,
 	do {
 		cfg_cmd = pwrcfgcmd[ary_idx];
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
-			"rtl_hal_pwrseqcmdparsing(): offset(%#x),cut_msk(%#x), famsk(%#x), interface_msk(%#x), base(%#x), cmd(%#x), msk(%#x), value(%#x)\n",
+			"%s: offset(%#x),cut_msk(%#x), famsk(%#x), interface_msk(%#x), base(%#x), cmd(%#x), msk(%#x), value(%#x)\n",
+			__func__,
 			GET_PWR_CFG_OFFSET(cfg_cmd),
 			GET_PWR_CFG_CUT_MASK(cfg_cmd),
 			GET_PWR_CFG_FAB_MASK(cfg_cmd),
@@ -1819,7 +1820,7 @@ bool rtl_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version,
 				break;
 			case PWR_CMD_DELAY:
 				rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
-					"rtl_hal_pwrseqcmdparsing(): PWR_CMD_DELAY\n");
+					"%s: PWR_CMD_DELAY\n", __func__);
 				if (GET_PWR_CFG_VALUE(cfg_cmd) ==
 				    PWRSEQ_DELAY_US)
 					udelay(GET_PWR_CFG_OFFSET(cfg_cmd));
@@ -1828,7 +1829,7 @@ bool rtl_hal_pwrseqcmdparsing(struct rtl_priv *rtlpriv, u8 cut_version,
 				break;
 			case PWR_CMD_END:
 				rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
-					"rtl_hal_pwrseqcmdparsing(): PWR_CMD_END\n");
+					"%s: PWR_CMD_END\n", __func__);
 				return true;
 			default:
 				WARN_ONCE(true,
diff --git a/drivers/net/wireless/realtek/rtlwifi/efuse.c b/drivers/net/wireless/realtek/rtlwifi/efuse.c
index c7ee956ea92f..2e945554ed6d 100644
--- a/drivers/net/wireless/realtek/rtlwifi/efuse.c
+++ b/drivers/net/wireless/realtek/rtlwifi/efuse.c
@@ -212,8 +212,8 @@ void read_efuse(struct ieee80211_hw *hw, u16 _offset, u16 _size_byte, u8 *pbuf)
 
 	if ((_offset + _size_byte) > rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]) {
 		rtl_dbg(rtlpriv, COMP_EFUSE, DBG_LOUD,
-			"read_efuse(): Invalid offset(%#x) with read bytes(%#x)!!\n",
-			_offset, _size_byte);
+			"%s: Invalid offset(%#x) with read bytes(%#x)!!\n",
+			__func__, _offset, _size_byte);
 		return;
 	}
 
@@ -377,8 +377,8 @@ bool efuse_shadow_update_chk(struct ieee80211_hw *hw)
 		result = false;
 
 	rtl_dbg(rtlpriv, COMP_EFUSE, DBG_LOUD,
-		"efuse_shadow_update_chk(): totalbytes(%#x), hdr_num(%#x), words_need(%#x), efuse_used(%d)\n",
-		totalbytes, hdr_num, words_need, efuse_used);
+		"%s: totalbytes(%#x), hdr_num(%#x), words_need(%#x), efuse_used(%d)\n",
+		__func__, totalbytes, hdr_num, words_need, efuse_used);
 
 	return result;
 }
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c
index fc05563117ad..bf640b082bd1 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c
@@ -881,8 +881,7 @@ static void dm_txpower_track_cb_therm(struct ieee80211_hw *hw)
 
 	/*Initilization (7 steps in total) */
 	rtlpriv->dm.txpower_trackinginit = true;
-	rtl_dbg(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
-		"dm_txpower_track_cb_therm\n");
+	rtl_dbg(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, "%s\n", __func__);
 
 	thermalvalue = (u8)rtl_get_rfreg(hw, RF90_PATH_A, RF_T_METER,
 					 0xfc00);
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c
index 8c68a446b9e5..5d1a0307fc5d 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c
@@ -713,8 +713,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw
 	u8 ofdm_min_index = 6, rf;
 
 	rtlpriv->dm.txpower_trackinginit = true;
-	rtl_dbg(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
-		"rtl92c_dm_txpower_tracking_callback_thermalmeter\n");
+	rtl_dbg(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, "%s\n", __func__);
 
 	thermalvalue = (u8) rtl_get_rfreg(hw, RF90_PATH_A, RF_T_METER, 0x1f);
 
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
index 469dbdba57ef..6d1512cde593 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
@@ -606,8 +606,7 @@ static void phy_convert_txpwr_dbm_to_rel_val(struct ieee80211_hw *hw)
 			0, 3, base);
 	}
 
-	rtl_dbg(rtlpriv, COMP_POWER, DBG_TRACE,
-		"<==phy_convert_txpwr_dbm_to_rel_val()\n");
+	rtl_dbg(rtlpriv, COMP_POWER, DBG_TRACE, "<==%s\n", __func__);
 }
 
 static void _rtl92ee_phy_txpower_by_rate_configuration(struct ieee80211_hw *hw)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.c
index ac332811f46e..8ada31380efa 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.c
@@ -827,7 +827,7 @@ void rtl8723e_dm_bt_coexist(struct ieee80211_hw *hw)
 
 	if (!rtlpriv->btcoexist.init_set) {
 		rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
-			"[DM][BT], rtl8723e_dm_bt_coexist()\n");
+			"[DM][BT], %s\n", __func__);
 		rtl8723e_dm_init_bt_coexist(hw);
 	}
 
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_bt_coexist.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_bt_coexist.c
index bfa736138034..c1ae9c30be65 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_bt_coexist.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_bt_coexist.c
@@ -343,8 +343,7 @@ long rtl8723e_dm_bt_get_rx_ss(struct ieee80211_hw *hw)
 			= rtlpriv->dm.entry_min_undec_sm_pwdb;
 	}
 	rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_TRACE,
-		"rtl8723e_dm_bt_get_rx_ss() = %ld\n",
-		undecoratedsmoothed_pwdb);
+		"%s: %ld\n", __func__, undecoratedsmoothed_pwdb);
 
 	return undecoratedsmoothed_pwdb;
 }
@@ -461,13 +460,13 @@ void rtl8723e_dm_bt_sw_coex_all_off(struct ieee80211_hw *hw)
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 
 	rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_TRACE,
-		"rtl8723e_dm_bt_sw_coex_all_off()\n");
+		"%s\n", __func__);
 
 	if (rtlpriv->btcoexist.sw_coexist_all_off)
 		return;
 
 	rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_TRACE,
-		"rtl8723e_dm_bt_sw_coex_all_off(), real Do\n");
+		"%s: real Do\n", __func__);
 	rtl8723e_dm_bt_sw_coex_all_off_8723a(hw);
 	rtlpriv->btcoexist.sw_coexist_all_off = true;
 }
@@ -477,12 +476,12 @@ void rtl8723e_dm_bt_hw_coex_all_off(struct ieee80211_hw *hw)
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 
 	rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_TRACE,
-		"rtl8723e_dm_bt_hw_coex_all_off()\n");
+		"%s\n", __func__);
 
 	if (rtlpriv->btcoexist.hw_coexist_all_off)
 		return;
 	rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_TRACE,
-		"rtl8723e_dm_bt_hw_coex_all_off(), real Do\n");
+		"%s: real Do\n", __func__);
 
 	rtl8723e_dm_bt_hw_coex_all_off_8723a(hw);
 
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c
index a3fad0ff207f..ad6a366a7ed7 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c
@@ -747,8 +747,7 @@ static void rtl8723be_dm_txpower_tracking_callback_thermalmeter(
 
 	/*Initilization ( 7 steps in total )*/
 	rtlpriv->dm.txpower_trackinginit = true;
-	rtl_dbg(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
-		"rtl8723be_dm_txpower_tracking_callback_thermalmeter\n");
+	rtl_dbg(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, "%s\n", __func__);
 
 	thermalvalue = (u8)rtl_get_rfreg(hw,
 		RF90_PATH_A, RF_T_METER, 0xfc00);
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c
index d06f63ab36d9..b43574c44117 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c
@@ -477,8 +477,7 @@ static void _rtl8723be_phy_convert_txpower_dbm_to_relative_value(
 	    &rtlphy->tx_power_by_rate_offset[BAND_ON_2_4G][rfpath][RF_2TX][7],
 	    0, 3, base);
 
-	rtl_dbg(rtlpriv, COMP_POWER, DBG_TRACE,
-		"<===_rtl8723be_phy_convert_txpower_dbm_to_relative_value()\n");
+	rtl_dbg(rtlpriv, COMP_POWER, DBG_TRACE, "<===%s\n", __func__);
 }
 
 static void phy_txpower_by_rate_config(struct ieee80211_hw *hw)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c
index 9f4a9f3c0f60..a257cc21c18d 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c
@@ -1187,8 +1187,7 @@ void rtl8812ae_dm_txpwr_track_set_pwr(struct ieee80211_hw *hw,
 		tx_rate =
 			rtl8821ae_hw_rate_to_mrate(hw, rtldm->tx_rate);
 
-	rtl_dbg(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
-		"===>rtl8812ae_dm_txpwr_track_set_pwr\n");
+	rtl_dbg(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, "===>%s\n", __func__);
 	/*20130429 Mimic Modify High Rate BBSwing Limit.*/
 	if (tx_rate != 0xFF) {
 		/*CCK*/
@@ -1265,7 +1264,7 @@ void rtl8812ae_dm_txpwr_track_set_pwr(struct ieee80211_hw *hw,
 
 	if (method == BBSWING) {
 		rtl_dbg(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
-			"===>rtl8812ae_dm_txpwr_track_set_pwr\n");
+			"===>%s\n", __func__);
 
 		if (rf_path == RF90_PATH_A) {
 			u32 tmp;
@@ -1794,8 +1793,7 @@ void rtl8812ae_dm_txpower_tracking_callback_thermalmeter(
 	if (delta_iqk >= IQK_THRESHOLD)
 		rtl8812ae_do_iqk(hw, delta_iqk, thermal_value, 8);
 
-	rtl_dbg(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
-		"<===rtl8812ae_dm_txpower_tracking_callback_thermalmeter\n");
+	rtl_dbg(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, "<===%s\n", __func__);
 }
 
 static void rtl8821ae_get_delta_swing_table(struct ieee80211_hw *hw,
@@ -2492,8 +2490,7 @@ static void rtl8821ae_dm_check_edca_turbo(struct ieee80211_hw *hw)
 	bool b_bias_on_rx = false;
 	bool b_edca_turbo_on = false;
 
-	rtl_dbg(rtlpriv, COMP_TURBO, DBG_LOUD,
-		"rtl8821ae_dm_check_edca_turbo=====>\n");
+	rtl_dbg(rtlpriv, COMP_TURBO, DBG_LOUD, "%s=====>\n", __func__);
 	rtl_dbg(rtlpriv, COMP_TURBO, DBG_LOUD,
 		"Original BE PARAM: 0x%x\n",
 		rtl_read_dword(rtlpriv, DM_REG_EDCA_BE_11N));
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
index 55f3e0f3b8f0..929441c8d8c4 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
@@ -1987,7 +1987,7 @@ int rtl8821ae_hw_init(struct ieee80211_hw *hw)
 	rtl8821ae_dm_init(hw);
 	rtl8821ae_macid_initialize_mediastatus(hw);
 
-	rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "rtl8821ae_hw_init() <====\n");
+	rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "%s <====\n", __func__);
 	return err;
 }
 
@@ -2183,7 +2183,7 @@ int rtl8821ae_set_network_type(struct ieee80211_hw *hw, enum nl80211_iftype type
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 
-	rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "rtl8821ae_set_network_type!\n");
+	rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "%s!\n", __func__);
 
 	if (_rtl8821ae_set_media_status(hw, type))
 		return -EOPNOTSUPP;
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
index 1c6988d6d597..085d9e9c44ed 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
@@ -723,7 +723,7 @@ void rtl8821ae_phy_switch_wirelessband(struct ieee80211_hw *hw, u8 band)
 	}
 
 	rtl_dbg(rtlpriv, COMP_SCAN, DBG_TRACE,
-		"<==rtl8821ae_phy_switch_wirelessband():Switch Band OK.\n");
+		"<==%s:Switch Band OK\n", __func__);
 	return;
 }
 
@@ -1431,8 +1431,7 @@ static void _rtl8812ae_phy_convert_txpower_limit_to_power_index(struct ieee80211
 			}
 		}
 	}
-	rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
-		"<===== _rtl8812ae_phy_convert_txpower_limit_to_power_index()\n");
+	rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE, "<===== %s\n", __func__);
 }
 
 static void _rtl8821ae_phy_init_txpower_limit(struct ieee80211_hw *hw)
@@ -1441,8 +1440,7 @@ static void _rtl8821ae_phy_init_txpower_limit(struct ieee80211_hw *hw)
 	struct rtl_phy *rtlphy = &rtlpriv->phy;
 	u8 i, j, k, l, m;
 
-	rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
-		"=====> _rtl8821ae_phy_init_txpower_limit()!\n");
+	rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "=====> %s!\n", __func__);
 
 	for (i = 0; i < MAX_REGULATION_NUM; ++i) {
 		for (j = 0; j < MAX_2_4G_BANDWIDTH_NUM; ++j)
@@ -1463,8 +1461,7 @@ static void _rtl8821ae_phy_init_txpower_limit(struct ieee80211_hw *hw)
 							= MAX_POWER_INDEX;
 	}
 
-	rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
-		"<===== _rtl8821ae_phy_init_txpower_limit()!\n");
+	rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "<===== %s!\n", __func__);
 }
 
 static void _rtl8821ae_phy_convert_txpower_dbm_to_relative_value(struct ieee80211_hw *hw)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c
index 379c4de7aff1..740059de2603 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c
@@ -559,8 +559,8 @@ static u8 rtl8821ae_bw_mapping(struct ieee80211_hw *hw,
 	u8 bw_setting_of_desc = 0;
 
 	rtl_dbg(rtlpriv, COMP_SEND, DBG_TRACE,
-		"rtl8821ae_bw_mapping, current_chan_bw %d, packet_bw %d\n",
-		rtlphy->current_chan_bw, ptcb_desc->packet_bw);
+		"%s: current_chan_bw %d, packet_bw %d\n",
+		__func__, rtlphy->current_chan_bw, ptcb_desc->packet_bw);
 
 	if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_80) {
 		if (ptcb_desc->packet_bw == HT_CHANNEL_WIDTH_80)
@@ -603,7 +603,8 @@ static u8 rtl8821ae_sc_mapping(struct ieee80211_hw *hw,
 					VHT_DATA_SC_40_UPPER_OF_80MHZ;
 			else
 				rtl_dbg(rtlpriv, COMP_SEND, DBG_LOUD,
-					"rtl8821ae_sc_mapping: Not Correct Primary40MHz Setting\n");
+					"%s: Not Correct Primary40MHz Setting\n",
+					__func__);
 		} else {
 			if ((mac->cur_40_prime_sc ==
 			     HAL_PRIME_CHNL_OFFSET_LOWER) &&
@@ -631,7 +632,8 @@ static u8 rtl8821ae_sc_mapping(struct ieee80211_hw *hw,
 					VHT_DATA_SC_20_UPPERST_OF_80MHZ;
 			else
 				rtl_dbg(rtlpriv, COMP_SEND, DBG_LOUD,
-					"rtl8821ae_sc_mapping: Not Correct Primary40MHz Setting\n");
+					"%s: Not Correct Primary40MHz Setting\n",
+					__func__);
 		}
 	} else if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20_40) {
 		if (ptcb_desc->packet_bw == HT_CHANNEL_WIDTH_20_40) {
-- 
2.26.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 5/6] rtlwifi: Avoid multiline dereferences in rtl_dbg uses
  2020-07-25 19:55 [PATCH 0/6] rtlwifi: Convert RT_TRACE to rtl_dbg and neatening Joe Perches
                   ` (2 preceding siblings ...)
  2020-07-25 19:55 ` [PATCH 4/6] rtlwifi: Convert rtl_dbg embedded function names to %s: ..., __func__ Joe Perches
@ 2020-07-25 19:55 ` Joe Perches
  2020-07-25 19:55 ` [PATCH 6/6] rtlwifi: Convert sleeped to slept " Joe Perches
  2020-07-25 21:03 ` [PATCH 0/6] rtlwifi: Convert RT_TRACE to rtl_dbg and neatening Joe Perches
  5 siblings, 0 replies; 13+ messages in thread
From: Joe Perches @ 2020-07-25 19:55 UTC (permalink / raw)
  To: Ping-Ke Shih, Larry Finger, linux-kernel
  Cc: Kalle Valo, David S. Miller, Jakub Kicinski, linux-wireless, netdev

Use a more typical kernel style in rtl_dbg uses.

Signed-off-by: Joe Perches <joe@perches.com>
---
 .../wireless/realtek/rtlwifi/rtl8188ee/phy.c  |  3 +-
 .../realtek/rtlwifi/rtl8192c/phy_common.c     | 48 +++++++------------
 .../wireless/realtek/rtlwifi/rtl8192ce/phy.c  |  3 +-
 .../wireless/realtek/rtlwifi/rtl8192se/phy.c  |  3 +-
 .../wireless/realtek/rtlwifi/rtl8723ae/phy.c  | 48 +++++++------------
 .../wireless/realtek/rtlwifi/rtl8821ae/phy.c  |  3 +-
 6 files changed, 36 insertions(+), 72 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
index 40ebc3f726f4..4771b76bdefa 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
@@ -2191,8 +2191,7 @@ static bool _rtl88ee_phy_set_rf_power_state(struct ieee80211_hw *hw,
 			rtl_dbg(rtlpriv, COMP_RF, DBG_DMESG,
 				"Set ERFON sleeped:%d ms\n",
 				jiffies_to_msecs(jiffies -
-						 ppsc->
-						 last_sleep_jiffies));
+						 ppsc->last_sleep_jiffies));
 			ppsc->last_awake_jiffies = jiffies;
 			rtl88ee_phy_set_rf_on(hw);
 		}
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c
index f7b3b55e9776..3f3a7f196843 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c
@@ -230,8 +230,7 @@ void _rtl92c_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][0] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][0]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][0]);
 	}
 	if (regaddr == RTXAGC_A_RATE54_24) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][1] =
@@ -239,8 +238,7 @@ void _rtl92c_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][1] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][1]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][1]);
 	}
 	if (regaddr == RTXAGC_A_CCK1_MCS32) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][6] =
@@ -248,8 +246,7 @@ void _rtl92c_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][6] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][6]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][6]);
 	}
 	if (regaddr == RTXAGC_B_CCK11_A_CCK2_11 && bitmask == 0xffffff00) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][7] =
@@ -257,8 +254,7 @@ void _rtl92c_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][7] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][7]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][7]);
 	}
 	if (regaddr == RTXAGC_A_MCS03_MCS00) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][2] =
@@ -266,8 +262,7 @@ void _rtl92c_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][2] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][2]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][2]);
 	}
 	if (regaddr == RTXAGC_A_MCS07_MCS04) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][3] =
@@ -275,8 +270,7 @@ void _rtl92c_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][3] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][3]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][3]);
 	}
 	if (regaddr == RTXAGC_A_MCS11_MCS08) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][4] =
@@ -284,8 +278,7 @@ void _rtl92c_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][4] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][4]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][4]);
 	}
 	if (regaddr == RTXAGC_A_MCS15_MCS12) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][5] =
@@ -293,8 +286,7 @@ void _rtl92c_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][5] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][5]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][5]);
 	}
 	if (regaddr == RTXAGC_B_RATE18_06) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][8] =
@@ -302,8 +294,7 @@ void _rtl92c_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][8] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][8]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][8]);
 	}
 	if (regaddr == RTXAGC_B_RATE54_24) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][9] =
@@ -311,8 +302,7 @@ void _rtl92c_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][9] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][9]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][9]);
 	}
 	if (regaddr == RTXAGC_B_CCK1_55_MCS32) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][14] =
@@ -320,8 +310,7 @@ void _rtl92c_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][14] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][14]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][14]);
 	}
 	if (regaddr == RTXAGC_B_CCK11_A_CCK2_11 && bitmask == 0x000000ff) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][15] =
@@ -329,8 +318,7 @@ void _rtl92c_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][15] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][15]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][15]);
 	}
 	if (regaddr == RTXAGC_B_MCS03_MCS00) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][10] =
@@ -338,8 +326,7 @@ void _rtl92c_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][10] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][10]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][10]);
 	}
 	if (regaddr == RTXAGC_B_MCS07_MCS04) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][11] =
@@ -347,8 +334,7 @@ void _rtl92c_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][11] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][11]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][11]);
 	}
 	if (regaddr == RTXAGC_B_MCS11_MCS08) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][12] =
@@ -356,8 +342,7 @@ void _rtl92c_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][12] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][12]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][12]);
 	}
 	if (regaddr == RTXAGC_B_MCS15_MCS12) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][13] =
@@ -365,8 +350,7 @@ void _rtl92c_store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][13] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][13]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][13]);
 
 		rtlphy->pwrgroup_cnt++;
 	}
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/phy.c
index 1e9978773c8d..b0a978ff6193 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/phy.c
@@ -456,8 +456,7 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw,
 				rtl_dbg(rtlpriv, COMP_RF, DBG_DMESG,
 					"Set ERFON sleeped:%d ms\n",
 					jiffies_to_msecs(jiffies -
-							 ppsc->
-							 last_sleep_jiffies));
+							 ppsc->last_sleep_jiffies));
 				ppsc->last_awake_jiffies = jiffies;
 				rtl92ce_phy_set_rf_on(hw);
 			}
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c
index db378370802d..56d795418e18 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c
@@ -541,8 +541,7 @@ bool rtl92s_phy_set_rf_power_state(struct ieee80211_hw *hw,
 				rtl_dbg(rtlpriv, COMP_POWER, DBG_DMESG,
 					"awake, sleeped:%d ms state_inap:%x\n",
 					jiffies_to_msecs(jiffies -
-							 ppsc->
-							 last_sleep_jiffies),
+							 ppsc->last_sleep_jiffies),
 					rtlpriv->psc.state_inap);
 				ppsc->last_awake_jiffies = jiffies;
 				rtl_write_word(rtlpriv, CMDR, 0x37FC);
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c
index 393bec07618f..e7445fb74075 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c
@@ -299,8 +299,7 @@ static void store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][0] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][0]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][0]);
 	}
 	if (regaddr == RTXAGC_A_RATE54_24) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][1] =
@@ -308,8 +307,7 @@ static void store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][1] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][1]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][1]);
 	}
 	if (regaddr == RTXAGC_A_CCK1_MCS32) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][6] =
@@ -317,8 +315,7 @@ static void store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][6] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][6]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][6]);
 	}
 	if (regaddr == RTXAGC_B_CCK11_A_CCK2_11 && bitmask == 0xffffff00) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][7] =
@@ -326,8 +323,7 @@ static void store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][7] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][7]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][7]);
 	}
 	if (regaddr == RTXAGC_A_MCS03_MCS00) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][2] =
@@ -335,8 +331,7 @@ static void store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][2] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][2]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][2]);
 	}
 	if (regaddr == RTXAGC_A_MCS07_MCS04) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][3] =
@@ -344,8 +339,7 @@ static void store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][3] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][3]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][3]);
 	}
 	if (regaddr == RTXAGC_A_MCS11_MCS08) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][4] =
@@ -353,8 +347,7 @@ static void store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][4] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][4]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][4]);
 	}
 	if (regaddr == RTXAGC_A_MCS15_MCS12) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][5] =
@@ -362,8 +355,7 @@ static void store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][5] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][5]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][5]);
 	}
 	if (regaddr == RTXAGC_B_RATE18_06) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][8] =
@@ -371,8 +363,7 @@ static void store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][8] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][8]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][8]);
 	}
 	if (regaddr == RTXAGC_B_RATE54_24) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][9] =
@@ -380,8 +371,7 @@ static void store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][9] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][9]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][9]);
 	}
 	if (regaddr == RTXAGC_B_CCK1_55_MCS32) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][14] =
@@ -398,8 +388,7 @@ static void store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][15] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][15]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][15]);
 	}
 	if (regaddr == RTXAGC_B_MCS03_MCS00) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][10] =
@@ -407,8 +396,7 @@ static void store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][10] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][10]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][10]);
 	}
 	if (regaddr == RTXAGC_B_MCS07_MCS04) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][11] =
@@ -416,8 +404,7 @@ static void store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][11] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][11]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][11]);
 	}
 	if (regaddr == RTXAGC_B_MCS11_MCS08) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][12] =
@@ -425,8 +412,7 @@ static void store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][12] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][12]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][12]);
 	}
 	if (regaddr == RTXAGC_B_MCS15_MCS12) {
 		rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][13] =
@@ -434,8 +420,7 @@ static void store_pwrindex_diffrate_offset(struct ieee80211_hw *hw,
 		rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
 			"MCSTxPowerLevelOriginalOffset[%d][13] = 0x%x\n",
 			rtlphy->pwrgroup_cnt,
-			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->
-							  pwrgroup_cnt][13]);
+			rtlphy->mcs_txpwrlevel_origoffset[rtlphy->pwrgroup_cnt][13]);
 
 		rtlphy->pwrgroup_cnt++;
 	}
@@ -1579,8 +1564,7 @@ static bool _rtl8723e_phy_set_rf_power_state(struct ieee80211_hw *hw,
 			rtl_dbg(rtlpriv, COMP_RF, DBG_DMESG,
 				"Set ERFON sleeped:%d ms\n",
 				jiffies_to_msecs(jiffies -
-						 ppsc->
-						 last_sleep_jiffies));
+						 ppsc->last_sleep_jiffies));
 			ppsc->last_awake_jiffies = jiffies;
 			rtl8723e_phy_set_rf_on(hw);
 		}
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
index 085d9e9c44ed..2255c9b9fc16 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
@@ -4738,8 +4738,7 @@ static bool _rtl8821ae_phy_set_rf_power_state(struct ieee80211_hw *hw,
 			rtl_dbg(rtlpriv, COMP_RF, DBG_DMESG,
 				"Set ERFON sleeped:%d ms\n",
 				jiffies_to_msecs(jiffies -
-						 ppsc->
-						 last_sleep_jiffies));
+						 ppsc->last_sleep_jiffies));
 			ppsc->last_awake_jiffies = jiffies;
 			rtl8821ae_phy_set_rf_on(hw);
 		}
-- 
2.26.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 6/6] rtlwifi: Convert sleeped to slept in rtl_dbg uses
  2020-07-25 19:55 [PATCH 0/6] rtlwifi: Convert RT_TRACE to rtl_dbg and neatening Joe Perches
                   ` (3 preceding siblings ...)
  2020-07-25 19:55 ` [PATCH 5/6] rtlwifi: Avoid multiline dereferences in rtl_dbg uses Joe Perches
@ 2020-07-25 19:55 ` Joe Perches
  2020-07-25 21:03 ` [PATCH 0/6] rtlwifi: Convert RT_TRACE to rtl_dbg and neatening Joe Perches
  5 siblings, 0 replies; 13+ messages in thread
From: Joe Perches @ 2020-07-25 19:55 UTC (permalink / raw)
  To: Ping-Ke Shih, Larry Finger, linux-kernel
  Cc: Kalle Valo, David S. Miller, Jakub Kicinski, linux-wireless, netdev

Use a more standard word.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c | 2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/phy.c | 2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/phy.c | 2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c | 2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c | 2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c | 2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
index 4771b76bdefa..507cd44661fa 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
@@ -2189,7 +2189,7 @@ static bool _rtl88ee_phy_set_rf_power_state(struct ieee80211_hw *hw,
 					  RT_RF_OFF_LEVL_HALT_NIC);
 		} else {
 			rtl_dbg(rtlpriv, COMP_RF, DBG_DMESG,
-				"Set ERFON sleeped:%d ms\n",
+				"Set ERFON slept:%d ms\n",
 				jiffies_to_msecs(jiffies -
 						 ppsc->last_sleep_jiffies));
 			ppsc->last_awake_jiffies = jiffies;
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/phy.c
index b0a978ff6193..aef4d88ebbe9 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/phy.c
@@ -454,7 +454,7 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw,
 						  RT_RF_OFF_LEVL_HALT_NIC);
 			} else {
 				rtl_dbg(rtlpriv, COMP_RF, DBG_DMESG,
-					"Set ERFON sleeped:%d ms\n",
+					"Set ERFON slept:%d ms\n",
 					jiffies_to_msecs(jiffies -
 							 ppsc->last_sleep_jiffies));
 				ppsc->last_awake_jiffies = jiffies;
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/phy.c
index 1787b82422f2..a8d9fe269f31 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/phy.c
@@ -398,7 +398,7 @@ static bool _rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw,
 					  RT_RF_OFF_LEVL_HALT_NIC);
 		} else {
 			rtl_dbg(rtlpriv, COMP_RF, DBG_DMESG,
-				"Set ERFON sleeped:%d ms\n",
+				"Set ERFON slept:%d ms\n",
 				jiffies_to_msecs(jiffies -
 						 ppsc->last_sleep_jiffies));
 			ppsc->last_awake_jiffies = jiffies;
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
index f7419b4b3d8d..1a79e1c046cf 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
@@ -3074,7 +3074,7 @@ bool rtl92d_phy_set_rf_power_state(struct ieee80211_hw *hw,
 					  RT_RF_OFF_LEVL_HALT_NIC);
 		} else {
 			rtl_dbg(rtlpriv, COMP_POWER, DBG_DMESG,
-				"awake, sleeped:%d ms state_inap:%x\n",
+				"awake, slept:%d ms state_inap:%x\n",
 				jiffies_to_msecs(jiffies -
 						 ppsc->last_sleep_jiffies),
 				rtlpriv->psc.state_inap);
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c
index 56d795418e18..48d9fe4054af 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c
@@ -539,7 +539,7 @@ bool rtl92s_phy_set_rf_power_state(struct ieee80211_hw *hw,
 						  RT_RF_OFF_LEVL_HALT_NIC);
 			} else {
 				rtl_dbg(rtlpriv, COMP_POWER, DBG_DMESG,
-					"awake, sleeped:%d ms state_inap:%x\n",
+					"awake, slept:%d ms state_inap:%x\n",
 					jiffies_to_msecs(jiffies -
 							 ppsc->last_sleep_jiffies),
 					rtlpriv->psc.state_inap);
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c
index e7445fb74075..349275c45622 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c
@@ -1562,7 +1562,7 @@ static bool _rtl8723e_phy_set_rf_power_state(struct ieee80211_hw *hw,
 					  RT_RF_OFF_LEVL_HALT_NIC);
 		} else {
 			rtl_dbg(rtlpriv, COMP_RF, DBG_DMESG,
-				"Set ERFON sleeped:%d ms\n",
+				"Set ERFON slept:%d ms\n",
 				jiffies_to_msecs(jiffies -
 						 ppsc->last_sleep_jiffies));
 			ppsc->last_awake_jiffies = jiffies;
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c
index b43574c44117..f742b9069668 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c
@@ -2528,7 +2528,7 @@ static bool _rtl8723be_phy_set_rf_power_state(struct ieee80211_hw *hw,
 			RT_CLEAR_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC);
 		} else {
 			rtl_dbg(rtlpriv, COMP_RF, DBG_DMESG,
-				"Set ERFON sleeped:%d ms\n",
+				"Set ERFON slept:%d ms\n",
 				jiffies_to_msecs(jiffies -
 						 ppsc->last_sleep_jiffies));
 			ppsc->last_awake_jiffies = jiffies;
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
index 2255c9b9fc16..852f452d3fd3 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
@@ -4736,7 +4736,7 @@ static bool _rtl8821ae_phy_set_rf_power_state(struct ieee80211_hw *hw,
 					  RT_RF_OFF_LEVL_HALT_NIC);
 		} else {
 			rtl_dbg(rtlpriv, COMP_RF, DBG_DMESG,
-				"Set ERFON sleeped:%d ms\n",
+				"Set ERFON slept:%d ms\n",
 				jiffies_to_msecs(jiffies -
 						 ppsc->last_sleep_jiffies));
 			ppsc->last_awake_jiffies = jiffies;
-- 
2.26.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/6] rtlwifi: Convert RT_TRACE to rtl_dbg and neatening
  2020-07-25 19:55 [PATCH 0/6] rtlwifi: Convert RT_TRACE to rtl_dbg and neatening Joe Perches
                   ` (4 preceding siblings ...)
  2020-07-25 19:55 ` [PATCH 6/6] rtlwifi: Convert sleeped to slept " Joe Perches
@ 2020-07-25 21:03 ` Joe Perches
  5 siblings, 0 replies; 13+ messages in thread
From: Joe Perches @ 2020-07-25 21:03 UTC (permalink / raw)
  To: Ping-Ke Shih, Larry Finger, linux-wireless
  Cc: Kalle Valo, David S. Miller, Jakub Kicinski, netdev, linux-kernel

On Sat, 2020-07-25 at 12:55 -0700, Joe Perches wrote:
> RT_TRACE seems like it should be associated to tracing but it's not.
> It's a generic debug logging mechanism.
> Rename it to a more typical name.
> Miscellaneous neatening around these changes.

Patch 1/6 is over 1MB and is too large for some mailing lists.

These patches are based on wireless-drivers-next and are also
available at:

git://repo.or.cz/linux-2.6/trivial-mods.git in branch 20200724_rtlwifi



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/6] rtlwifi: Remove unnecessary parenthese in rtl_dbg uses
  2020-07-25 19:55 ` [PATCH 2/6] rtlwifi: Remove unnecessary parenthese in rtl_dbg uses Joe Perches
@ 2020-07-27  6:07   ` Pkshih
  2020-07-27  8:27     ` Joe Perches
  0 siblings, 1 reply; 13+ messages in thread
From: Pkshih @ 2020-07-27  6:07 UTC (permalink / raw)
  To: joe, Larry.Finger
  Cc: linux-wireless, kvalo, davem, linux-kernel, kuba, netdev

On Sat, 2020-07-25 at 12:55 -0700, Joe Perches wrote:
> Make these statements a little simpler.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/net/wireless/realtek/rtlwifi/base.c   | 14 +++++------
>  .../rtlwifi/btcoexist/halbtc8192e2ant.c       | 23 ++++++++++---------
>  .../rtlwifi/btcoexist/halbtc8821a2ant.c       | 12 +++++-----
>  .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c  |  9 ++++----
>  drivers/net/wireless/realtek/rtlwifi/pci.c    |  2 +-
>  5 files changed, 30 insertions(+), 30 deletions(-)
> 
> 

[...]

> diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
> b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
> index 8d28c68f083e..f9a2d8a6730c 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
> @@ -874,11 +874,10 @@ static void halbtc_display_wifi_status(struct
> btc_coexist *btcoexist,
>  	seq_printf(m, "\n %-35s = %s / %s/ %s/ AP=%d ",
>  		   "Wifi freq/ bw/ traffic",
>  		   gl_btc_wifi_freq_string[wifi_freq],
> -		   ((wifi_under_b_mode) ? "11b" :
> -		    gl_btc_wifi_bw_string[wifi_bw]),
> -		   ((!wifi_busy) ? "idle" : ((BTC_WIFI_TRAFFIC_TX ==
> -					      wifi_traffic_dir) ? "uplink" :
> -					     "downlink")),
> +		   wifi_under_b_mode ? "11b" : gl_btc_wifi_bw_string[wifi_bw],
> +		   (!wifi_busy ? "idle" :
> +		    wifi_traffic_dir == BTC_WIFI_TRAFFIC_TX ? "uplink" :
> +		    "downlink"),

I think this would be better

+		   !wifi_busy ? "idle" :
+		   (wifi_traffic_dir == BTC_WIFI_TRAFFIC_TX ? "uplink" :
+		    "downlink"),



>  		   ap_num);
>  
>  	/* power status	 */
> diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c
> b/drivers/net/wireless/realtek/rtlwifi/pci.c
> index 1d0af72ee780..3189d1c50d52 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/pci.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/pci.c
> @@ -557,7 +557,7 @@ static void _rtl_pci_tx_isr(struct ieee80211_hw *hw, int
> prio)
>  		if (rtlpriv->rtlhal.earlymode_enable)
>  			skb_pull(skb, EM_HDR_LEN);
>  
> -		rtl_dbg(rtlpriv, (COMP_INTR | COMP_SEND), DBG_TRACE,
> +		rtl_dbg(rtlpriv, COMP_INTR | COMP_SEND, DBG_TRACE,
>  			"new ring->idx:%d, free: skb_queue_len:%d, free:
> seq:%x\n",
>  			ring->idx,
>  			skb_queue_len(&ring->queue),

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/6] rtlwifi: Remove unnecessary parenthese in rtl_dbg uses
  2020-07-27  6:07   ` Pkshih
@ 2020-07-27  8:27     ` Joe Perches
  2020-07-27  9:04       ` Pkshih
  0 siblings, 1 reply; 13+ messages in thread
From: Joe Perches @ 2020-07-27  8:27 UTC (permalink / raw)
  To: Pkshih, Larry.Finger
  Cc: linux-wireless, kvalo, davem, linux-kernel, kuba, netdev

On Mon, 2020-07-27 at 06:07 +0000, Pkshih wrote:
> On Sat, 2020-07-25 at 12:55 -0700, Joe Perches wrote:
> > Make these statements a little simpler.
[]
> > diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
[]
> > @@ -874,11 +874,10 @@ static void halbtc_display_wifi_status(struct
> > btc_coexist *btcoexist,
> >  	seq_printf(m, "\n %-35s = %s / %s/ %s/ AP=%d ",
> >  		   "Wifi freq/ bw/ traffic",
> >  		   gl_btc_wifi_freq_string[wifi_freq],
> > -		   ((wifi_under_b_mode) ? "11b" :
> > -		    gl_btc_wifi_bw_string[wifi_bw]),
> > -		   ((!wifi_busy) ? "idle" : ((BTC_WIFI_TRAFFIC_TX ==
> > -					      wifi_traffic_dir) ? "uplink" :
> > -					     "downlink")),
> > +		   wifi_under_b_mode ? "11b" : gl_btc_wifi_bw_string[wifi_bw],
> > +		   (!wifi_busy ? "idle" :
> > +		    wifi_traffic_dir == BTC_WIFI_TRAFFIC_TX ? "uplink" :
> > +		    "downlink"),
> 
> I think this would be better
> 
> +		   !wifi_busy ? "idle" :
> +		   (wifi_traffic_dir == BTC_WIFI_TRAFFIC_TX ? "uplink" :
> +		    "downlink"),

It seems most repeated test1 ? : test2 ? : test3 ?:
uses do not have the style you suggest in the kernel.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/6] rtlwifi: Remove unnecessary parenthese in rtl_dbg uses
  2020-07-27  8:27     ` Joe Perches
@ 2020-07-27  9:04       ` Pkshih
  2020-07-27 14:52         ` Joe Perches
  0 siblings, 1 reply; 13+ messages in thread
From: Pkshih @ 2020-07-27  9:04 UTC (permalink / raw)
  To: joe, Larry.Finger
  Cc: linux-wireless, kvalo, davem, netdev, linux-kernel, kuba

On Mon, 2020-07-27 at 01:27 -0700, Joe Perches wrote:
> On Mon, 2020-07-27 at 06:07 +0000, Pkshih wrote:
> > On Sat, 2020-07-25 at 12:55 -0700, Joe Perches wrote:
> > > Make these statements a little simpler.
> []
> > > diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
> []
> > > @@ -874,11 +874,10 @@ static void halbtc_display_wifi_status(struct
> > > btc_coexist *btcoexist,
> > >  	seq_printf(m, "\n %-35s = %s / %s/ %s/ AP=%d ",
> > >  		   "Wifi freq/ bw/ traffic",
> > >  		   gl_btc_wifi_freq_string[wifi_freq],
> > > -		   ((wifi_under_b_mode) ? "11b" :
> > > -		    gl_btc_wifi_bw_string[wifi_bw]),
> > > -		   ((!wifi_busy) ? "idle" : ((BTC_WIFI_TRAFFIC_TX ==
> > > -					      wifi_traffic_dir) ?
> "uplink" :
> > > -					     "downlink")),
> > > +		   wifi_under_b_mode ? "11b" :
> gl_btc_wifi_bw_string[wifi_bw],
> > > +		   (!wifi_busy ? "idle" :
> > > +		    wifi_traffic_dir == BTC_WIFI_TRAFFIC_TX ? "uplink" :
> > > +		    "downlink"),
> > 
> > I think this would be better
> > 
> > +		   !wifi_busy ? "idle" :
> > +		   (wifi_traffic_dir == BTC_WIFI_TRAFFIC_TX ? "uplink" :
> > +		    "downlink"),
> 
> It seems most repeated test1 ? : test2 ? : test3 ?:
> uses do not have the style you suggest in the kernel.
> 

Your change is 
(test1 ? : test2 ? :)

So, I think you would like to have parenthesis intentionally.
If so, 
test1 ? : (test2 ? :)
would be better.


If not,
test1 ? : test2 ? :
may be what you want (without any parenthesis).


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/6] rtlwifi: Remove unnecessary parenthese in rtl_dbg uses
  2020-07-27  9:04       ` Pkshih
@ 2020-07-27 14:52         ` Joe Perches
  2020-07-27 16:25           ` Larry Finger
  0 siblings, 1 reply; 13+ messages in thread
From: Joe Perches @ 2020-07-27 14:52 UTC (permalink / raw)
  To: Pkshih, Larry.Finger
  Cc: linux-wireless, kvalo, davem, netdev, linux-kernel, kuba

On Mon, 2020-07-27 at 09:04 +0000, Pkshih wrote:
> So, I think you would like to have parenthesis intentionally.
> If so, 
> test1 ? : (test2 ? :)
> would be better.
> 
> 
> If not,
> test1 ? : test2 ? :
> may be what you want (without any parenthesis).

Use whatever style you like, it's unimportant to me
and it's not worth spending any real time on it.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/6] rtlwifi: Remove unnecessary parenthese in rtl_dbg uses
  2020-07-27 14:52         ` Joe Perches
@ 2020-07-27 16:25           ` Larry Finger
  2020-07-27 16:33             ` Joe Perches
  0 siblings, 1 reply; 13+ messages in thread
From: Larry Finger @ 2020-07-27 16:25 UTC (permalink / raw)
  To: Joe Perches, Pkshih
  Cc: linux-wireless, kvalo, davem, netdev, linux-kernel, kuba

On 7/27/20 9:52 AM, Joe Perches wrote:
> On Mon, 2020-07-27 at 09:04 +0000, Pkshih wrote:
>> So, I think you would like to have parenthesis intentionally.
>> If so,
>> test1 ? : (test2 ? :)
>> would be better.
>>
>>
>> If not,
>> test1 ? : test2 ? :
>> may be what you want (without any parenthesis).
> 
> Use whatever style you like, it's unimportant to me
> and it's not worth spending any real time on it.

If you are so busy, why did you jump in with patches that you knew I was already 
working on? You knew because you critiqued my first submission.

@Kalle: Please drop my contributions in the sequence "PATCH v2 00/15] rtlwifi: 
Change RT_TRACE into rtl_dbg for all drivers".

Larry


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/6] rtlwifi: Remove unnecessary parenthese in rtl_dbg uses
  2020-07-27 16:25           ` Larry Finger
@ 2020-07-27 16:33             ` Joe Perches
  0 siblings, 0 replies; 13+ messages in thread
From: Joe Perches @ 2020-07-27 16:33 UTC (permalink / raw)
  To: Larry Finger, Pkshih
  Cc: linux-wireless, kvalo, davem, netdev, linux-kernel, kuba

On Mon, 2020-07-27 at 11:25 -0500, Larry Finger wrote:
> On 7/27/20 9:52 AM, Joe Perches wrote:
> > On Mon, 2020-07-27 at 09:04 +0000, Pkshih wrote:
> > > So, I think you would like to have parenthesis intentionally.
> > > If so,
> > > test1 ? : (test2 ? :)
> > > would be better.
> > > 
> > > 
> > > If not,
> > > test1 ? : test2 ? :
> > > may be what you want (without any parenthesis).
> > 
> > Use whatever style you like, it's unimportant to me
> > and it's not worth spending any real time on it.
> 
> If you are so busy, why did you jump in with patches that you knew I was already 
> working on? You knew because you critiqued my first submission.

Because it was over a week and you didn't reply
to my original message nor did you cc me on any
changes you made to your patch?

I can't read every patch I'm not cc'd on.



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, back to index

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-25 19:55 [PATCH 0/6] rtlwifi: Convert RT_TRACE to rtl_dbg and neatening Joe Perches
2020-07-25 19:55 ` [PATCH 2/6] rtlwifi: Remove unnecessary parenthese in rtl_dbg uses Joe Perches
2020-07-27  6:07   ` Pkshih
2020-07-27  8:27     ` Joe Perches
2020-07-27  9:04       ` Pkshih
2020-07-27 14:52         ` Joe Perches
2020-07-27 16:25           ` Larry Finger
2020-07-27 16:33             ` Joe Perches
2020-07-25 19:55 ` [PATCH 3/6] rtlwifi: Better spacing around " Joe Perches
2020-07-25 19:55 ` [PATCH 4/6] rtlwifi: Convert rtl_dbg embedded function names to %s: ..., __func__ Joe Perches
2020-07-25 19:55 ` [PATCH 5/6] rtlwifi: Avoid multiline dereferences in rtl_dbg uses Joe Perches
2020-07-25 19:55 ` [PATCH 6/6] rtlwifi: Convert sleeped to slept " Joe Perches
2020-07-25 21:03 ` [PATCH 0/6] rtlwifi: Convert RT_TRACE to rtl_dbg and neatening Joe Perches

Linux-Wireless Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wireless/0 linux-wireless/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wireless linux-wireless/ https://lore.kernel.org/linux-wireless \
		linux-wireless@vger.kernel.org
	public-inbox-index linux-wireless

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wireless


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git