All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8712: Remove unnecessary alias of printk()
@ 2021-06-06  3:40 Fabio M. De Francesco
  2021-06-09 10:11 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio M. De Francesco @ 2021-06-06  3:40 UTC (permalink / raw)
  To: Larry Finger, Florian Schilhabel, Greg Kroah-Hartman,
	linux-staging, linux-kernel
  Cc: Fabio M. De Francesco

This module defines four alias for printk(). Removed them
all, because they are not used anywhere else in the driver.
Converted the only exception to the explicit use of printk().

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
---
 drivers/staging/rtl8712/rtl8712_cmd.c   |  2 +-
 drivers/staging/rtl8712/rtl871x_debug.h | 23 -----------------------
 2 files changed, 1 insertion(+), 24 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c
index ff3cb09c57a6..e94604cb71fd 100644
--- a/drivers/staging/rtl8712/rtl8712_cmd.c
+++ b/drivers/staging/rtl8712/rtl8712_cmd.c
@@ -55,7 +55,7 @@ static void check_hw_pbc(struct _adapter *padapter)
 		/* Here we only set bPbcPressed to true
 		 * After trigger PBC, the variable will be set to false
 		 */
-		DBG_8712("CheckPbcGPIO - PBC is pressed !!!!\n");
+		printk(KERN_DEBUG "CheckPbcGPIO - PBC is pressed !!!!\n");
 		/* 0 is the default value and it means the application monitors
 		 * the HW PBC doesn't provide its pid to driver.
 		 */
diff --git a/drivers/staging/rtl8712/rtl871x_debug.h b/drivers/staging/rtl8712/rtl871x_debug.h
index 57f2a38cb71c..69c631af2a2a 100644
--- a/drivers/staging/rtl8712/rtl871x_debug.h
+++ b/drivers/staging/rtl8712/rtl871x_debug.h
@@ -127,27 +127,4 @@
 	#undef	_MODULE_DEFINE_
 #endif
 
-#define _dbgdump	printk
-
-#define MSG_8712(x, ...) {}
-
-#define DBG_8712(x, ...)  {}
-
-#define WRN_8712(x, ...)  {}
-
-#define ERR_8712(x, ...)  {}
-
-#undef MSG_8712
-#define MSG_8712 _dbgdump
-
-#undef DBG_8712
-#define DBG_8712 _dbgdump
-
-#undef WRN_8712
-#define WRN_8712 _dbgdump
-
-#undef ERR_8712
-#define ERR_8712 _dbgdump
-
 #endif	/*__RTL871X_DEBUG_H__*/
-
-- 
2.31.1


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

* Re: [PATCH] staging: rtl8712: Remove unnecessary alias of printk()
  2021-06-06  3:40 [PATCH] staging: rtl8712: Remove unnecessary alias of printk() Fabio M. De Francesco
@ 2021-06-09 10:11 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-09 10:11 UTC (permalink / raw)
  To: Fabio M. De Francesco
  Cc: Larry Finger, Florian Schilhabel, linux-staging, linux-kernel

On Sun, Jun 06, 2021 at 05:40:38AM +0200, Fabio M. De Francesco wrote:
> This module defines four alias for printk(). Removed them
> all, because they are not used anywhere else in the driver.
> Converted the only exception to the explicit use of printk().
> 
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> ---
>  drivers/staging/rtl8712/rtl8712_cmd.c   |  2 +-
>  drivers/staging/rtl8712/rtl871x_debug.h | 23 -----------------------
>  2 files changed, 1 insertion(+), 24 deletions(-)
> 
> diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c
> index ff3cb09c57a6..e94604cb71fd 100644
> --- a/drivers/staging/rtl8712/rtl8712_cmd.c
> +++ b/drivers/staging/rtl8712/rtl8712_cmd.c
> @@ -55,7 +55,7 @@ static void check_hw_pbc(struct _adapter *padapter)
>  		/* Here we only set bPbcPressed to true
>  		 * After trigger PBC, the variable will be set to false
>  		 */
> -		DBG_8712("CheckPbcGPIO - PBC is pressed !!!!\n");
> +		printk(KERN_DEBUG "CheckPbcGPIO - PBC is pressed !!!!\n");

As an add-on patch, you should move this to netdev_dbg() or dev_dbg().

thanks,

greg k-h

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

end of thread, other threads:[~2021-06-09 10:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-06  3:40 [PATCH] staging: rtl8712: Remove unnecessary alias of printk() Fabio M. De Francesco
2021-06-09 10:11 ` Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.