This patchset removes DBG_871X_LEVEL macro. It does a raw printk so replace it with the more recommended netdev_*() functions. Removal and replacement is done with the following semantic patch: @@ expression list args; identifier padapter; identifier func; symbol _drv_always_, _drv_info_, _drv_warning_; symbol _drv_err_, _drv_emerg_; @@ func(..., struct adapter *padapter, ...) { <... ( - DBG_871X_LEVEL(_drv_always_, args); + netdev_dbg(padapter->pnetdev, args); | - DBG_871X_LEVEL(_drv_info_, args); + netdev_info(padapter->pnetdev, args); | - DBG_871X_LEVEL(_drv_warning_, args); + netdev_warn(padapter->pnetdev, args); | - DBG_871X_LEVEL(_drv_err_, args); + netdev_err(padapter->pnetdev, args); | - DBG_871X_LEVEL(_drv_emerg_, args); + netdev_emerg(padapter->pnetdev, args); ) ...> } @rule@ identifier func, context, padapter; @@ func(void *context) { ... struct adapter *padapter = context; ... } @@ expression list args; identifier rule.padapter; identifier rule.func, rule.context; @@ func(void *context) { <... ( - DBG_871X_LEVEL(_drv_always_, args); + netdev_dbg(padapter->pnetdev, args); | - DBG_871X_LEVEL(_drv_info_, args); + netdev_info(padapter->pnetdev, args); | - DBG_871X_LEVEL(_drv_warning_, args); + netdev_warn(padapter->pnetdev, args); | - DBG_871X_LEVEL(_drv_err_, args); + netdev_err(padapter->pnetdev, args); | - DBG_871X_LEVEL(_drv_emerg_, args); + netdev_emerg(padapter->pnetdev, args); ) ...> } @@ expression list args; expression get_dev; identifier func, dev; @@ func(...) { ... struct net_device *dev = get_dev; <... ( - DBG_871X_LEVEL(_drv_always_, args); + netdev_dbg(dev, args); | - DBG_871X_LEVEL(_drv_info_, args); + netdev_info(dev, args); | - DBG_871X_LEVEL(_drv_warning_, args); + netdev_warn(dev, args); | - DBG_871X_LEVEL(_drv_err_, args); + netdev_err(dev, args); | - DBG_871X_LEVEL(_drv_emerg_, args); + netdev_emerg(dev, args); ) ...> } @@ expression list args; identifier func, dev; @@ func(struct net_device *dev) { <... ( - DBG_871X_LEVEL(_drv_always_, args); + netdev_dbg(dev, args); | - DBG_871X_LEVEL(_drv_info_, args); + netdev_info(dev, args); | - DBG_871X_LEVEL(_drv_warning_, args); + netdev_warn(dev, args); | - DBG_871X_LEVEL(_drv_err_, args); + netdev_err(dev, args); | - DBG_871X_LEVEL(_drv_emerg_, args); + netdev_emerg(dev, args); ) ...> } @@ expression list args; identifier func, dvobj; @@ func(struct dvobj_priv *dvobj) { <... ( - DBG_871X_LEVEL(_drv_always_, args); + netdev_dbg(dvobj->if1->pnetdev, args); | - DBG_871X_LEVEL(_drv_info_, args); + netdev_info(dvobj->if1->pnetdev, args); | - DBG_871X_LEVEL(_drv_warning_, args); + netdev_warn(dvobj->if1->pnetdev, args); | - DBG_871X_LEVEL(_drv_err_, args); + netdev_err(dvobj->if1->pnetdev, args); | - DBG_871X_LEVEL(_drv_emerg_, args); + netdev_emerg(dvobj->if1->pnetdev, args); ) ...> } @@ @@ - DBG_871X_LEVEL(...); Some code cleaning done as well. Fabio Aiuto (6): staging: rtl8723bs: replace DBG_871X_LEVEL logs with netdev_*() staging: rtl8723bs: fix code indent issue staging: rtl8723bs: fix indentation in if block staging: rtl8723bs: split too long line staging: rtl8723bs: remove unused DBG_871X_LEVEL macro declarations staging: rtl8723bs: remove empty #ifdef block drivers/staging/rtl8723bs/core/rtw_cmd.c | 30 +++++--- drivers/staging/rtl8723bs/core/rtw_io.c | 4 +- .../staging/rtl8723bs/core/rtw_ioctl_set.c | 10 +-- drivers/staging/rtl8723bs/core/rtw_mlme.c | 3 +- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 72 ++++++++++++------- drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 9 ++- drivers/staging/rtl8723bs/core/rtw_security.c | 40 +++++++---- .../staging/rtl8723bs/core/rtw_wlan_util.c | 21 +++--- drivers/staging/rtl8723bs/core/rtw_xmit.c | 2 +- drivers/staging/rtl8723bs/hal/hal_com.c | 26 ++++--- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 4 +- .../staging/rtl8723bs/hal/rtl8723bs_xmit.c | 14 ++-- drivers/staging/rtl8723bs/hal/sdio_ops.c | 3 +- drivers/staging/rtl8723bs/include/rtw_debug.h | 14 ---- .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 8 ++- .../staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 32 +++++---- drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 15 +--- 18 files changed, 181 insertions(+), 128 deletions(-) -- 2.20.1