2022-01-25 08:52:49

by Phillip Potter

[permalink] [raw]
Subject: [PATCH 10/10] staging: r8188eu: remove GlobalDebugLevel flag

Remove hal/odm_debug.c, to get rid of the GlobalDebugLevel flag,
and remove the two other lines that reference GlobalDebugLevel, as
the last remaining user (DBG_88E) is now gone. Also modify Makefile
to no longer build hal/odm_debug.c.

Signed-off-by: Phillip Potter <[email protected]>
---
drivers/staging/r8188eu/Makefile | 1 -
drivers/staging/r8188eu/hal/odm_debug.c | 6 ------
drivers/staging/r8188eu/include/rtw_debug.h | 2 --
drivers/staging/r8188eu/os_dep/os_intfs.c | 1 -
4 files changed, 10 deletions(-)
delete mode 100644 drivers/staging/r8188eu/hal/odm_debug.c

diff --git a/drivers/staging/r8188eu/Makefile b/drivers/staging/r8188eu/Makefile
index a7a486cc16dd..ecd6fe5bd94c 100644
--- a/drivers/staging/r8188eu/Makefile
+++ b/drivers/staging/r8188eu/Makefile
@@ -10,7 +10,6 @@ r8188eu-y = \
hal/hal_intf.o \
hal/hal_com.o \
hal/odm.o \
- hal/odm_debug.o \
hal/odm_HWConfig.o \
hal/odm_RegConfig8188E.o \
hal/odm_RTL8188E.o \
diff --git a/drivers/staging/r8188eu/hal/odm_debug.c b/drivers/staging/r8188eu/hal/odm_debug.c
deleted file mode 100644
index 7a134229fe39..000000000000
--- a/drivers/staging/r8188eu/hal/odm_debug.c
+++ /dev/null
@@ -1,6 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/* Copyright(c) 2007 - 2011 Realtek Corporation. */
-
-#include "../include/rtw_debug.h"
-
-u32 GlobalDebugLevel;
diff --git a/drivers/staging/r8188eu/include/rtw_debug.h b/drivers/staging/r8188eu/include/rtw_debug.h
index 959fb6bd25ca..01a7d987d6cc 100644
--- a/drivers/staging/r8188eu/include/rtw_debug.h
+++ b/drivers/staging/r8188eu/include/rtw_debug.h
@@ -52,6 +52,4 @@

#define DRIVER_PREFIX "R8188EU: "

-extern u32 GlobalDebugLevel;
-
#endif /* __RTW_DEBUG_H__ */
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index 17249b4fb7ad..8589de487289 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -155,7 +155,6 @@ static uint loadparam(struct adapter *padapter)
{
struct registry_priv *registry_par = &padapter->registrypriv;

- GlobalDebugLevel = rtw_debug;
registry_par->chip_version = (u8)rtw_chip_version;
registry_par->rfintfs = (u8)rtw_rfintfs;
registry_par->lbkmode = (u8)rtw_lbkmode;
--
2.34.1


2022-01-26 21:05:52

by Michael Straube

[permalink] [raw]
Subject: Re: [PATCH 10/10] staging: r8188eu: remove GlobalDebugLevel flag

On 1/24/22 23:59, Phillip Potter wrote:
> Remove hal/odm_debug.c, to get rid of the GlobalDebugLevel flag,
> and remove the two other lines that reference GlobalDebugLevel, as
> the last remaining user (DBG_88E) is now gone. Also modify Makefile
> to no longer build hal/odm_debug.c.
>
> Signed-off-by: Phillip Potter <[email protected]>
> ---
> drivers/staging/r8188eu/Makefile | 1 -
> drivers/staging/r8188eu/hal/odm_debug.c | 6 ------
> drivers/staging/r8188eu/include/rtw_debug.h | 2 --
> drivers/staging/r8188eu/os_dep/os_intfs.c | 1 -
> 4 files changed, 10 deletions(-)
> delete mode 100644 drivers/staging/r8188eu/hal/odm_debug.c
>
> diff --git a/drivers/staging/r8188eu/Makefile b/drivers/staging/r8188eu/Makefile
> index a7a486cc16dd..ecd6fe5bd94c 100644
> --- a/drivers/staging/r8188eu/Makefile
> +++ b/drivers/staging/r8188eu/Makefile
> @@ -10,7 +10,6 @@ r8188eu-y = \
> hal/hal_intf.o \
> hal/hal_com.o \
> hal/odm.o \
> - hal/odm_debug.o \
> hal/odm_HWConfig.o \
> hal/odm_RegConfig8188E.o \
> hal/odm_RTL8188E.o \
> diff --git a/drivers/staging/r8188eu/hal/odm_debug.c b/drivers/staging/r8188eu/hal/odm_debug.c
> deleted file mode 100644
> index 7a134229fe39..000000000000
> --- a/drivers/staging/r8188eu/hal/odm_debug.c
> +++ /dev/null
> @@ -1,6 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0
> -/* Copyright(c) 2007 - 2011 Realtek Corporation. */
> -
> -#include "../include/rtw_debug.h"
> -
> -u32 GlobalDebugLevel;
> diff --git a/drivers/staging/r8188eu/include/rtw_debug.h b/drivers/staging/r8188eu/include/rtw_debug.h
> index 959fb6bd25ca..01a7d987d6cc 100644
> --- a/drivers/staging/r8188eu/include/rtw_debug.h
> +++ b/drivers/staging/r8188eu/include/rtw_debug.h
> @@ -52,6 +52,4 @@
>
> #define DRIVER_PREFIX "R8188EU: "
>
> -extern u32 GlobalDebugLevel;
> -
> #endif /* __RTW_DEBUG_H__ */
> diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
> index 17249b4fb7ad..8589de487289 100644
> --- a/drivers/staging/r8188eu/os_dep/os_intfs.c
> +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
> @@ -155,7 +155,6 @@ static uint loadparam(struct adapter *padapter)
> {
> struct registry_priv *registry_par = &padapter->registrypriv;
>
> - GlobalDebugLevel = rtw_debug;
> registry_par->chip_version = (u8)rtw_chip_version;
> registry_par->rfintfs = (u8)rtw_rfintfs;
> registry_par->lbkmode = (u8)rtw_lbkmode;

Hi Phillip,

so rtw_debug is unused now. Should we remove the 'debug' module
parameter and rtw_debug as well?

Regards,
Michael

2022-01-27 14:45:30

by Phillip Potter

[permalink] [raw]
Subject: Re: [PATCH 10/10] staging: r8188eu: remove GlobalDebugLevel flag

On Wed, Jan 26, 2022 at 11:33:46AM +0100, Michael Straube wrote:
> On 1/24/22 23:59, Phillip Potter wrote:
> > Remove hal/odm_debug.c, to get rid of the GlobalDebugLevel flag,
> > and remove the two other lines that reference GlobalDebugLevel, as
> > the last remaining user (DBG_88E) is now gone. Also modify Makefile
> > to no longer build hal/odm_debug.c.
> >
> > Signed-off-by: Phillip Potter <[email protected]>
> > ---
> > drivers/staging/r8188eu/Makefile | 1 -
> > drivers/staging/r8188eu/hal/odm_debug.c | 6 ------
> > drivers/staging/r8188eu/include/rtw_debug.h | 2 --
> > drivers/staging/r8188eu/os_dep/os_intfs.c | 1 -
> > 4 files changed, 10 deletions(-)
> > delete mode 100644 drivers/staging/r8188eu/hal/odm_debug.c
> >
> > diff --git a/drivers/staging/r8188eu/Makefile b/drivers/staging/r8188eu/Makefile
> > index a7a486cc16dd..ecd6fe5bd94c 100644
> > --- a/drivers/staging/r8188eu/Makefile
> > +++ b/drivers/staging/r8188eu/Makefile
> > @@ -10,7 +10,6 @@ r8188eu-y = \
> > hal/hal_intf.o \
> > hal/hal_com.o \
> > hal/odm.o \
> > - hal/odm_debug.o \
> > hal/odm_HWConfig.o \
> > hal/odm_RegConfig8188E.o \
> > hal/odm_RTL8188E.o \
> > diff --git a/drivers/staging/r8188eu/hal/odm_debug.c b/drivers/staging/r8188eu/hal/odm_debug.c
> > deleted file mode 100644
> > index 7a134229fe39..000000000000
> > --- a/drivers/staging/r8188eu/hal/odm_debug.c
> > +++ /dev/null
> > @@ -1,6 +0,0 @@
> > -// SPDX-License-Identifier: GPL-2.0
> > -/* Copyright(c) 2007 - 2011 Realtek Corporation. */
> > -
> > -#include "../include/rtw_debug.h"
> > -
> > -u32 GlobalDebugLevel;
> > diff --git a/drivers/staging/r8188eu/include/rtw_debug.h b/drivers/staging/r8188eu/include/rtw_debug.h
> > index 959fb6bd25ca..01a7d987d6cc 100644
> > --- a/drivers/staging/r8188eu/include/rtw_debug.h
> > +++ b/drivers/staging/r8188eu/include/rtw_debug.h
> > @@ -52,6 +52,4 @@
> > #define DRIVER_PREFIX "R8188EU: "
> > -extern u32 GlobalDebugLevel;
> > -
> > #endif /* __RTW_DEBUG_H__ */
> > diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
> > index 17249b4fb7ad..8589de487289 100644
> > --- a/drivers/staging/r8188eu/os_dep/os_intfs.c
> > +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
> > @@ -155,7 +155,6 @@ static uint loadparam(struct adapter *padapter)
> > {
> > struct registry_priv *registry_par = &padapter->registrypriv;
> > - GlobalDebugLevel = rtw_debug;
> > registry_par->chip_version = (u8)rtw_chip_version;
> > registry_par->rfintfs = (u8)rtw_rfintfs;
> > registry_par->lbkmode = (u8)rtw_lbkmode;
>
> Hi Phillip,
>
> so rtw_debug is unused now. Should we remove the 'debug' module
> parameter and rtw_debug as well?
>
> Regards,
> Michael

Good point, might as well. Will add this into v2. Thanks for the
suggestion.

Regards,
Phil