lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <9e6a1e4dc8962bfd58375be98619c76e8e28febe.1619254603.git.fabioaiuto83@gmail.com>
Date:   Sat, 24 Apr 2021 11:01:45 +0200
From:   Fabio Aiuto <fabioaiuto83@...il.com>
To:     gregkh@...uxfoundation.org
Cc:     joe@...ches.com, linux-staging@...ts.linux.dev,
        linux-kernel@...r.kernel.org
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 <fabioaiuto83@...il.com>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ