Skip to content

staging: rtl8723bs: replace DBG_871X_SEL_NL macro with netdev_dbg()

Fabio Aiuto linux-staging lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7staging: rtl8723bs: replace dump_drv_version usage with netdev_*drivers/staging/rtl8723bs/os_dep/ioctl_linux.c+1 -10 replies
2/7staging: rtl8723bs: remove unnecessary dump_drv_version() usagedrivers/staging/rtl8723bs/os_dep/sdio_intf.c+0 -10 replies
3/7staging: rtl8723bs: remove two unused functionsdrivers/staging/rtl8723bs/core/rtw_debug.c drivers/staging/rtl8723bs/include/rtw_debug.h+0 -130 replies
4/7staging: rtl8723bs: replace DBG_871X_SEL_NL with netdev_dbg()drivers/staging/rtl8723bs/core/rtw_debug.c drivers/staging/rtl8723bs/core/rtw_odm.c drivers/staging/rtl8723bs/hal/hal_com.c+46 -500 replies
5/7staging: rtl8723bs: put a new line after ';'drivers/staging/rtl8723bs/core/rtw_odm.c+9 -80 replies
6/7staging: rtl8723bs: remove DBG_871X_SEL_NL macro declarationdrivers/staging/rtl8723bs/include/rtw_debug.h+0 -90 replies
7/7staging: rtl8723bs: remove unused argument in functiondrivers/staging/rtl8723bs/core/rtw_odm.c drivers/staging/rtl8723bs/include/rtw_odm.h drivers/staging/rtl8723bs/os_dep/ioctl_linux.c+3 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] staging: rtl8723bs: replace DBG_871X_SEL_NL macro with netdev_dbg()

This patchset replaces DGB_871X_SEL_NL macro with the driver recommended log function netdev_dbg().

Macro DBG_871X_SEL_NL indeed executes a raw printk call as default behaviour. The other behaviour is doing a seq_printf() call which never occurs.

First patch replace dump_drv_version with a netdev_dbg() call. Second patch remove an unnecessary dump_drv_version() usage. Third patch removes dump_drv_version() now unused and
unused dump_log_level() as well
Fourth patch apply the following coccinelle script for macro bulk replacement:

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

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

@rule@
identifier func, context, padapter;
@@

func(void *context)

{
	...
struct adapter *padapter = context;
	...
}

@@
expression sel;
expression list args;
identifier rule.padapter;
identifier rule.func, rule.context;
@@

func(void *context)

{
	<...
-	DBG_871X_SEL_NL(sel, args);
+	netdev_dbg(padapter->pnetdev, args);
	...>
}

@@
expression sel;
expression list args;
expression get_dev;
identifier func, dev;
@@

func(...)

{
	...
	struct net_device *dev = get_dev;
	<...
-	DBG_871X_SEL_NL(sel, args);
+	netdev_dbg(dev, args);
	...>
}

@@
expression sel;
expression list args;
identifier func, dev;
@@

func(struct net_device *dev)

{
	<...
-	DBG_871X_SEL_NL(sel, args);
+	netdev_dbg(dev, args);
	...>
}

@@
expression sel;
expression list args;
identifier func, dvobj;
@@

func(struct dvobj_priv *dvobj)

{
	<...
-	DBG_871X_SEL_NL(sel, args);
+	netdev_dbg(dvobj->if1->pnetdev, args);
	...>
}

Fifth patch fixes a post commit checkpatch issue left by coccinelle output.
Sixth patch removes DBG_871X_SEL_NL macro declaration. Seventh patch removes an unused function argument after macro replacement.

Fabio Aiuto (7):
staging: rtl8723bs: replace dump_drv_version usage with netdev_*
staging: rtl8723bs: remove unnecessary dump_drv_version() usage
staging: rtl8723bs: remove two unused functions
staging: rtl8723bs: replace DBG_871X_SEL_NL with netdev_dbg()
staging: rtl8723bs: put a new line after ';'
staging: rtl8723bs: remove DBG_871X_SEL_NL macro declaration
staging: rtl8723bs: remove unused argument in function

 drivers/staging/rtl8723bs/core/rtw_debug.c    | 26 +++-------
 drivers/staging/rtl8723bs/core/rtw_odm.c      | 52 ++++++++++---------
 drivers/staging/rtl8723bs/hal/hal_com.c       | 31 +++++------
 drivers/staging/rtl8723bs/include/rtw_debug.h | 12 -----
 drivers/staging/rtl8723bs/include/rtw_odm.h   |  2 +-
 .../staging/rtl8723bs/os_dep/ioctl_linux.c    |  4 +-
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c  |  1 -
 7 files changed, 51 insertions(+), 77 deletions(-)
Signature · 1 line
2.20.1