2021-04-24 09:03:55

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 00/50] staging: rtl8723bs: remove all remaining debug macros in rtw_debug.h

This patchset removes all remaining debug macros in rtw_debug.h

DBG_871X_SEL macro is replaced with netdev_dbg() for it does
a raw printk call which is not best recommended for a driver.

@@
expression sel;
expression list args;
identifier padapter;
identifier func;
@@

func(..., struct adapter *padapter, ...) {
<...
- DBG_871X_SEL(sel, args);
+ netdev_dbg(padapter->pnetdev, args);
...>

unused _DBG_871X_LEVEL macro declaration is removed.

Beautified register dump in core/rtw_debug.c

Some code cleaning is done and all other private component tracing
macros are removed.

----------------------------------------------
Changes in v2:
- Added a patch to improve register dump
- Fix commit message and changelog in patch
removing an unneeded include directive

Fabio Aiuto (50):
staging: rtl8723bs: remove unused log function
staging: rtl8723bs: replace DBG_871X_SEL log macro with netdev_dbg()
staging: rtl8723bs: add two functions to improve register dump in
core/rtw_debug.c
staging: rtl8723bs: remove DBG_871X_SEL macro declaration
staging: rtl8723bs: remove unused _DBG_871X_LEVEL macro
staging: rtl8723bs: remove unused mac_reg_dump() function argument
staging: rtl8723bs: remove unused bb_reg_dump() function argument
staging: rtl8723bs: remove unused rf_reg_dump() function argument
staging: rtl8723bs: remove unused RTW_DBGDUMP macro definition
staging: rtl8723bs: remove all defs related to _dbgdump macro
staging: rtl8723bs: remove unused debug variables declarations and
initialization
staging: rtl8723bs: remove unneeded header file include
staging: rtl8723bs: remove unused debug macro definitions
staging: rtl8723bs: remove debug macros related to core/rtw_xmit.c
tracing
staging: rtl8723bs: remove debug macros related to os_dep/xmit_linux.c
tracing
staging: rtl8723bs: remove debug macros related to core/rtw_recv.c
tracing
staging: rtl8723bs: remove debug macros related to os_dep/recv_linux.c
tracing
staging: rtl8723bs: remove debug macros related to core/rtw_mlme.c
tracing
staging: rtl8723bs: remove debug macros related to os_dep/mlme_linux.c
tracing
staging: rtl8723bs: move static array definition from header to .c
file
staging: rtl8723bs: remove debug macros related to core/rtw_mlme_ext.c
tracing
staging: rtl8723bs: remove debug macros related to core/rtw_sta_mgt.c
tracing
staging: rtl8723bs: remove debug macros related to core/rtw_cmd.c
tracing
staging: rtl8723bs: remove obsolete debug macro definitions
staging: rtl8723bs: remove debug macros related to core/rtw_io.c
tracing
staging: rtl8723bs: remove obsolete _IO_OSDEP_C_ debug macro
definition
staging: rtl8723bs: remove debug macros related to os_dep/os_intfs.c
tracing
staging: rtl8723bs: remove debug macros related to core/rtw_security.c
tracing
staging: rtl8723bs: remove debug macros related to core/rtw_eeprom.c
tracing
staging: rtl8723bs: remove debug macros related to hal/hal_intf.c
tracing
staging: rtl8723bs: remove debug macros related to hal/sdio_halinit.c
tracing
staging: rtl8723bs: remove unused debug macros tied to
_RTL871X_IOCTL_C_ definition
staging: rtl8723bs: remove unused debug macros tied to
_RTL871X_IOCTL_SET_C_ definition
staging: rtl8723bs: remove unused debug macros tied to
_RTL871X_IOCTL_QUERY_C_ definition
staging: rtl8723bs: remove unused debug macros tied to
_RTL871X_PWRCTRL_C_ definition
staging: rtl8723bs: remove unused macros tied to core/rtw_pwrctrl.c
debug
staging: rtl8723bs: remove unused macros tied to os_dep/sdio_intf.c
debug
staging: rtl8723bs: remove unused debug macros tied to _HCI_OPS_C_
definition
staging: rtl8723bs: remove unused debug macros tied to hal/sdio_ops.c
debug
staging: rtl8723bs: remove unused debug macros tied to
os_dep/osdep_service.c debug
staging: rtl8723bs: remove unused _module_mp_ def
staging: rtl8723bs: remove unused macros tied to _HCI_OPS_OS_C_
definition
staging: rtl8723bs: remove unused macros tied to
_RTL871X_IOCTL_LINUX_C definition
staging: rtl8723bs: remove unused macros tied to _RTL8712_CMD_C_
definition
staging: rtl8723bs: remove commented out macro definition
staging: rtl8723bs: remove unused debug macro definitions
staging: rtl8723bs: remove unused macros tied to core/rtw_efuse.c
debug
staging: rtl8723bs: remove unsed debug macros tied to no particular
code debug
staging: rtl8723bs: remove last unused debug macros
staging: rtl8723bs: macro DRIVER_PREFIX expands to lowercase driver
name

drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 -
drivers/staging/rtl8723bs/core/rtw_debug.c | 74 ++++----
drivers/staging/rtl8723bs/core/rtw_eeprom.c | 2 -
drivers/staging/rtl8723bs/core/rtw_efuse.c | 2 -
drivers/staging/rtl8723bs/core/rtw_io.c | 2 -
drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 -
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 32 +++-
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 2 -
drivers/staging/rtl8723bs/core/rtw_recv.c | 2 -
drivers/staging/rtl8723bs/core/rtw_security.c | 2 -
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 2 -
drivers/staging/rtl8723bs/core/rtw_xmit.c | 2 -
drivers/staging/rtl8723bs/hal/hal_intf.c | 3 -
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 2 -
drivers/staging/rtl8723bs/hal/sdio_ops.c | 2 -
drivers/staging/rtl8723bs/include/rtw_debug.h | 170 +-----------------
.../staging/rtl8723bs/include/rtw_mlme_ext.h | 32 ----
.../staging/rtl8723bs/os_dep/ioctl_linux.c | 6 +-
drivers/staging/rtl8723bs/os_dep/mlme_linux.c | 4 -
drivers/staging/rtl8723bs/os_dep/os_intfs.c | 2 -
.../staging/rtl8723bs/os_dep/osdep_service.c | 4 -
drivers/staging/rtl8723bs/os_dep/recv_linux.c | 2 -
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 2 -
drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 2 -
24 files changed, 69 insertions(+), 288 deletions(-)

--
2.20.1


2021-04-24 09:04:03

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 01/50] staging: rtl8723bs: remove unused log function

remove unused sd_f0_reg_dump() function.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_debug.c | 17 -----------------
drivers/staging/rtl8723bs/include/rtw_debug.h | 2 --
2 files changed, 19 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_debug.c b/drivers/staging/rtl8723bs/core/rtw_debug.c
index 79fd968bb147..0ee0190c09d7 100644
--- a/drivers/staging/rtl8723bs/core/rtw_debug.c
+++ b/drivers/staging/rtl8723bs/core/rtw_debug.c
@@ -14,23 +14,6 @@ u32 GlobalDebugLevel = _drv_err_;

#include <rtw_version.h>

-void sd_f0_reg_dump(void *sel, struct adapter *adapter)
-{
- int i;
-
- for (i = 0x0; i <= 0xff; i++) {
- if (i%16 == 0)
- netdev_dbg(adapter->pnetdev, "0x%02x ", i);
-
- DBG_871X_SEL(sel, "%02x ", rtw_sd_f0_read8(adapter, i));
-
- if (i%16 == 15)
- DBG_871X_SEL(sel, "\n");
- else if (i%8 == 7)
- DBG_871X_SEL(sel, "\t");
- }
-}
-
void mac_reg_dump(void *sel, struct adapter *adapter)
{
int i, j = 1;
diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 23f4cb4711d4..ed75db1b16f8 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -169,8 +169,6 @@

#endif /* defined(_dbgdump) */

-void sd_f0_reg_dump(void *sel, struct adapter *adapter);
-
void mac_reg_dump(void *sel, struct adapter *adapter);
void bb_reg_dump(void *sel, struct adapter *adapter);
void rf_reg_dump(void *sel, struct adapter *adapter);
--
2.20.1

2021-04-24 09:04:04

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 02/50] staging: rtl8723bs: replace DBG_871X_SEL log macro with netdev_dbg()

replace DBG_871X_SEL log macro with the net device driver
recommended netdev_dbg().

This macro by default does a raw printk, and the alternative
behaviour, never triggered is a seq_print() call.

So replace with netdev_dbg().

The operation has been done with the following semantic patch
script:

@@
expression sel;
expression list args;
identifier padapter;
identifier func;
@@

func(..., struct adapter *padapter, ...) {
<...
- DBG_871X_SEL(sel, args);
+ netdev_dbg(padapter->pnetdev, args);
...>

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_debug.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_debug.c b/drivers/staging/rtl8723bs/core/rtw_debug.c
index 0ee0190c09d7..a43fa38cae62 100644
--- a/drivers/staging/rtl8723bs/core/rtw_debug.c
+++ b/drivers/staging/rtl8723bs/core/rtw_debug.c
@@ -23,9 +23,10 @@ void mac_reg_dump(void *sel, struct adapter *adapter)
for (i = 0x0; i < 0x800; i += 4) {
if (j%4 == 1)
netdev_dbg(adapter->pnetdev, "0x%03x", i);
- DBG_871X_SEL(sel, " 0x%08x ", rtw_read32(adapter, i));
+ netdev_dbg(adapter->pnetdev, " 0x%08x ",
+ rtw_read32(adapter, i));
if ((j++)%4 == 0)
- DBG_871X_SEL(sel, "\n");
+ netdev_dbg(adapter->pnetdev, "\n");
}
}

@@ -37,9 +38,10 @@ void bb_reg_dump(void *sel, struct adapter *adapter)
for (i = 0x800; i < 0x1000 ; i += 4) {
if (j%4 == 1)
netdev_dbg(adapter->pnetdev, "0x%03x", i);
- DBG_871X_SEL(sel, " 0x%08x ", rtw_read32(adapter, i));
+ netdev_dbg(adapter->pnetdev, " 0x%08x ",
+ rtw_read32(adapter, i));
if ((j++)%4 == 0)
- DBG_871X_SEL(sel, "\n");
+ netdev_dbg(adapter->pnetdev, "\n");
}
}

@@ -64,9 +66,9 @@ void rf_reg_dump(void *sel, struct adapter *adapter)
value = rtw_hal_read_rfreg(adapter, path, i, 0xffffffff);
if (j%4 == 1)
netdev_dbg(adapter->pnetdev, "0x%02x ", i);
- DBG_871X_SEL(sel, " 0x%08x ", value);
+ netdev_dbg(adapter->pnetdev, " 0x%08x ", value);
if ((j++)%4 == 0)
- DBG_871X_SEL(sel, "\n");
+ netdev_dbg(adapter->pnetdev, "\n");
}
}
}
--
2.20.1

2021-04-24 09:04:07

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 04/50] staging: rtl8723bs: remove DBG_871X_SEL macro declaration

remove DBG_871X_SEL macro declaration.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 9 ---------
1 file changed, 9 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index ed75db1b16f8..fbae0d3b168c 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -158,15 +158,6 @@

#define RTW_DBGDUMP NULL /* 'stream' for _dbgdump */

-/* dump message to selected 'stream' */
-#define DBG_871X_SEL(sel, fmt, arg...) \
- do { \
- if (sel == RTW_DBGDUMP) \
- _DBG_871X_LEVEL(_drv_always_, fmt, ##arg); \
- else \
- seq_printf(sel, fmt, ##arg); \
- } while (0)
-
#endif /* defined(_dbgdump) */

void mac_reg_dump(void *sel, struct adapter *adapter);
--
2.20.1

2021-04-24 09:04:15

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 05/50] staging: rtl8723bs: remove unused _DBG_871X_LEVEL macro

remove unused _DBG_871X_LEVEL macro,
after DBG_871X_SEL deletion.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 12 ------------
1 file changed, 12 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index fbae0d3b168c..fdd5933a3d5a 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -144,18 +144,6 @@

#if defined(_dbgdump)

-/* without driver-defined prefix */
-#undef _DBG_871X_LEVEL
-#define _DBG_871X_LEVEL(level, fmt, arg...) \
- do {\
- if (level <= GlobalDebugLevel) {\
- if (level <= _drv_err_ && level > _drv_always_) \
- _dbgdump("ERROR " fmt, ##arg);\
- else \
- _dbgdump(fmt, ##arg);\
- } \
- } while (0)
-
#define RTW_DBGDUMP NULL /* 'stream' for _dbgdump */

#endif /* defined(_dbgdump) */
--
2.20.1

2021-04-24 09:04:41

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 06/50] staging: rtl8723bs: remove unused mac_reg_dump() function argument

remove unused function argument void *sel from mac_reg_dump.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_debug.c | 2 +-
drivers/staging/rtl8723bs/include/rtw_debug.h | 2 +-
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_debug.c b/drivers/staging/rtl8723bs/core/rtw_debug.c
index 0e13a226e9be..ad3cdbe45e55 100644
--- a/drivers/staging/rtl8723bs/core/rtw_debug.c
+++ b/drivers/staging/rtl8723bs/core/rtw_debug.c
@@ -26,7 +26,7 @@ static void dump_4_regs(struct adapter *adapter, int offset)
i, reg[0], reg[1], reg[2], reg[3]);
}

-void mac_reg_dump(void *sel, struct adapter *adapter)
+void mac_reg_dump(struct adapter *adapter)
{
int i;

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index fdd5933a3d5a..eabc21d2b689 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -148,7 +148,7 @@

#endif /* defined(_dbgdump) */

-void mac_reg_dump(void *sel, struct adapter *adapter);
+void mac_reg_dump(struct adapter *adapter);
void bb_reg_dump(void *sel, struct adapter *adapter);
void rf_reg_dump(void *sel, struct adapter *adapter);

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index e98e5388d5c7..7951c362d664 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -2734,7 +2734,7 @@ static int rtw_dbg_port(struct net_device *dev,
case 0xdd:/* registers dump , 0 for mac reg, 1 for bb reg, 2 for rf reg */
{
if (extra_arg == 0)
- mac_reg_dump(RTW_DBGDUMP, padapter);
+ mac_reg_dump(padapter);
else if (extra_arg == 1)
bb_reg_dump(RTW_DBGDUMP, padapter);
else if (extra_arg == 2)
--
2.20.1

2021-04-24 09:04:52

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 03/50] staging: rtl8723bs: add two functions to improve register dump in core/rtw_debug.c

Beautify register dump by adding two functions printing
four register values per line. This is necessary after
old macro replacement with netdev_dbg(), the former
wrapped a raw printk, the latter
prints lots of driver information overhead per line
for each call. So avoid this noisy behaviour by dumping
four values on each line.

Suggested-by: Joe Perches <[email protected]>
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_debug.c | 63 ++++++++++++----------
1 file changed, 35 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_debug.c b/drivers/staging/rtl8723bs/core/rtw_debug.c
index a43fa38cae62..0e13a226e9be 100644
--- a/drivers/staging/rtl8723bs/core/rtw_debug.c
+++ b/drivers/staging/rtl8723bs/core/rtw_debug.c
@@ -14,41 +14,54 @@ u32 GlobalDebugLevel = _drv_err_;

#include <rtw_version.h>

+static void dump_4_regs(struct adapter *adapter, int offset)
+{
+ u32 reg[4];
+ int i;
+
+ for (i = 0; i < 4; i++)
+ reg[i] = rtw_read32(adapter, offset + i);
+
+ netdev_dbg(adapter->pnetdev, "0x%03x 0x%08x 0x%08x 0x%08x 0x%08x\n",
+ i, reg[0], reg[1], reg[2], reg[3]);
+}
+
void mac_reg_dump(void *sel, struct adapter *adapter)
{
- int i, j = 1;
+ int i;

netdev_dbg(adapter->pnetdev, "======= MAC REG =======\n");

- for (i = 0x0; i < 0x800; i += 4) {
- if (j%4 == 1)
- netdev_dbg(adapter->pnetdev, "0x%03x", i);
- netdev_dbg(adapter->pnetdev, " 0x%08x ",
- rtw_read32(adapter, i));
- if ((j++)%4 == 0)
- netdev_dbg(adapter->pnetdev, "\n");
- }
+ for (i = 0x0; i < 0x800; i += 4)
+ dump_4_regs(adapter, i);
}

void bb_reg_dump(void *sel, struct adapter *adapter)
{
- int i, j = 1;
+ int i;

netdev_dbg(adapter->pnetdev, "======= BB REG =======\n");
- for (i = 0x800; i < 0x1000 ; i += 4) {
- if (j%4 == 1)
- netdev_dbg(adapter->pnetdev, "0x%03x", i);
- netdev_dbg(adapter->pnetdev, " 0x%08x ",
- rtw_read32(adapter, i));
- if ((j++)%4 == 0)
- netdev_dbg(adapter->pnetdev, "\n");
- }
+
+ for (i = 0x800; i < 0x1000 ; i += 4)
+ dump_4_regs(adapter, i);
+}
+
+static void dump_4_rf_regs(struct adapter *adapter, int path, int offset)
+{
+ u8 reg[4];
+ int i;
+
+ for (i = 0; i < 4; i++)
+ reg[i] = rtw_hal_read_rfreg(adapter, path, offset + i,
+ 0xffffffff);
+
+ netdev_dbg(adapter->pnetdev, "0x%02x 0x%08x 0x%08x 0x%08x 0x%08x\n",
+ i, reg[0], reg[1], reg[2], reg[3]);
}

void rf_reg_dump(void *sel, struct adapter *adapter)
{
- int i, j = 1, path;
- u32 value;
+ int i, path;
u8 rf_type = 0;
u8 path_nums = 0;

@@ -62,13 +75,7 @@ void rf_reg_dump(void *sel, struct adapter *adapter)

for (path = 0; path < path_nums; path++) {
netdev_dbg(adapter->pnetdev, "RF_Path(%x)\n", path);
- for (i = 0; i < 0x100; i++) {
- value = rtw_hal_read_rfreg(adapter, path, i, 0xffffffff);
- if (j%4 == 1)
- netdev_dbg(adapter->pnetdev, "0x%02x ", i);
- netdev_dbg(adapter->pnetdev, " 0x%08x ", value);
- if ((j++)%4 == 0)
- netdev_dbg(adapter->pnetdev, "\n");
- }
+ for (i = 0; i < 0x100; i++)
+ dump_4_rf_regs(adapter, path, i);
}
}
--
2.20.1

2021-04-24 09:05:05

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 08/50] staging: rtl8723bs: remove unused rf_reg_dump() function argument

remove unused function argument void *sel from rf_reg_dump.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_debug.c | 2 +-
drivers/staging/rtl8723bs/include/rtw_debug.h | 2 +-
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_debug.c b/drivers/staging/rtl8723bs/core/rtw_debug.c
index 9dfa71580b2e..642aa556c462 100644
--- a/drivers/staging/rtl8723bs/core/rtw_debug.c
+++ b/drivers/staging/rtl8723bs/core/rtw_debug.c
@@ -59,7 +59,7 @@ static void dump_4_rf_regs(struct adapter *adapter, int path, int offset)
i, reg[0], reg[1], reg[2], reg[3]);
}

-void rf_reg_dump(void *sel, struct adapter *adapter)
+void rf_reg_dump(struct adapter *adapter)
{
int i, path;
u8 rf_type = 0;
diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 6064de93c24c..fc187a4ed2c3 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -150,6 +150,6 @@

void mac_reg_dump(struct adapter *adapter);
void bb_reg_dump(struct adapter *adapter);
-void rf_reg_dump(void *sel, struct adapter *adapter);
+void rf_reg_dump(struct adapter *adapter);

#endif /* __RTW_DEBUG_H__ */
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index fa260714b588..5912915a7870 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -2738,7 +2738,7 @@ static int rtw_dbg_port(struct net_device *dev,
else if (extra_arg == 1)
bb_reg_dump(padapter);
else if (extra_arg == 2)
- rf_reg_dump(RTW_DBGDUMP, padapter);
+ rf_reg_dump(padapter);
}
break;

--
2.20.1

2021-04-24 09:05:13

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 11/50] staging: rtl8723bs: remove unused debug variables declarations and initialization

remove unused debug variables extern declarations
and containing #ifndef block.

remove initialization as well.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_debug.c | 2 --
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 -----
2 files changed, 7 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_debug.c b/drivers/staging/rtl8723bs/core/rtw_debug.c
index 642aa556c462..576b039f741c 100644
--- a/drivers/staging/rtl8723bs/core/rtw_debug.c
+++ b/drivers/staging/rtl8723bs/core/rtw_debug.c
@@ -10,8 +10,6 @@
#include <rtw_debug.h>
#include <hal_btcoex.h>

-u32 GlobalDebugLevel = _drv_err_;
-
#include <rtw_version.h>

static void dump_4_regs(struct adapter *adapter, int offset)
diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 2232a1014528..579724e8fc2f 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -131,11 +131,6 @@
#define _MODULE_DEFINE_ _module_efuse_
#endif

-#ifndef _RTL871X_DEBUG_C_
- extern u32 GlobalDebugLevel;
- extern u64 GlobalDebugComponents;
-#endif
-
#define DRIVER_PREFIX "RTL8723BS: "

void mac_reg_dump(struct adapter *adapter);
--
2.20.1

2021-04-24 09:05:13

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 10/50] staging: rtl8723bs: remove all defs related to _dbgdump macro

remove obsolete _dbgdump macro definition, undef and
empty conditional code block.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 8 --------
1 file changed, 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index c7e8187ca7f5..2232a1014528 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -131,21 +131,13 @@
#define _MODULE_DEFINE_ _module_efuse_
#endif

-#undef _dbgdump
-
#ifndef _RTL871X_DEBUG_C_
extern u32 GlobalDebugLevel;
extern u64 GlobalDebugComponents;
#endif

-#define _dbgdump printk
-
#define DRIVER_PREFIX "RTL8723BS: "

-#if defined(_dbgdump)
-
-#endif /* defined(_dbgdump) */
-
void mac_reg_dump(struct adapter *adapter);
void bb_reg_dump(struct adapter *adapter);
void rf_reg_dump(struct adapter *adapter);
--
2.20.1

2021-04-24 09:05:25

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 12/50] staging: rtl8723bs: remove unneeded header file include

remove unneeded header file include.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 579724e8fc2f..acf4deacd3a7 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,8 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#include <linux/trace_seq.h>
-
#define _drv_always_ 1
#define _drv_emerg_ 2
#define _drv_alert_ 3
--
2.20.1

2021-04-24 09:05:32

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 13/50] staging: rtl8723bs: remove unused debug macro definitions

remove unused debug macro definitions related to
private log level tracing.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 12 ------------
1 file changed, 12 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index acf4deacd3a7..8f56d1e7e644 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,18 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _drv_always_ 1
-#define _drv_emerg_ 2
-#define _drv_alert_ 3
-#define _drv_crit_ 4
-#define _drv_err_ 5
-#define _drv_warning_ 6
-#define _drv_notice_ 7
-#define _drv_info_ 8
-#define _drv_dump_ 9
-#define _drv_debug_ 10
-
-
#define _module_rtl871x_xmit_c_ BIT(0)
#define _module_xmit_osdep_c_ BIT(1)
#define _module_rtl871x_recv_c_ BIT(2)
--
2.20.1

2021-04-24 09:05:36

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 15/50] staging: rtl8723bs: remove debug macros related to os_dep/xmit_linux.c tracing

remove debug macros definitions related to os_dep/xmit_linux.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 2 --
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index ea4d34678b9c..6403a11d712d 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_xmit_osdep_c_ BIT(1)
#define _module_rtl871x_recv_c_ BIT(2)
#define _module_recv_osdep_c_ BIT(3)
#define _module_rtl871x_mlme_c_ BIT(4)
@@ -42,9 +41,7 @@

#undef _MODULE_DEFINE_

-#if defined _XMIT_OSDEP_C_
- #define _MODULE_DEFINE_ _module_xmit_osdep_c_
-#elif defined _RTW_RECV_C_
+#if defined _RTW_RECV_C_
#define _MODULE_DEFINE_ _module_rtl871x_recv_c_
#elif defined _RECV_OSDEP_C_
#define _MODULE_DEFINE_ _module_recv_osdep_c_
diff --git a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
index 639408eaf4df..6b039c1d8d57 100644
--- a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
@@ -4,8 +4,6 @@
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-#define _XMIT_OSDEP_C_
-
#include <drv_types.h>
#include <rtw_debug.h>

--
2.20.1

2021-04-24 09:05:50

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 14/50] staging: rtl8723bs: remove debug macros related to core/rtw_xmit.c tracing

remove debug macros definitions related to core/rtw_xmit.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_xmit.c | 2 --
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index bd3acdd7d75f..03d036bd2ac6 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -4,8 +4,6 @@
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-#define _RTW_XMIT_C_
-
#include <drv_types.h>
#include <rtw_debug.h>

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 8f56d1e7e644..ea4d34678b9c 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_rtl871x_xmit_c_ BIT(0)
#define _module_xmit_osdep_c_ BIT(1)
#define _module_rtl871x_recv_c_ BIT(2)
#define _module_recv_osdep_c_ BIT(3)
@@ -43,9 +42,7 @@

#undef _MODULE_DEFINE_

-#if defined _RTW_XMIT_C_
- #define _MODULE_DEFINE_ _module_rtl871x_xmit_c_
-#elif defined _XMIT_OSDEP_C_
+#if defined _XMIT_OSDEP_C_
#define _MODULE_DEFINE_ _module_xmit_osdep_c_
#elif defined _RTW_RECV_C_
#define _MODULE_DEFINE_ _module_rtl871x_recv_c_
--
2.20.1

2021-04-24 09:05:52

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 16/50] staging: rtl8723bs: remove debug macros related to core/rtw_recv.c tracing

remove debug macros definitions related to core/rtw_recv.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_recv.c | 2 --
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index 668a703dee7f..7432def1eb6f 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -4,8 +4,6 @@
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-#define _RTW_RECV_C_
-
#include <drv_types.h>
#include <rtw_debug.h>
#include <linux/jiffies.h>
diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 6403a11d712d..422d6bcfcc6f 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_rtl871x_recv_c_ BIT(2)
#define _module_recv_osdep_c_ BIT(3)
#define _module_rtl871x_mlme_c_ BIT(4)
#define _module_mlme_osdep_c_ BIT(5)
@@ -41,9 +40,7 @@

#undef _MODULE_DEFINE_

-#if defined _RTW_RECV_C_
- #define _MODULE_DEFINE_ _module_rtl871x_recv_c_
-#elif defined _RECV_OSDEP_C_
+#if defined _RECV_OSDEP_C_
#define _MODULE_DEFINE_ _module_recv_osdep_c_
#elif defined _RTW_MLME_C_
#define _MODULE_DEFINE_ _module_rtl871x_mlme_c_
--
2.20.1

2021-04-24 09:05:57

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 17/50] staging: rtl8723bs: remove debug macros related to os_dep/recv_linux.c tracing

remove debug macros definitions related to os_dep/recv_linux.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
drivers/staging/rtl8723bs/os_dep/recv_linux.c | 2 --
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 422d6bcfcc6f..d04f116bc9a4 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_recv_osdep_c_ BIT(3)
#define _module_rtl871x_mlme_c_ BIT(4)
#define _module_mlme_osdep_c_ BIT(5)
#define _module_rtl871x_sta_mgt_c_ BIT(6)
@@ -40,9 +39,7 @@

#undef _MODULE_DEFINE_

-#if defined _RECV_OSDEP_C_
- #define _MODULE_DEFINE_ _module_recv_osdep_c_
-#elif defined _RTW_MLME_C_
+#if defined _RTW_MLME_C_
#define _MODULE_DEFINE_ _module_rtl871x_mlme_c_
#elif defined _MLME_OSDEP_C_
#define _MODULE_DEFINE_ _module_mlme_osdep_c_
diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c
index cd51430d4618..88a69c7ca8f2 100644
--- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c
@@ -4,8 +4,6 @@
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-#define _RECV_OSDEP_C_
-
#include <drv_types.h>
#include <rtw_debug.h>
#include <linux/jiffies.h>
--
2.20.1

2021-04-24 09:06:04

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 20/50] staging: rtl8723bs: move static array definition from header to .c file

move static array definition from header to .c file.
This prepare removal of a conditional compile block
_RTW_MLME_EXT_C_.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 30 +++++++++++++++++
.../staging/rtl8723bs/include/rtw_mlme_ext.h | 32 -------------------
2 files changed, 30 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 9031cf7657ae..1ff2b3a28bab 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -5997,6 +5997,36 @@ u8 set_tx_beacon_cmd(struct adapter *padapter)
return res;
}

+static struct fwevent wlanevents[] = {
+ {0, rtw_dummy_event_callback}, /*0*/
+ {0, NULL},
+ {0, NULL},
+ {0, NULL},
+ {0, NULL},
+ {0, NULL},
+ {0, NULL},
+ {0, NULL},
+ {0, &rtw_survey_event_callback}, /*8*/
+ {sizeof(struct surveydone_event), &rtw_surveydone_event_callback}, /*9*/
+
+ {0, &rtw_joinbss_event_callback}, /*10*/
+ {sizeof(struct stassoc_event), &rtw_stassoc_event_callback},
+ {sizeof(struct stadel_event), &rtw_stadel_event_callback},
+ {0, &rtw_atimdone_event_callback},
+ {0, rtw_dummy_event_callback},
+ {0, NULL}, /*15*/
+ {0, NULL},
+ {0, NULL},
+ {0, NULL},
+ {0, rtw_fwdbg_event_callback},
+ {0, NULL}, /*20*/
+ {0, NULL},
+ {0, NULL},
+ {0, &rtw_cpwm_event_callback},
+ {0, NULL},
+ {0, &rtw_wmm_event_callback},
+
+};

u8 mlme_evt_hdl(struct adapter *padapter, unsigned char *pbuf)
{
diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
index 472818c5fd83..0248b91b4525 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
@@ -805,38 +805,6 @@ enum {

#ifdef _RTW_MLME_EXT_C_

-static struct fwevent wlanevents[] =
-{
- {0, rtw_dummy_event_callback}, /*0*/
- {0, NULL},
- {0, NULL},
- {0, NULL},
- {0, NULL},
- {0, NULL},
- {0, NULL},
- {0, NULL},
- {0, &rtw_survey_event_callback}, /*8*/
- {sizeof(struct surveydone_event), &rtw_surveydone_event_callback}, /*9*/
-
- {0, &rtw_joinbss_event_callback}, /*10*/
- {sizeof(struct stassoc_event), &rtw_stassoc_event_callback},
- {sizeof(struct stadel_event), &rtw_stadel_event_callback},
- {0, &rtw_atimdone_event_callback},
- {0, rtw_dummy_event_callback},
- {0, NULL}, /*15*/
- {0, NULL},
- {0, NULL},
- {0, NULL},
- {0, rtw_fwdbg_event_callback},
- {0, NULL}, /*20*/
- {0, NULL},
- {0, NULL},
- {0, &rtw_cpwm_event_callback},
- {0, NULL},
- {0, &rtw_wmm_event_callback},
-
-};
-
#endif/* _RTL8192C_CMD_C_ */

#endif
--
2.20.1

2021-04-24 09:06:08

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 21/50] staging: rtl8723bs: remove debug macros related to core/rtw_mlme_ext.c tracing

remove debug macro definitions related to core/rtw_mlme_ext.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 --
drivers/staging/rtl8723bs/include/rtw_debug.h | 4 +---
2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 1ff2b3a28bab..3e4dc44c8599 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -4,8 +4,6 @@
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-#define _RTW_MLME_EXT_C_
-
#include <drv_types.h>
#include <rtw_debug.h>
#include <rtw_wifi_regd.h>
diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 7f5b98578d60..d51e22ee1328 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -37,9 +37,7 @@

#undef _MODULE_DEFINE_

-#if defined _RTW_MLME_EXT_C_
- #define _MODULE_DEFINE_ 1
-#elif defined _RTW_STA_MGT_C_
+#if defined _RTW_STA_MGT_C_
#define _MODULE_DEFINE_ _module_rtl871x_sta_mgt_c_
#elif defined _RTW_CMD_C_
#define _MODULE_DEFINE_ _module_rtl871x_cmd_c_
--
2.20.1

2021-04-24 09:06:15

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 23/50] staging: rtl8723bs: remove debug macros related to core/rtw_cmd.c tracing

remove debug macro definitions related to core/rtw_cmd.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 --
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index e1a8f8b47edd..75db4272e537 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -4,8 +4,6 @@
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-#define _RTW_CMD_C_
-
#include <drv_types.h>
#include <rtw_debug.h>
#include <hal_btcoex.h>
diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 76756f6aac99..bb56d38e6b7a 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_rtl871x_cmd_c_ BIT(7)
#define _module_cmd_osdep_c_ BIT(8)
#define _module_rtl871x_io_c_ BIT(9)
#define _module_io_osdep_c_ BIT(10)
@@ -36,9 +35,7 @@

#undef _MODULE_DEFINE_

-#if defined _RTW_CMD_C_
- #define _MODULE_DEFINE_ _module_rtl871x_cmd_c_
-#elif defined _CMD_OSDEP_C_
+#if defined _CMD_OSDEP_C_
#define _MODULE_DEFINE_ _module_cmd_osdep_c_
#elif defined _RTW_IO_C_
#define _MODULE_DEFINE_ _module_rtl871x_io_c_
--
2.20.1

2021-04-24 09:06:22

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 24/50] staging: rtl8723bs: remove obsolete debug macro definitions

remove debug macro definition untied to any tracing component.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index bb56d38e6b7a..6e6dea4779d9 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_cmd_osdep_c_ BIT(8)
#define _module_rtl871x_io_c_ BIT(9)
#define _module_io_osdep_c_ BIT(10)
#define _module_os_intfs_c_ BIT(11)
@@ -35,9 +34,7 @@

#undef _MODULE_DEFINE_

-#if defined _CMD_OSDEP_C_
- #define _MODULE_DEFINE_ _module_cmd_osdep_c_
-#elif defined _RTW_IO_C_
+#if defined _RTW_IO_C_
#define _MODULE_DEFINE_ _module_rtl871x_io_c_
#elif defined _IO_OSDEP_C_
#define _MODULE_DEFINE_ _module_io_osdep_c_
--
2.20.1

2021-04-24 09:06:26

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 07/50] staging: rtl8723bs: remove unused bb_reg_dump() function argument

remove unused function argument void *sel from bb_reg_dump.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_debug.c | 2 +-
drivers/staging/rtl8723bs/include/rtw_debug.h | 2 +-
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_debug.c b/drivers/staging/rtl8723bs/core/rtw_debug.c
index ad3cdbe45e55..9dfa71580b2e 100644
--- a/drivers/staging/rtl8723bs/core/rtw_debug.c
+++ b/drivers/staging/rtl8723bs/core/rtw_debug.c
@@ -36,7 +36,7 @@ void mac_reg_dump(struct adapter *adapter)
dump_4_regs(adapter, i);
}

-void bb_reg_dump(void *sel, struct adapter *adapter)
+void bb_reg_dump(struct adapter *adapter)
{
int i;

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index eabc21d2b689..6064de93c24c 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -149,7 +149,7 @@
#endif /* defined(_dbgdump) */

void mac_reg_dump(struct adapter *adapter);
-void bb_reg_dump(void *sel, struct adapter *adapter);
+void bb_reg_dump(struct adapter *adapter);
void rf_reg_dump(void *sel, struct adapter *adapter);

#endif /* __RTW_DEBUG_H__ */
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index 7951c362d664..fa260714b588 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -2736,7 +2736,7 @@ static int rtw_dbg_port(struct net_device *dev,
if (extra_arg == 0)
mac_reg_dump(padapter);
else if (extra_arg == 1)
- bb_reg_dump(RTW_DBGDUMP, padapter);
+ bb_reg_dump(padapter);
else if (extra_arg == 2)
rf_reg_dump(RTW_DBGDUMP, padapter);
}
--
2.20.1

2021-04-24 09:06:31

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 25/50] staging: rtl8723bs: remove debug macros related to core/rtw_io.c tracing

remove debug macro definitions related to core/rtw_io.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_io.c | 2 --
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_io.c b/drivers/staging/rtl8723bs/core/rtw_io.c
index c860ab7d618c..ecbb679fbc16 100644
--- a/drivers/staging/rtl8723bs/core/rtw_io.c
+++ b/drivers/staging/rtl8723bs/core/rtw_io.c
@@ -25,8 +25,6 @@ [email protected]

*/

-#define _RTW_IO_C_
-
#include <drv_types.h>
#include <rtw_debug.h>

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 6e6dea4779d9..7206fdfbe12d 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_rtl871x_io_c_ BIT(9)
#define _module_io_osdep_c_ BIT(10)
#define _module_os_intfs_c_ BIT(11)
#define _module_rtl871x_security_c_ BIT(12)
@@ -34,9 +33,7 @@

#undef _MODULE_DEFINE_

-#if defined _RTW_IO_C_
- #define _MODULE_DEFINE_ _module_rtl871x_io_c_
-#elif defined _IO_OSDEP_C_
+#if defined _IO_OSDEP_C_
#define _MODULE_DEFINE_ _module_io_osdep_c_
#elif defined _OS_INTFS_C_
#define _MODULE_DEFINE_ _module_os_intfs_c_
--
2.20.1

2021-04-24 09:06:40

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 26/50] staging: rtl8723bs: remove obsolete _IO_OSDEP_C_ debug macro definition

remove _IO_OSDEP_C_ debug macro definition
untied to any tracing component.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 7206fdfbe12d..470edb0b655b 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_io_osdep_c_ BIT(10)
#define _module_os_intfs_c_ BIT(11)
#define _module_rtl871x_security_c_ BIT(12)
#define _module_rtl871x_eeprom_c_ BIT(13)
@@ -33,9 +32,7 @@

#undef _MODULE_DEFINE_

-#if defined _IO_OSDEP_C_
- #define _MODULE_DEFINE_ _module_io_osdep_c_
-#elif defined _OS_INTFS_C_
+#if defined _OS_INTFS_C_
#define _MODULE_DEFINE_ _module_os_intfs_c_
#elif defined _RTW_SECURITY_C_
#define _MODULE_DEFINE_ _module_rtl871x_security_c_
--
2.20.1

2021-04-24 09:06:49

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 28/50] staging: rtl8723bs: remove debug macros related to core/rtw_security.c tracing

remove debug macro definitions related to core/rtw_security.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_security.c | 2 --
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
index 7823055ed32d..43422e8ad578 100644
--- a/drivers/staging/rtl8723bs/core/rtw_security.c
+++ b/drivers/staging/rtl8723bs/core/rtw_security.c
@@ -4,8 +4,6 @@
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-#define _RTW_SECURITY_C_
-
#include <linux/crc32poly.h>
#include <drv_types.h>
#include <rtw_debug.h>
diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index f7c2d9ac3a61..70bfe24d9e0c 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_rtl871x_security_c_ BIT(12)
#define _module_rtl871x_eeprom_c_ BIT(13)
#define _module_hal_init_c_ BIT(14)
#define _module_hci_hal_init_c_ BIT(15)
@@ -31,9 +30,7 @@

#undef _MODULE_DEFINE_

-#if defined _RTW_SECURITY_C_
- #define _MODULE_DEFINE_ _module_rtl871x_security_c_
-#elif defined _RTW_EEPROM_C_
+#if defined _RTW_EEPROM_C_
#define _MODULE_DEFINE_ _module_rtl871x_eeprom_c_
#elif defined _HAL_INTF_C_
#define _MODULE_DEFINE_ _module_hal_init_c_
--
2.20.1

2021-04-24 09:07:03

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 29/50] staging: rtl8723bs: remove debug macros related to core/rtw_eeprom.c tracing

remove debug macro definitions related to core/rtw_eeprom.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_eeprom.c | 2 --
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_eeprom.c b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
index be0eda1604d0..4dcee4d2e513 100644
--- a/drivers/staging/rtl8723bs/core/rtw_eeprom.c
+++ b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
@@ -4,8 +4,6 @@
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-#define _RTW_EEPROM_C_
-
#include <drv_conf.h>
#include <osdep_service.h>
#include <drv_types.h>
diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 70bfe24d9e0c..8a4ee840434e 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_rtl871x_eeprom_c_ BIT(13)
#define _module_hal_init_c_ BIT(14)
#define _module_hci_hal_init_c_ BIT(15)
#define _module_rtl871x_ioctl_c_ BIT(16)
@@ -30,9 +29,7 @@

#undef _MODULE_DEFINE_

-#if defined _RTW_EEPROM_C_
- #define _MODULE_DEFINE_ _module_rtl871x_eeprom_c_
-#elif defined _HAL_INTF_C_
+#if defined _HAL_INTF_C_
#define _MODULE_DEFINE_ _module_hal_init_c_
#elif (defined _HCI_HAL_INIT_C_) || (defined _SDIO_HALINIT_C_)
#define _MODULE_DEFINE_ _module_hci_hal_init_c_
--
2.20.1

2021-04-24 09:07:07

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 19/50] staging: rtl8723bs: remove debug macros related to os_dep/mlme_linux.c tracing

remove debug macro definitions related to os_dep/mlme_linux.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
drivers/staging/rtl8723bs/os_dep/mlme_linux.c | 4 ----
2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 01d723268254..7f5b98578d60 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_mlme_osdep_c_ BIT(5)
#define _module_rtl871x_sta_mgt_c_ BIT(6)
#define _module_rtl871x_cmd_c_ BIT(7)
#define _module_cmd_osdep_c_ BIT(8)
@@ -38,9 +37,7 @@

#undef _MODULE_DEFINE_

-#if defined _MLME_OSDEP_C_
- #define _MODULE_DEFINE_ _module_mlme_osdep_c_
-#elif defined _RTW_MLME_EXT_C_
+#if defined _RTW_MLME_EXT_C_
#define _MODULE_DEFINE_ 1
#elif defined _RTW_STA_MGT_C_
#define _MODULE_DEFINE_ _module_rtl871x_sta_mgt_c_
diff --git a/drivers/staging/rtl8723bs/os_dep/mlme_linux.c b/drivers/staging/rtl8723bs/os_dep/mlme_linux.c
index 0a16752f805b..a4560ba22db1 100644
--- a/drivers/staging/rtl8723bs/os_dep/mlme_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/mlme_linux.c
@@ -4,10 +4,6 @@
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-
-
-#define _MLME_OSDEP_C_
-
#include <drv_types.h>
#include <rtw_debug.h>

--
2.20.1

2021-04-24 09:07:09

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 09/50] staging: rtl8723bs: remove unused RTW_DBGDUMP macro definition

remove unused RTW_DBGDUMP macro definition.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index fc187a4ed2c3..c7e8187ca7f5 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -144,8 +144,6 @@

#if defined(_dbgdump)

-#define RTW_DBGDUMP NULL /* 'stream' for _dbgdump */
-
#endif /* defined(_dbgdump) */

void mac_reg_dump(struct adapter *adapter);
--
2.20.1

2021-04-24 09:07:11

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 31/50] staging: rtl8723bs: remove debug macros related to hal/sdio_halinit.c tracing

remove debug macro definitions related to hal/sdio_halinit.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 2 --
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index abd90026a8c7..7c52c90d1566 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -4,8 +4,6 @@
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-#define _SDIO_HALINIT_C_
-
#include <drv_types.h>
#include <rtw_debug.h>
#include <rtl8723b_hal.h>
diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 4da881e3a0c0..4146acb1cbb2 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_hci_hal_init_c_ BIT(15)
#define _module_rtl871x_ioctl_c_ BIT(16)
#define _module_rtl871x_ioctl_set_c_ BIT(17)
#define _module_rtl871x_ioctl_query_c_ BIT(18)
@@ -28,9 +27,7 @@

#undef _MODULE_DEFINE_

-#if (defined _HCI_HAL_INIT_C_) || (defined _SDIO_HALINIT_C_)
- #define _MODULE_DEFINE_ _module_hci_hal_init_c_
-#elif defined _RTL871X_IOCTL_C_
+#if defined _RTL871X_IOCTL_C_
#define _MODULE_DEFINE_ _module_rtl871x_ioctl_c_
#elif defined _RTL871X_IOCTL_SET_C_
#define _MODULE_DEFINE_ _module_rtl871x_ioctl_set_c_
--
2.20.1

2021-04-24 09:07:23

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 34/50] staging: rtl8723bs: remove unused debug macros tied to _RTL871X_IOCTL_QUERY_C_ definition

remove unused debug macros tied to
_RTL871X_IOCTL_QUERY_C_ definition.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 7f84bc03e9c7..be44d72599d3 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_rtl871x_ioctl_query_c_ BIT(18)
#define _module_rtl871x_pwrctrl_c_ BIT(19)
#define _module_hci_intfs_c_ BIT(20)
#define _module_hci_ops_c_ BIT(21)
@@ -25,9 +24,7 @@

#undef _MODULE_DEFINE_

-#if defined _RTL871X_IOCTL_QUERY_C_
- #define _MODULE_DEFINE_ _module_rtl871x_ioctl_query_c_
-#elif defined _RTL871X_PWRCTRL_C_
+#if defined _RTL871X_PWRCTRL_C_
#define _MODULE_DEFINE_ _module_rtl871x_pwrctrl_c_
#elif defined _RTW_PWRCTRL_C_
#define _MODULE_DEFINE_ 1
--
2.20.1

2021-04-24 09:07:48

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 38/50] staging: rtl8723bs: remove unused debug macros tied to _HCI_OPS_C_ definition

remove unused debug macros tied to
_HCI_OPS_C_ definition.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 130cfe3d2032..3becb1b8d15e 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_hci_ops_c_ BIT(21)
#define _module_osdep_service_c_ BIT(22)
#define _module_mp_ BIT(23)
#define _module_hci_ops_os_c_ BIT(24)
@@ -22,9 +21,7 @@

#undef _MODULE_DEFINE_

-#if defined _HCI_OPS_C_
- #define _MODULE_DEFINE_ _module_hci_ops_c_
-#elif defined _SDIO_OPS_C_
+#if defined _SDIO_OPS_C_
#define _MODULE_DEFINE_ 1
#elif defined _OSDEP_SERVICE_C_
#define _MODULE_DEFINE_ _module_osdep_service_c_
--
2.20.1

2021-04-24 09:07:54

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 39/50] staging: rtl8723bs: remove unused debug macros tied to hal/sdio_ops.c debug

remove unused debug macros tied to
hal/sdio_ops.c debug.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/hal/sdio_ops.c | 2 --
drivers/staging/rtl8723bs/include/rtw_debug.h | 4 +---
2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c
index a31694525bc1..b5434ab71578 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
@@ -4,8 +4,6 @@
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
*
*******************************************************************************/
-#define _SDIO_OPS_C_
-
#include <drv_types.h>
#include <rtw_debug.h>
#include <rtl8723b_hal.h>
diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 3becb1b8d15e..c061d874f4e6 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -21,9 +21,7 @@

#undef _MODULE_DEFINE_

-#if defined _SDIO_OPS_C_
- #define _MODULE_DEFINE_ 1
-#elif defined _OSDEP_SERVICE_C_
+#if defined _OSDEP_SERVICE_C_
#define _MODULE_DEFINE_ _module_osdep_service_c_
#elif defined _HCI_OPS_OS_C_
#define _MODULE_DEFINE_ _module_hci_ops_os_c_
--
2.20.1

2021-04-24 09:07:54

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 18/50] staging: rtl8723bs: remove debug macros related to core/rtw_mlme.c tracing

remove debug macro definitions related to core/rtw_mlme.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 --
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 4707dba90397..569943a09848 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -4,8 +4,6 @@
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-#define _RTW_MLME_C_
-
#include <linux/etherdevice.h>
#include <drv_types.h>
#include <rtw_debug.h>
diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index d04f116bc9a4..01d723268254 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_rtl871x_mlme_c_ BIT(4)
#define _module_mlme_osdep_c_ BIT(5)
#define _module_rtl871x_sta_mgt_c_ BIT(6)
#define _module_rtl871x_cmd_c_ BIT(7)
@@ -39,9 +38,7 @@

#undef _MODULE_DEFINE_

-#if defined _RTW_MLME_C_
- #define _MODULE_DEFINE_ _module_rtl871x_mlme_c_
-#elif defined _MLME_OSDEP_C_
+#if defined _MLME_OSDEP_C_
#define _MODULE_DEFINE_ _module_mlme_osdep_c_
#elif defined _RTW_MLME_EXT_C_
#define _MODULE_DEFINE_ 1
--
2.20.1

2021-04-24 09:07:54

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 40/50] staging: rtl8723bs: remove unused debug macros tied to os_dep/osdep_service.c debug

remove unused debug macros tied to
os_dep/osdep_service.c debug.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
drivers/staging/rtl8723bs/os_dep/osdep_service.c | 4 ----
2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index c061d874f4e6..3e391a23ac8f 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_osdep_service_c_ BIT(22)
#define _module_mp_ BIT(23)
#define _module_hci_ops_os_c_ BIT(24)
#define _module_rtl871x_ioctl_os_c BIT(25)
@@ -21,9 +20,7 @@

#undef _MODULE_DEFINE_

-#if defined _OSDEP_SERVICE_C_
- #define _MODULE_DEFINE_ _module_osdep_service_c_
-#elif defined _HCI_OPS_OS_C_
+#if defined _HCI_OPS_OS_C_
#define _MODULE_DEFINE_ _module_hci_ops_os_c_
#elif defined _RTL871X_IOCTL_LINUX_C_
#define _MODULE_DEFINE_ _module_rtl871x_ioctl_os_c
diff --git a/drivers/staging/rtl8723bs/os_dep/osdep_service.c b/drivers/staging/rtl8723bs/os_dep/osdep_service.c
index 9c6b1666df13..c58555a4012f 100644
--- a/drivers/staging/rtl8723bs/os_dep/osdep_service.c
+++ b/drivers/staging/rtl8723bs/os_dep/osdep_service.c
@@ -4,10 +4,6 @@
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-
-
-#define _OSDEP_SERVICE_C_
-
#include <drv_types.h>
#include <rtw_debug.h>

--
2.20.1

2021-04-24 09:09:53

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 22/50] staging: rtl8723bs: remove debug macros related to core/rtw_sta_mgt.c tracing

remove debug macro definitions related to core/rtw_sta_mgt.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 2 --
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
index 85663182b388..c056a0ada060 100644
--- a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
+++ b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
@@ -4,8 +4,6 @@
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-#define _RTW_STA_MGT_C_
-
#include <drv_types.h>
#include <rtw_debug.h>

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index d51e22ee1328..76756f6aac99 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_rtl871x_sta_mgt_c_ BIT(6)
#define _module_rtl871x_cmd_c_ BIT(7)
#define _module_cmd_osdep_c_ BIT(8)
#define _module_rtl871x_io_c_ BIT(9)
@@ -37,9 +36,7 @@

#undef _MODULE_DEFINE_

-#if defined _RTW_STA_MGT_C_
- #define _MODULE_DEFINE_ _module_rtl871x_sta_mgt_c_
-#elif defined _RTW_CMD_C_
+#if defined _RTW_CMD_C_
#define _MODULE_DEFINE_ _module_rtl871x_cmd_c_
#elif defined _CMD_OSDEP_C_
#define _MODULE_DEFINE_ _module_cmd_osdep_c_
--
2.20.1

2021-04-24 09:09:53

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 41/50] staging: rtl8723bs: remove unused _module_mp_ def

remove unused _module_mp_ def.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 3e391a23ac8f..261317b07635 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_mp_ BIT(23)
#define _module_hci_ops_os_c_ BIT(24)
#define _module_rtl871x_ioctl_os_c BIT(25)
#define _module_rtl8712_cmd_c_ BIT(26)
--
2.20.1

2021-04-24 09:10:15

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 27/50] staging: rtl8723bs: remove debug macros related to os_dep/os_intfs.c tracing

remove debug macro definitions related to os_dep/os_intfs.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
drivers/staging/rtl8723bs/os_dep/os_intfs.c | 2 --
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 470edb0b655b..f7c2d9ac3a61 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_os_intfs_c_ BIT(11)
#define _module_rtl871x_security_c_ BIT(12)
#define _module_rtl871x_eeprom_c_ BIT(13)
#define _module_hal_init_c_ BIT(14)
@@ -32,9 +31,7 @@

#undef _MODULE_DEFINE_

-#if defined _OS_INTFS_C_
- #define _MODULE_DEFINE_ _module_os_intfs_c_
-#elif defined _RTW_SECURITY_C_
+#if defined _RTW_SECURITY_C_
#define _MODULE_DEFINE_ _module_rtl871x_security_c_
#elif defined _RTW_EEPROM_C_
#define _MODULE_DEFINE_ _module_rtl871x_eeprom_c_
diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 160f624612c7..6ac78a9ae615 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -4,8 +4,6 @@
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-#define _OS_INTFS_C_
-
#include <drv_types.h>
#include <rtw_debug.h>
#include <hal_data.h>
--
2.20.1

2021-04-24 09:10:38

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 32/50] staging: rtl8723bs: remove unused debug macros tied to _RTL871X_IOCTL_C_ definition

remove unused private debug macros tied to
_RTL871X_IOCTL_C_ definition.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 4146acb1cbb2..501155c8c9cf 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_rtl871x_ioctl_c_ BIT(16)
#define _module_rtl871x_ioctl_set_c_ BIT(17)
#define _module_rtl871x_ioctl_query_c_ BIT(18)
#define _module_rtl871x_pwrctrl_c_ BIT(19)
@@ -27,9 +26,7 @@

#undef _MODULE_DEFINE_

-#if defined _RTL871X_IOCTL_C_
- #define _MODULE_DEFINE_ _module_rtl871x_ioctl_c_
-#elif defined _RTL871X_IOCTL_SET_C_
+#if defined _RTL871X_IOCTL_SET_C_
#define _MODULE_DEFINE_ _module_rtl871x_ioctl_set_c_
#elif defined _RTL871X_IOCTL_QUERY_C_
#define _MODULE_DEFINE_ _module_rtl871x_ioctl_query_c_
--
2.20.1

2021-04-24 09:10:39

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 30/50] staging: rtl8723bs: remove debug macros related to hal/hal_intf.c tracing

remove debug macro definitions related to hal/hal_intf.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/hal/hal_intf.c | 3 ---
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c b/drivers/staging/rtl8723bs/hal/hal_intf.c
index 8dc4dd8c6d4c..4868a69cdb8f 100644
--- a/drivers/staging/rtl8723bs/hal/hal_intf.c
+++ b/drivers/staging/rtl8723bs/hal/hal_intf.c
@@ -4,9 +4,6 @@
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-
-#define _HAL_INTF_C_
-
#include <drv_types.h>
#include <rtw_debug.h>
#include <hal_data.h>
diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 8a4ee840434e..4da881e3a0c0 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_hal_init_c_ BIT(14)
#define _module_hci_hal_init_c_ BIT(15)
#define _module_rtl871x_ioctl_c_ BIT(16)
#define _module_rtl871x_ioctl_set_c_ BIT(17)
@@ -29,9 +28,7 @@

#undef _MODULE_DEFINE_

-#if defined _HAL_INTF_C_
- #define _MODULE_DEFINE_ _module_hal_init_c_
-#elif (defined _HCI_HAL_INIT_C_) || (defined _SDIO_HALINIT_C_)
+#if (defined _HCI_HAL_INIT_C_) || (defined _SDIO_HALINIT_C_)
#define _MODULE_DEFINE_ _module_hci_hal_init_c_
#elif defined _RTL871X_IOCTL_C_
#define _MODULE_DEFINE_ _module_rtl871x_ioctl_c_
--
2.20.1

2021-04-24 09:10:58

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 43/50] staging: rtl8723bs: remove unused macros tied to _RTL871X_IOCTL_LINUX_C definition

remove unused macros tied to
_RTL871X_IOCTL_LINUX_C_ definition.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index a6c2956133ed..550cff9b1147 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_rtl871x_ioctl_os_c BIT(25)
#define _module_rtl8712_cmd_c_ BIT(26)
/* define _module_efuse_ BIT(27) */
#define _module_rtl8192c_xmit_c_ BIT(28)
@@ -18,9 +17,7 @@

#undef _MODULE_DEFINE_

-#if defined _RTL871X_IOCTL_LINUX_C_
- #define _MODULE_DEFINE_ _module_rtl871x_ioctl_os_c
-#elif defined _RTL8712_CMD_C_
+#if defined _RTL8712_CMD_C_
#define _MODULE_DEFINE_ _module_rtl8712_cmd_c_
#elif defined _RTL8192C_XMIT_C_
#define _MODULE_DEFINE_ 1
--
2.20.1

2021-04-24 09:10:59

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 36/50] staging: rtl8723bs: remove unused macros tied to core/rtw_pwrctrl.c debug

remove unused macro definitions tied to
core/rtw_pwrctrl.c debug.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 2 --
drivers/staging/rtl8723bs/include/rtw_debug.h | 4 +---
2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 251b9abdf591..a392d5b4caf2 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -4,8 +4,6 @@
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-#define _RTW_PWRCTRL_C_
-
#include <drv_types.h>
#include <rtw_debug.h>
#include <hal_data.h>
diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 8e324313ebf9..a7f6827c282f 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -23,9 +23,7 @@

#undef _MODULE_DEFINE_

-#if defined _RTW_PWRCTRL_C_
- #define _MODULE_DEFINE_ 1
-#elif defined _HCI_INTF_C_
+#if defined _HCI_INTF_C_
#define _MODULE_DEFINE_ _module_hci_intfs_c_
#elif defined _HCI_OPS_C_
#define _MODULE_DEFINE_ _module_hci_ops_c_
--
2.20.1

2021-04-24 09:11:00

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 33/50] staging: rtl8723bs: remove unused debug macros tied to _RTL871X_IOCTL_SET_C_ definition

remove unused debug macros tied to
_RTL871X_IOCTL_SET_C_ definition.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 501155c8c9cf..7f84bc03e9c7 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_rtl871x_ioctl_set_c_ BIT(17)
#define _module_rtl871x_ioctl_query_c_ BIT(18)
#define _module_rtl871x_pwrctrl_c_ BIT(19)
#define _module_hci_intfs_c_ BIT(20)
@@ -26,9 +25,7 @@

#undef _MODULE_DEFINE_

-#if defined _RTL871X_IOCTL_SET_C_
- #define _MODULE_DEFINE_ _module_rtl871x_ioctl_set_c_
-#elif defined _RTL871X_IOCTL_QUERY_C_
+#if defined _RTL871X_IOCTL_QUERY_C_
#define _MODULE_DEFINE_ _module_rtl871x_ioctl_query_c_
#elif defined _RTL871X_PWRCTRL_C_
#define _MODULE_DEFINE_ _module_rtl871x_pwrctrl_c_
--
2.20.1

2021-04-24 09:11:01

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 35/50] staging: rtl8723bs: remove unused debug macros tied to _RTL871X_PWRCTRL_C_ definition

remove unused debug macros tied to
_RTL871X_PWRCTRL_C_ definition.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index be44d72599d3..8e324313ebf9 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_rtl871x_pwrctrl_c_ BIT(19)
#define _module_hci_intfs_c_ BIT(20)
#define _module_hci_ops_c_ BIT(21)
#define _module_osdep_service_c_ BIT(22)
@@ -24,9 +23,7 @@

#undef _MODULE_DEFINE_

-#if defined _RTL871X_PWRCTRL_C_
- #define _MODULE_DEFINE_ _module_rtl871x_pwrctrl_c_
-#elif defined _RTW_PWRCTRL_C_
+#if defined _RTW_PWRCTRL_C_
#define _MODULE_DEFINE_ 1
#elif defined _HCI_INTF_C_
#define _MODULE_DEFINE_ _module_hci_intfs_c_
--
2.20.1

2021-04-24 09:11:25

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 37/50] staging: rtl8723bs: remove unused macros tied to os_dep/sdio_intf.c debug

remove unused macro definitions tied to
os_dep/sdio_intf.c debug.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 7 +------
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 2 --
2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index a7f6827c282f..130cfe3d2032 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_hci_intfs_c_ BIT(20)
#define _module_hci_ops_c_ BIT(21)
#define _module_osdep_service_c_ BIT(22)
#define _module_mp_ BIT(23)
@@ -23,14 +22,10 @@

#undef _MODULE_DEFINE_

-#if defined _HCI_INTF_C_
- #define _MODULE_DEFINE_ _module_hci_intfs_c_
-#elif defined _HCI_OPS_C_
+#if defined _HCI_OPS_C_
#define _MODULE_DEFINE_ _module_hci_ops_c_
#elif defined _SDIO_OPS_C_
#define _MODULE_DEFINE_ 1
-#elif defined _OSDEP_HCI_INTF_C_
- #define _MODULE_DEFINE_ _module_hci_intfs_c_
#elif defined _OSDEP_SERVICE_C_
#define _MODULE_DEFINE_ _module_osdep_service_c_
#elif defined _HCI_OPS_OS_C_
diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index d2bf444117b8..5e484344e172 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -4,8 +4,6 @@
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-#define _HCI_INTF_C_
-
#include <drv_types.h>
#include <rtw_debug.h>
#include <hal_btcoex.h>
--
2.20.1

2021-04-24 09:11:46

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 45/50] staging: rtl8723bs: remove commented out macro definition

remove commented out debug macro definition.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 1a52200e525c..cde4b1d6a4b7 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-/* define _module_efuse_ BIT(27) */
#define _module_rtl8192c_xmit_c_ BIT(28)
#define _module_hal_xmit_c_ BIT(28)
#define _module_efuse_ BIT(29)
--
2.20.1

2021-04-24 09:11:47

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 44/50] staging: rtl8723bs: remove unused macros tied to _RTL8712_CMD_C_ definition

remove unused macros tied to
_RTL8712_CMD_C_ definition.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 550cff9b1147..1a52200e525c 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_rtl8712_cmd_c_ BIT(26)
/* define _module_efuse_ BIT(27) */
#define _module_rtl8192c_xmit_c_ BIT(28)
#define _module_hal_xmit_c_ BIT(28)
@@ -17,9 +16,7 @@

#undef _MODULE_DEFINE_

-#if defined _RTL8712_CMD_C_
- #define _MODULE_DEFINE_ _module_rtl8712_cmd_c_
-#elif defined _RTL8192C_XMIT_C_
+#if defined _RTL8192C_XMIT_C_
#define _MODULE_DEFINE_ 1
#elif defined _RTL8723AS_XMIT_C_
#define _MODULE_DEFINE_ 1
--
2.20.1

2021-04-24 09:11:49

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 42/50] staging: rtl8723bs: remove unused macros tied to _HCI_OPS_OS_C_ definition

remove unused macros tied to
_HCI_OPS_OS_C_ definition.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 261317b07635..a6c2956133ed 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_hci_ops_os_c_ BIT(24)
#define _module_rtl871x_ioctl_os_c BIT(25)
#define _module_rtl8712_cmd_c_ BIT(26)
/* define _module_efuse_ BIT(27) */
@@ -19,9 +18,7 @@

#undef _MODULE_DEFINE_

-#if defined _HCI_OPS_OS_C_
- #define _MODULE_DEFINE_ _module_hci_ops_os_c_
-#elif defined _RTL871X_IOCTL_LINUX_C_
+#if defined _RTL871X_IOCTL_LINUX_C_
#define _MODULE_DEFINE_ _module_rtl871x_ioctl_os_c
#elif defined _RTL8712_CMD_C_
#define _MODULE_DEFINE_ _module_rtl8712_cmd_c_
--
2.20.1

2021-04-24 09:12:39

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 47/50] staging: rtl8723bs: remove unused macros tied to core/rtw_efuse.c debug

remove unused macros tied to core/rtw_efuse.c debug.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_efuse.c | 2 --
drivers/staging/rtl8723bs/include/rtw_debug.h | 3 ---
2 files changed, 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_efuse.c b/drivers/staging/rtl8723bs/core/rtw_efuse.c
index a28a06d5a576..1f22eb4a29fa 100644
--- a/drivers/staging/rtl8723bs/core/rtw_efuse.c
+++ b/drivers/staging/rtl8723bs/core/rtw_efuse.c
@@ -4,8 +4,6 @@
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-#define _RTW_EFUSE_C_
-
#include <drv_types.h>
#include <rtw_debug.h>
#include <hal_data.h>
diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index ad96fe1de971..6b657190b124 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_efuse_ BIT(29)
#define _module_rtl8712_recv_c_ BIT(30)

#undef _MODULE_DEFINE_
@@ -22,8 +21,6 @@
#define _MODULE_DEFINE_ _module_rtl8712_recv_c_
#elif defined _RTL871X_MLME_EXT_C_
#define _MODULE_DEFINE_ _module_mlme_osdep_c_
-#elif defined _RTW_EFUSE_C_
- #define _MODULE_DEFINE_ _module_efuse_
#endif

#define DRIVER_PREFIX "RTL8723BS: "
--
2.20.1

2021-04-24 09:12:39

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 48/50] staging: rtl8723bs: remove unsed debug macros tied to no particular code debug

remove unused debug macros tied to no particular code debug

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 6b657190b124..c9f53c08efbb 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -11,11 +11,7 @@

#undef _MODULE_DEFINE_

-#if defined _RTL8192C_XMIT_C_
- #define _MODULE_DEFINE_ 1
-#elif defined _RTL8723AS_XMIT_C_
- #define _MODULE_DEFINE_ 1
-#elif defined _RTL8712_RECV_C_
+#if defined _RTL8712_RECV_C_
#define _MODULE_DEFINE_ _module_rtl8712_recv_c_
#elif defined _RTL8192CU_RECV_C_
#define _MODULE_DEFINE_ _module_rtl8712_recv_c_
--
2.20.1

2021-04-24 09:12:39

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 46/50] staging: rtl8723bs: remove unused debug macro definitions

remove unused debug macro definitions.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index cde4b1d6a4b7..ad96fe1de971 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,11 +7,8 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_rtl8192c_xmit_c_ BIT(28)
-#define _module_hal_xmit_c_ BIT(28)
#define _module_efuse_ BIT(29)
#define _module_rtl8712_recv_c_ BIT(30)
-#define _module_rtl8712_led_c_ BIT(31)

#undef _MODULE_DEFINE_

--
2.20.1

2021-04-24 09:12:46

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 50/50] staging: rtl8723bs: macro DRIVER_PREFIX expands to lowercase driver name

macro DRIVER_PREFIX expands to lowercase driver name.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index 189f02a8300a..3a5b083e95a1 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,7 +7,7 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define DRIVER_PREFIX "RTL8723BS: "
+#define DRIVER_PREFIX "rtl8723bs: "

void mac_reg_dump(struct adapter *adapter);
void bb_reg_dump(struct adapter *adapter);
--
2.20.1

2021-04-24 09:12:46

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH v2 49/50] staging: rtl8723bs: remove last unused debug macros

remove last unused debug macros.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 12 ------------
1 file changed, 12 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index c9f53c08efbb..189f02a8300a 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -7,18 +7,6 @@
#ifndef __RTW_DEBUG_H__
#define __RTW_DEBUG_H__

-#define _module_rtl8712_recv_c_ BIT(30)
-
-#undef _MODULE_DEFINE_
-
-#if defined _RTL8712_RECV_C_
- #define _MODULE_DEFINE_ _module_rtl8712_recv_c_
-#elif defined _RTL8192CU_RECV_C_
- #define _MODULE_DEFINE_ _module_rtl8712_recv_c_
-#elif defined _RTL871X_MLME_EXT_C_
- #define _MODULE_DEFINE_ _module_mlme_osdep_c_
-#endif
-
#define DRIVER_PREFIX "RTL8723BS: "

void mac_reg_dump(struct adapter *adapter);
--
2.20.1

2021-04-27 11:05:06

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2 50/50] staging: rtl8723bs: macro DRIVER_PREFIX expands to lowercase driver name

On Sat, Apr 24, 2021 at 11:02:33AM +0200, Fabio Aiuto wrote:
> macro DRIVER_PREFIX expands to lowercase driver name.
>
> Signed-off-by: Fabio Aiuto <[email protected]>
> ---
> drivers/staging/rtl8723bs/include/rtw_debug.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
> index 189f02a8300a..3a5b083e95a1 100644
> --- a/drivers/staging/rtl8723bs/include/rtw_debug.h
> +++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
> @@ -7,7 +7,7 @@
> #ifndef __RTW_DEBUG_H__
> #define __RTW_DEBUG_H__
>
> -#define DRIVER_PREFIX "RTL8723BS: "
> +#define DRIVER_PREFIX "rtl8723bs: "

KBUILD_MODNAME should be used here, in the future.

But really, this shouldn't be needed at all, it's kind of pointless (if
it is being used, then odds are the places it is being used is wrong...)

thanks,

greg k-h

2021-04-27 11:08:31

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2 00/50] staging: rtl8723bs: remove all remaining debug macros in rtw_debug.h

On Sat, Apr 24, 2021 at 11:01:43AM +0200, Fabio Aiuto wrote:
> This patchset removes all remaining debug macros in rtw_debug.h
>
> DBG_871X_SEL macro is replaced with netdev_dbg() for it does
> a raw printk call which is not best recommended for a driver.
>
> @@
> expression sel;
> expression list args;
> identifier padapter;
> identifier func;
> @@
>
> func(..., struct adapter *padapter, ...) {
> <...
> - DBG_871X_SEL(sel, args);
> + netdev_dbg(padapter->pnetdev, args);
> ...>
>
> unused _DBG_871X_LEVEL macro declaration is removed.
>
> Beautified register dump in core/rtw_debug.c
>
> Some code cleaning is done and all other private component tracing
> macros are removed.

Nice work, thanks for doing all of this! Now queued up for 5.14-rc1.

greg k-h

2021-04-27 12:42:38

by Fabio Aiuto

[permalink] [raw]
Subject: Re: [PATCH v2 50/50] staging: rtl8723bs: macro DRIVER_PREFIX expands to lowercase driver name

On Tue, Apr 27, 2021 at 01:04:09PM +0200, Greg KH wrote:
> On Sat, Apr 24, 2021 at 11:02:33AM +0200, Fabio Aiuto wrote:
> > macro DRIVER_PREFIX expands to lowercase driver name.
> >
> > Signed-off-by: Fabio Aiuto <[email protected]>
> > ---
> > drivers/staging/rtl8723bs/include/rtw_debug.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
> > index 189f02a8300a..3a5b083e95a1 100644
> > --- a/drivers/staging/rtl8723bs/include/rtw_debug.h
> > +++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
> > @@ -7,7 +7,7 @@
> > #ifndef __RTW_DEBUG_H__
> > #define __RTW_DEBUG_H__
> >
> > -#define DRIVER_PREFIX "RTL8723BS: "
> > +#define DRIVER_PREFIX "rtl8723bs: "
>
> KBUILD_MODNAME should be used here, in the future.

ok, got it

>
> But really, this shouldn't be needed at all, it's kind of pointless (if
> it is being used, then odds are the places it is being used is wrong...)
>
> thanks,
>
> greg k-h

fabio@agape:~/src/git/kernels/staging$ grep -r DRIVER_PREFIX drivers/staging/rtl8723bs/
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c: print_hex_dump_debug(DRIVER_PREFIX ": u1H2CRsvdPageParm:", DUMP_PREFIX_NONE,
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c: print_hex_dump_debug(DRIVER_PREFIX ": u1H2CMediaStatusRptParm:", DUMP_PREFIX_NONE,
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c: print_hex_dump_debug(DRIVER_PREFIX ": u1H2CMacIdConfigParm:", DUMP_PREFIX_NONE,
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c: print_hex_dump_debug(DRIVER_PREFIX ": u1H2CRssiSettingParm:", DUMP_PREFIX_NONE,
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c: print_hex_dump_debug(DRIVER_PREFIX ": u1H2CPwrModeParm:", DUMP_PREFIX_NONE,
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c: print_hex_dump_debug(DRIVER_PREFIX ": u1H2CPsTuneParm:", DUMP_PREFIX_NONE,
drivers/staging/rtl8723bs/hal/hal_com.c: print_hex_dump_debug(DRIVER_PREFIX ": c2h_evt_read(): ", DUMP_PREFIX_NONE,
drivers/staging/rtl8723bs/hal/hal_com.c: print_hex_dump_debug(DRIVER_PREFIX ": c2h_evt_read(): Command Content:\n",
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c: print_hex_dump_debug(DRIVER_PREFIX ": C2HPacketHandler_8723B(): Command Content:\n",
drivers/staging/rtl8723bs/include/rtw_debug.h:#define DRIVER_PREFIX "rtl8723bs: "

When I recently changed the old macro printing hex dump I
decided to keep DRIVER_PREFIX. But I can replace it by
KBUILD_MODNAME.

Thank you,

fabio

2021-04-27 12:43:47

by Fabio Aiuto

[permalink] [raw]
Subject: Re: [PATCH v2 00/50] staging: rtl8723bs: remove all remaining debug macros in rtw_debug.h

On Tue, Apr 27, 2021 at 01:06:23PM +0200, Greg KH wrote:
> On Sat, Apr 24, 2021 at 11:01:43AM +0200, Fabio Aiuto wrote:
> > This patchset removes all remaining debug macros in rtw_debug.h
> >
> > DBG_871X_SEL macro is replaced with netdev_dbg() for it does
> > a raw printk call which is not best recommended for a driver.
> >
> > @@
> > expression sel;
> > expression list args;
> > identifier padapter;
> > identifier func;
> > @@
> >
> > func(..., struct adapter *padapter, ...) {
> > <...
> > - DBG_871X_SEL(sel, args);
> > + netdev_dbg(padapter->pnetdev, args);
> > ...>
> >
> > unused _DBG_871X_LEVEL macro declaration is removed.
> >
> > Beautified register dump in core/rtw_debug.c
> >
> > Some code cleaning is done and all other private component tracing
> > macros are removed.
>
> Nice work, thanks for doing all of this! Now queued up for 5.14-rc1.
>
> greg k-h

thank you all for helping me,

fabio

2021-04-27 14:06:13

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2 50/50] staging: rtl8723bs: macro DRIVER_PREFIX expands to lowercase driver name

On Tue, Apr 27, 2021 at 02:41:35PM +0200, Fabio Aiuto wrote:
> On Tue, Apr 27, 2021 at 01:04:09PM +0200, Greg KH wrote:
> > On Sat, Apr 24, 2021 at 11:02:33AM +0200, Fabio Aiuto wrote:
> > > macro DRIVER_PREFIX expands to lowercase driver name.
> > >
> > > Signed-off-by: Fabio Aiuto <[email protected]>
> > > ---
> > > drivers/staging/rtl8723bs/include/rtw_debug.h | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
> > > index 189f02a8300a..3a5b083e95a1 100644
> > > --- a/drivers/staging/rtl8723bs/include/rtw_debug.h
> > > +++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
> > > @@ -7,7 +7,7 @@
> > > #ifndef __RTW_DEBUG_H__
> > > #define __RTW_DEBUG_H__
> > >
> > > -#define DRIVER_PREFIX "RTL8723BS: "
> > > +#define DRIVER_PREFIX "rtl8723bs: "
> >
> > KBUILD_MODNAME should be used here, in the future.
>
> ok, got it
>
> >
> > But really, this shouldn't be needed at all, it's kind of pointless (if
> > it is being used, then odds are the places it is being used is wrong...)
> >
> > thanks,
> >
> > greg k-h
>
> fabio@agape:~/src/git/kernels/staging$ grep -r DRIVER_PREFIX drivers/staging/rtl8723bs/
> drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c: print_hex_dump_debug(DRIVER_PREFIX ": u1H2CRsvdPageParm:", DUMP_PREFIX_NONE,
> drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c: print_hex_dump_debug(DRIVER_PREFIX ": u1H2CMediaStatusRptParm:", DUMP_PREFIX_NONE,
> drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c: print_hex_dump_debug(DRIVER_PREFIX ": u1H2CMacIdConfigParm:", DUMP_PREFIX_NONE,
> drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c: print_hex_dump_debug(DRIVER_PREFIX ": u1H2CRssiSettingParm:", DUMP_PREFIX_NONE,
> drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c: print_hex_dump_debug(DRIVER_PREFIX ": u1H2CPwrModeParm:", DUMP_PREFIX_NONE,
> drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c: print_hex_dump_debug(DRIVER_PREFIX ": u1H2CPsTuneParm:", DUMP_PREFIX_NONE,
> drivers/staging/rtl8723bs/hal/hal_com.c: print_hex_dump_debug(DRIVER_PREFIX ": c2h_evt_read(): ", DUMP_PREFIX_NONE,
> drivers/staging/rtl8723bs/hal/hal_com.c: print_hex_dump_debug(DRIVER_PREFIX ": c2h_evt_read(): Command Content:\n",
> drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c: print_hex_dump_debug(DRIVER_PREFIX ": C2HPacketHandler_8723B(): Command Content:\n",

Drivers should not be dumping hex data like this to the kernel log, I
bet they can all be removed :)

thanks,

greg k-h