linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: r8188eu: remove include/rtw_debug.h
@ 2022-05-19 22:10 Phillip Potter
  2022-05-20 21:04 ` Pavel Skripkin
  0 siblings, 1 reply; 3+ messages in thread
From: Phillip Potter @ 2022-05-19 22:10 UTC (permalink / raw)
  To: gregkh
  Cc: straube.linux, martin, saurav.girepunje, abdun.nihaal,
	linux-kernel, linux-staging

Remove include/rtw_debug.h, as all it now has are:

(1) A load of unused preprocessor definitions that expand to BIT(x)
    variants.
(2) A preprocessor definition that expands to the name of the driver
    and is only used in one place inside a pr_info_once call in
    core/rtw_fw.c.

It is now surplus to requirements after fixing up the few places that
include the file.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
---
 drivers/staging/r8188eu/core/rtw_fw.c        |  4 +-
 drivers/staging/r8188eu/include/drv_types.h  |  1 -
 drivers/staging/r8188eu/include/rtw_debug.h  | 45 --------------------
 drivers/staging/r8188eu/os_dep/ioctl_linux.c |  1 -
 4 files changed, 2 insertions(+), 49 deletions(-)
 delete mode 100644 drivers/staging/r8188eu/include/rtw_debug.h

diff --git a/drivers/staging/r8188eu/core/rtw_fw.c b/drivers/staging/r8188eu/core/rtw_fw.c
index bf077876ed3d..0451e5177644 100644
--- a/drivers/staging/r8188eu/core/rtw_fw.c
+++ b/drivers/staging/r8188eu/core/rtw_fw.c
@@ -259,8 +259,8 @@ int rtl8188e_firmware_download(struct adapter *padapter)
 	fwhdr = (struct rt_firmware_hdr *)dvobj->firmware.data;
 
 	if (IS_FW_HEADER_EXIST(fwhdr)) {
-		pr_info_once("%sFirmware Version %d, SubVersion %d, Signature 0x%x\n",
-			     DRIVER_PREFIX, le16_to_cpu(fwhdr->version), fwhdr->subversion,
+		pr_info_once("R8188EU: Firmware Version %d, SubVersion %d, Signature 0x%x\n",
+			     le16_to_cpu(fwhdr->version), fwhdr->subversion,
 			     le16_to_cpu(fwhdr->signature));
 
 		fw_data = fw_data + sizeof(struct rt_firmware_hdr);
diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/r8188eu/include/drv_types.h
index ffab2ee0848a..bba88a0ede61 100644
--- a/drivers/staging/r8188eu/include/drv_types.h
+++ b/drivers/staging/r8188eu/include/drv_types.h
@@ -26,7 +26,6 @@
 #include "rtw_eeprom.h"
 #include "sta_info.h"
 #include "rtw_mlme.h"
-#include "rtw_debug.h"
 #include "rtw_rf.h"
 #include "rtw_event.h"
 #include "rtw_led.h"
diff --git a/drivers/staging/r8188eu/include/rtw_debug.h b/drivers/staging/r8188eu/include/rtw_debug.h
deleted file mode 100644
index 84ec068596e7..000000000000
--- a/drivers/staging/r8188eu/include/rtw_debug.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
-/* Copyright(c) 2007 - 2011 Realtek Corporation. */
-
-#ifndef __RTW_DEBUG_H__
-#define __RTW_DEBUG_H__
-
-#include "osdep_service.h"
-#include "drv_types.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)
-#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)
-#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)
-#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)
-#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)
-#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)
-#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_rtl8192c_xmit_c_	BIT(27)
-#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)
-
-#define DRIVER_PREFIX	"R8188EU: "
-
-#endif	/* __RTW_DEBUG_H__ */
diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index 9c1f576e067a..1b09462ca908 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -4,7 +4,6 @@
 #include "../include/osdep_service.h"
 #include "../include/drv_types.h"
 #include "../include/wlan_bssdef.h"
-#include "../include/rtw_debug.h"
 #include "../include/wifi.h"
 #include "../include/rtw_mlme.h"
 #include "../include/rtw_mlme_ext.h"
-- 
2.35.3


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

* Re: [PATCH] staging: r8188eu: remove include/rtw_debug.h
  2022-05-19 22:10 [PATCH] staging: r8188eu: remove include/rtw_debug.h Phillip Potter
@ 2022-05-20 21:04 ` Pavel Skripkin
  2022-05-20 21:44   ` Phillip Potter
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Skripkin @ 2022-05-20 21:04 UTC (permalink / raw)
  To: Phillip Potter, gregkh
  Cc: straube.linux, martin, saurav.girepunje, abdun.nihaal,
	linux-kernel, linux-staging

Hi Phillip,

On 5/20/22 01:10, Phillip Potter wrote:
> Remove include/rtw_debug.h, as all it now has are:
> 
> (1) A load of unused preprocessor definitions that expand to BIT(x)
>      variants.
> (2) A preprocessor definition that expands to the name of the driver
>      and is only used in one place inside a pr_info_once call in
>      core/rtw_fw.c.
> 
> It is now surplus to requirements after fixing up the few places that
> include the file.
> 
> Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
> ---
>   drivers/staging/r8188eu/core/rtw_fw.c        |  4 +-
>   drivers/staging/r8188eu/include/drv_types.h  |  1 -
>   drivers/staging/r8188eu/include/rtw_debug.h  | 45 --------------------
>   drivers/staging/r8188eu/os_dep/ioctl_linux.c |  1 -
>   4 files changed, 2 insertions(+), 49 deletions(-)
>   delete mode 100644 drivers/staging/r8188eu/include/rtw_debug.h
> 
> diff --git a/drivers/staging/r8188eu/core/rtw_fw.c b/drivers/staging/r8188eu/core/rtw_fw.c
> index bf077876ed3d..0451e5177644 100644
> --- a/drivers/staging/r8188eu/core/rtw_fw.c
> +++ b/drivers/staging/r8188eu/core/rtw_fw.c
> @@ -259,8 +259,8 @@ int rtl8188e_firmware_download(struct adapter *padapter)
>   	fwhdr = (struct rt_firmware_hdr *)dvobj->firmware.data;
>   
>   	if (IS_FW_HEADER_EXIST(fwhdr)) {
> -		pr_info_once("%sFirmware Version %d, SubVersion %d, Signature 0x%x\n",
> -			     DRIVER_PREFIX, le16_to_cpu(fwhdr->version), fwhdr->subversion,
> +		pr_info_once("R8188EU: Firmware Version %d, SubVersion %d, Signature 0x%x\n",
> +			     le16_to_cpu(fwhdr->version), fwhdr->subversion,
>   			     le16_to_cpu(fwhdr->signature));
>   

What about converting this macro to dev_info_once()? IMO, looks cleaner:

[   27.985218] r8188eu 2-1:1.0: Firmware Version 11, SubVersion 1, 
Signature 0x88e1




With regards,
Pavel Skripkin

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

* Re: [PATCH] staging: r8188eu: remove include/rtw_debug.h
  2022-05-20 21:04 ` Pavel Skripkin
@ 2022-05-20 21:44   ` Phillip Potter
  0 siblings, 0 replies; 3+ messages in thread
From: Phillip Potter @ 2022-05-20 21:44 UTC (permalink / raw)
  To: Pavel Skripkin
  Cc: straube.linux, martin, saurav.girepunje, abdun.nihaal,
	linux-kernel, linux-staging

On Sat, May 21, 2022 at 12:04:54AM +0300, Pavel Skripkin wrote:
> Hi Phillip,
> 
> On 5/20/22 01:10, Phillip Potter wrote:
> > Remove include/rtw_debug.h, as all it now has are:
> > 
> > (1) A load of unused preprocessor definitions that expand to BIT(x)
> >      variants.
> > (2) A preprocessor definition that expands to the name of the driver
> >      and is only used in one place inside a pr_info_once call in
> >      core/rtw_fw.c.
> > 
> > It is now surplus to requirements after fixing up the few places that
> > include the file.
> > 
> > Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
> > ---
> >   drivers/staging/r8188eu/core/rtw_fw.c        |  4 +-
> >   drivers/staging/r8188eu/include/drv_types.h  |  1 -
> >   drivers/staging/r8188eu/include/rtw_debug.h  | 45 --------------------
> >   drivers/staging/r8188eu/os_dep/ioctl_linux.c |  1 -
> >   4 files changed, 2 insertions(+), 49 deletions(-)
> >   delete mode 100644 drivers/staging/r8188eu/include/rtw_debug.h
> > 
> > diff --git a/drivers/staging/r8188eu/core/rtw_fw.c b/drivers/staging/r8188eu/core/rtw_fw.c
> > index bf077876ed3d..0451e5177644 100644
> > --- a/drivers/staging/r8188eu/core/rtw_fw.c
> > +++ b/drivers/staging/r8188eu/core/rtw_fw.c
> > @@ -259,8 +259,8 @@ int rtl8188e_firmware_download(struct adapter *padapter)
> >   	fwhdr = (struct rt_firmware_hdr *)dvobj->firmware.data;
> >   	if (IS_FW_HEADER_EXIST(fwhdr)) {
> > -		pr_info_once("%sFirmware Version %d, SubVersion %d, Signature 0x%x\n",
> > -			     DRIVER_PREFIX, le16_to_cpu(fwhdr->version), fwhdr->subversion,
> > +		pr_info_once("R8188EU: Firmware Version %d, SubVersion %d, Signature 0x%x\n",
> > +			     le16_to_cpu(fwhdr->version), fwhdr->subversion,
> >   			     le16_to_cpu(fwhdr->signature));
> 
> What about converting this macro to dev_info_once()? IMO, looks cleaner:
> 
> [   27.985218] r8188eu 2-1:1.0: Firmware Version 11, SubVersion 1, Signature
> 0x88e1
> 
> 
> 
> 
> With regards,
> Pavel Skripkin

Hi Pavel,

Yes, good idea, I like it. This patch has been merged now, but I will
submit another to do this. Many thanks for the suggestion.

Regards,
Phil

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

end of thread, other threads:[~2022-05-20 21:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-19 22:10 [PATCH] staging: r8188eu: remove include/rtw_debug.h Phillip Potter
2022-05-20 21:04 ` Pavel Skripkin
2022-05-20 21:44   ` Phillip Potter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).