Re: [PATCH 03/40] staging: rtl8723bs: replace RT_TRACE with public printk wrappers in core/rtw_eeprom.c

2021-04-01 Thread Fabio Aiuto
On Wed, Mar 31, 2021 at 01:14:18PM +0200, Greg KH wrote:
> On Wed, Mar 31, 2021 at 12:55:51PM +0200, Fabio Aiuto wrote:
> > On Wed, Mar 31, 2021 at 12:27:20PM +0200, Greg KH wrote:
> > > On Wed, Mar 31, 2021 at 11:39:31AM +0200, Fabio Aiuto wrote:
> > > > replace private macro RT_TRACE for tracing with in-kernel
> > > > pr_* printk wrappers
> > > > 
> > > > Signed-off-by: Fabio Aiuto 
> > > > ---
> > > >  drivers/staging/rtl8723bs/core/rtw_eeprom.c | 26 ++---
> > > >  1 file changed, 13 insertions(+), 13 deletions(-)
> > > > 
> > > > diff --git a/drivers/staging/rtl8723bs/core/rtw_eeprom.c 
> > > > b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > > > index 3cbd65dee741..6176d741d60e 100644
> > > > --- a/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > > > +++ b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > > > @@ -36,7 +36,7 @@ void shift_out_bits(_adapter *padapter, u16 data, u16 
> > > > count)
> > > >  _func_enter_;
> > > >  
> > > > if (padapter->bSurpriseRemoved == true) {
> > > > -   RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
> > > > ("padapter->bSurpriseRemoved==true"));
> > > > +   pr_err("%s padapter->bSurpriseRemoved==true", 
> > > > DRIVER_PREFIX);
> > > 
> > > As Dan said, this is not the same thing.  You are now always printing
> > > out this mess, when before you were not unless you explicitly enabled
> > > "tracing".
> > 
> > RT_TRACE is enabled if is defined the symbol DEBUG_RTL871X. It doesn't seem 
> > to be related 
> > to tracing. DEBUG_RTL871X is never declared, is commented out in 
> > rtl8723bs/include/autoconf.h
> 
> That's a good sign this is never used and should just all be removed.
> 
> > that's why RT_TRACE is never printed. If we try to uncomment the symbol 
> > definition we have some
> > comiling errors..
> 
> What errors do you get?
> 
> > > And you are sending it to the error log?
> > > 
> > > And finally, drivers should never be using pr_*() for messages, they
> > > should be using dev_*() instead as they are a driver and have access to
> > > a device pointer.
> > > 
> > > thanks,
> > > 
> > > greg k-h
> > 
> > I still wonder what's best...
> 
> Just delete them all please, they are obviously not used as no one
> rebuilds the source just for this type of thing.
> 
> thanks,
> 
> greg k-h

Hi Greg,

I will send a brand new patchset, not a v2, for the pourpose is changed.

Thank you,

fabio


Re: [PATCH 03/40] staging: rtl8723bs: replace RT_TRACE with public printk wrappers in core/rtw_eeprom.c

2021-03-31 Thread Fabio Aiuto
On Wed, Mar 31, 2021 at 12:48:20PM +0200, Greg KH wrote:
> On Wed, Mar 31, 2021 at 12:36:31PM +0200, Fabio Aiuto wrote:
> > On Wed, Mar 31, 2021 at 12:27:20PM +0200, Greg KH wrote:
> > > On Wed, Mar 31, 2021 at 11:39:31AM +0200, Fabio Aiuto wrote:
> > > > replace private macro RT_TRACE for tracing with in-kernel
> > > > pr_* printk wrappers
> > > > 
> > > > Signed-off-by: Fabio Aiuto 
> > > > ---
> > > >  drivers/staging/rtl8723bs/core/rtw_eeprom.c | 26 ++---
> > > >  1 file changed, 13 insertions(+), 13 deletions(-)
> > > > 
> > > > diff --git a/drivers/staging/rtl8723bs/core/rtw_eeprom.c 
> > > > b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > > > index 3cbd65dee741..6176d741d60e 100644
> > > > --- a/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > > > +++ b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > > > @@ -36,7 +36,7 @@ void shift_out_bits(_adapter *padapter, u16 data, u16 
> > > > count)
> > > >  _func_enter_;
> > > >  
> > > > if (padapter->bSurpriseRemoved == true) {
> > > > -   RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
> > > > ("padapter->bSurpriseRemoved==true"));
> > 
> > I looked at this ---^
> > and so I thought that pr_err was good...
> 
> But you missed the fact that RT_TRACE() does not always spit this stuff
> out.
> 
> And I don't know what _drv_err_ is, but tracing messages should never go
> to an error log :)

ok, got it 

> 
> > my aim was remove private macros replicating component tracing and log 
> > levels...
> 
> That's a great goal!
> 
> > so what's best? Keep a simplyfied RT_TRACE encapsulating a dev_* call?
> 
> replace them with dev_dbg() is one way, if they really are even needed
> at all.  At this point in time, I would strongly just recommend removing
> them all as no one is using them for anything.
> 
> thanks,
> 
> greg k-h

I will remove then,

thank you,

fabio


Re: [PATCH 03/40] staging: rtl8723bs: replace RT_TRACE with public printk wrappers in core/rtw_eeprom.c

2021-03-31 Thread Fabio Aiuto
On Wed, Mar 31, 2021 at 01:14:18PM +0200, Greg KH wrote:
> On Wed, Mar 31, 2021 at 12:55:51PM +0200, Fabio Aiuto wrote:
> > On Wed, Mar 31, 2021 at 12:27:20PM +0200, Greg KH wrote:
> > > On Wed, Mar 31, 2021 at 11:39:31AM +0200, Fabio Aiuto wrote:
> > > > replace private macro RT_TRACE for tracing with in-kernel
> > > > pr_* printk wrappers
> > > > 
> > > > Signed-off-by: Fabio Aiuto 
> > > > ---
> > > >  drivers/staging/rtl8723bs/core/rtw_eeprom.c | 26 ++---
> > > >  1 file changed, 13 insertions(+), 13 deletions(-)
> > > > 
> > > > diff --git a/drivers/staging/rtl8723bs/core/rtw_eeprom.c 
> > > > b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > > > index 3cbd65dee741..6176d741d60e 100644
> > > > --- a/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > > > +++ b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > > > @@ -36,7 +36,7 @@ void shift_out_bits(_adapter *padapter, u16 data, u16 
> > > > count)
> > > >  _func_enter_;
> > > >  
> > > > if (padapter->bSurpriseRemoved == true) {
> > > > -   RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
> > > > ("padapter->bSurpriseRemoved==true"));
> > > > +   pr_err("%s padapter->bSurpriseRemoved==true", 
> > > > DRIVER_PREFIX);
> > > 
> > > As Dan said, this is not the same thing.  You are now always printing
> > > out this mess, when before you were not unless you explicitly enabled
> > > "tracing".
> > 
> > RT_TRACE is enabled if is defined the symbol DEBUG_RTL871X. It doesn't seem 
> > to be related 
> > to tracing. DEBUG_RTL871X is never declared, is commented out in 
> > rtl8723bs/include/autoconf.h
> 
> That's a good sign this is never used and should just all be removed.
> 
> > that's why RT_TRACE is never printed. If we try to uncomment the symbol 
> > definition we have some
> > comiling errors..
> 
> What errors do you get?

If I declare DEBUG and DEBUG_RTL871X to activate private tracing..

diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c 
b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
index 9b16265b543d..f84e0e54cc9c 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
@@ -1717,7 +1717,7 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 
reg_pwr_tbl_sel,
idx_rate_sctn = get_rate_sctn_idx(data_rate);
 
if (band_type == BAND_ON_5G && idx_rate_sctn == 0)
-   DBG_871X("Wrong rate 0x%x: No CCK in 5G Band\n", DataRate);
+   DBG_871X("Wrong rate 0x%x: No CCK in 5G Band\n", data_rate);

here I have to fix a variable name ---^
to let the code compile.

but it won't compile yet, there are more of those errors, in both DBG_871X and
RT_TRACE macro.

 
/*  workaround for wrong index combination to obtain tx power limit, */
/*  OFDM only exists in BW 20M */
diff --git a/drivers/staging/rtl8723bs/include/autoconf.h 
b/drivers/staging/rtl8723bs/include/autoconf.h
index 996198750814..bece2ed1ef88 100644
--- a/drivers/staging/rtl8723bs/include/autoconf.h
+++ b/drivers/staging/rtl8723bs/include/autoconf.h
@@ -45,10 +45,10 @@
  * Debug Related Config
  */
 #undef DEBUG
-
+#define DEBUG
 #ifdef DEBUG
 #define DBG1   /*  for ODM & BTCOEX debug */
-/*#define DEBUG_RTL871X */
+#define DEBUG_RTL871X 
 #else /*  !DEBUG */
 #define DBG0   /*  for ODM & BTCOEX debug */
 #endif /*  !DEBUG */

^here hand declaration to reproduce
compiling errors


> 
> > > And you are sending it to the error log?
> > > 
> > > And finally, drivers should never be using pr_*() for messages, they
> > > should be using dev_*() instead as they are a driver and have access to
> > > a device pointer.
> > > 
> > > thanks,
> > > 
> > > greg k-h
> > 
> > I still wonder what's best...
> 
> Just delete them all please, they are obviously not used as no one
> rebuilds the source just for this type of thing.
> 
> thanks,
> 
> greg k-h

ok I will delete all RT_TRACE call, and even DBG_871X if you agree...

thank you,

fabio


Re: [PATCH 03/40] staging: rtl8723bs: replace RT_TRACE with public printk wrappers in core/rtw_eeprom.c

2021-03-31 Thread Greg KH
On Wed, Mar 31, 2021 at 12:55:51PM +0200, Fabio Aiuto wrote:
> On Wed, Mar 31, 2021 at 12:27:20PM +0200, Greg KH wrote:
> > On Wed, Mar 31, 2021 at 11:39:31AM +0200, Fabio Aiuto wrote:
> > > replace private macro RT_TRACE for tracing with in-kernel
> > > pr_* printk wrappers
> > > 
> > > Signed-off-by: Fabio Aiuto 
> > > ---
> > >  drivers/staging/rtl8723bs/core/rtw_eeprom.c | 26 ++---
> > >  1 file changed, 13 insertions(+), 13 deletions(-)
> > > 
> > > diff --git a/drivers/staging/rtl8723bs/core/rtw_eeprom.c 
> > > b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > > index 3cbd65dee741..6176d741d60e 100644
> > > --- a/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > > +++ b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > > @@ -36,7 +36,7 @@ void shift_out_bits(_adapter *padapter, u16 data, u16 
> > > count)
> > >  _func_enter_;
> > >  
> > >   if (padapter->bSurpriseRemoved == true) {
> > > - RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
> > > ("padapter->bSurpriseRemoved==true"));
> > > + pr_err("%s padapter->bSurpriseRemoved==true", DRIVER_PREFIX);
> > 
> > As Dan said, this is not the same thing.  You are now always printing
> > out this mess, when before you were not unless you explicitly enabled
> > "tracing".
> 
> RT_TRACE is enabled if is defined the symbol DEBUG_RTL871X. It doesn't seem 
> to be related 
> to tracing. DEBUG_RTL871X is never declared, is commented out in 
> rtl8723bs/include/autoconf.h

That's a good sign this is never used and should just all be removed.

> that's why RT_TRACE is never printed. If we try to uncomment the symbol 
> definition we have some
> comiling errors..

What errors do you get?

> > And you are sending it to the error log?
> > 
> > And finally, drivers should never be using pr_*() for messages, they
> > should be using dev_*() instead as they are a driver and have access to
> > a device pointer.
> > 
> > thanks,
> > 
> > greg k-h
> 
> I still wonder what's best...

Just delete them all please, they are obviously not used as no one
rebuilds the source just for this type of thing.

thanks,

greg k-h


Re: [PATCH 03/40] staging: rtl8723bs: replace RT_TRACE with public printk wrappers in core/rtw_eeprom.c

2021-03-31 Thread Fabio Aiuto
On Wed, Mar 31, 2021 at 12:27:20PM +0200, Greg KH wrote:
> On Wed, Mar 31, 2021 at 11:39:31AM +0200, Fabio Aiuto wrote:
> > replace private macro RT_TRACE for tracing with in-kernel
> > pr_* printk wrappers
> > 
> > Signed-off-by: Fabio Aiuto 
> > ---
> >  drivers/staging/rtl8723bs/core/rtw_eeprom.c | 26 ++---
> >  1 file changed, 13 insertions(+), 13 deletions(-)
> > 
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_eeprom.c 
> > b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > index 3cbd65dee741..6176d741d60e 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > @@ -36,7 +36,7 @@ void shift_out_bits(_adapter *padapter, u16 data, u16 
> > count)
> >  _func_enter_;
> >  
> > if (padapter->bSurpriseRemoved == true) {
> > -   RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
> > ("padapter->bSurpriseRemoved==true"));
> > +   pr_err("%s padapter->bSurpriseRemoved==true", DRIVER_PREFIX);
> 
> As Dan said, this is not the same thing.  You are now always printing
> out this mess, when before you were not unless you explicitly enabled
> "tracing".

RT_TRACE is enabled if is defined the symbol DEBUG_RTL871X. It doesn't seem to 
be related 
to tracing. DEBUG_RTL871X is never declared, is commented out in 
rtl8723bs/include/autoconf.h

that's why RT_TRACE is never printed. If we try to uncomment the symbol 
definition we have some
comiling errors..

> 
> And you are sending it to the error log?
> 
> And finally, drivers should never be using pr_*() for messages, they
> should be using dev_*() instead as they are a driver and have access to
> a device pointer.
> 
> thanks,
> 
> greg k-h

I still wonder what's best...

thanks,

fabio


Re: [PATCH 03/40] staging: rtl8723bs: replace RT_TRACE with public printk wrappers in core/rtw_eeprom.c

2021-03-31 Thread Greg KH
On Wed, Mar 31, 2021 at 12:36:31PM +0200, Fabio Aiuto wrote:
> On Wed, Mar 31, 2021 at 12:27:20PM +0200, Greg KH wrote:
> > On Wed, Mar 31, 2021 at 11:39:31AM +0200, Fabio Aiuto wrote:
> > > replace private macro RT_TRACE for tracing with in-kernel
> > > pr_* printk wrappers
> > > 
> > > Signed-off-by: Fabio Aiuto 
> > > ---
> > >  drivers/staging/rtl8723bs/core/rtw_eeprom.c | 26 ++---
> > >  1 file changed, 13 insertions(+), 13 deletions(-)
> > > 
> > > diff --git a/drivers/staging/rtl8723bs/core/rtw_eeprom.c 
> > > b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > > index 3cbd65dee741..6176d741d60e 100644
> > > --- a/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > > +++ b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > > @@ -36,7 +36,7 @@ void shift_out_bits(_adapter *padapter, u16 data, u16 
> > > count)
> > >  _func_enter_;
> > >  
> > >   if (padapter->bSurpriseRemoved == true) {
> > > - RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
> > > ("padapter->bSurpriseRemoved==true"));
> 
> I looked at this ---^
> and so I thought that pr_err was good...

But you missed the fact that RT_TRACE() does not always spit this stuff
out.

And I don't know what _drv_err_ is, but tracing messages should never go
to an error log :)

> my aim was remove private macros replicating component tracing and log 
> levels...

That's a great goal!

> so what's best? Keep a simplyfied RT_TRACE encapsulating a dev_* call?

replace them with dev_dbg() is one way, if they really are even needed
at all.  At this point in time, I would strongly just recommend removing
them all as no one is using them for anything.

thanks,

greg k-h


Re: [PATCH 03/40] staging: rtl8723bs: replace RT_TRACE with public printk wrappers in core/rtw_eeprom.c

2021-03-31 Thread Fabio Aiuto
On Wed, Mar 31, 2021 at 12:27:20PM +0200, Greg KH wrote:
> On Wed, Mar 31, 2021 at 11:39:31AM +0200, Fabio Aiuto wrote:
> > replace private macro RT_TRACE for tracing with in-kernel
> > pr_* printk wrappers
> > 
> > Signed-off-by: Fabio Aiuto 
> > ---
> >  drivers/staging/rtl8723bs/core/rtw_eeprom.c | 26 ++---
> >  1 file changed, 13 insertions(+), 13 deletions(-)
> > 
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_eeprom.c 
> > b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > index 3cbd65dee741..6176d741d60e 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> > @@ -36,7 +36,7 @@ void shift_out_bits(_adapter *padapter, u16 data, u16 
> > count)
> >  _func_enter_;
> >  
> > if (padapter->bSurpriseRemoved == true) {
> > -   RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
> > ("padapter->bSurpriseRemoved==true"));

I looked at this ---^
and so I thought that pr_err was good...

> > +   pr_err("%s padapter->bSurpriseRemoved==true", DRIVER_PREFIX);
> 
> As Dan said, this is not the same thing.  You are now always printing
> out this mess, when before you were not unless you explicitly enabled
> "tracing".
> 
> And you are sending it to the error log?
> 
> And finally, drivers should never be using pr_*() for messages, they
> should be using dev_*() instead as they are a driver and have access to
> a device pointer.
> 

thank you, I didn't know about dev_*

> thanks,
> 
> greg k-h

my aim was remove private macros replicating component tracing and log levels...

so what's best? Keep a simplyfied RT_TRACE encapsulating a dev_* call?

thank you,

fabio



Re: [PATCH 03/40] staging: rtl8723bs: replace RT_TRACE with public printk wrappers in core/rtw_eeprom.c

2021-03-31 Thread Greg KH
On Wed, Mar 31, 2021 at 11:39:31AM +0200, Fabio Aiuto wrote:
> replace private macro RT_TRACE for tracing with in-kernel
> pr_* printk wrappers
> 
> Signed-off-by: Fabio Aiuto 
> ---
>  drivers/staging/rtl8723bs/core/rtw_eeprom.c | 26 ++---
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_eeprom.c 
> b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> index 3cbd65dee741..6176d741d60e 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
> @@ -36,7 +36,7 @@ void shift_out_bits(_adapter *padapter, u16 data, u16 count)
>  _func_enter_;
>  
>   if (padapter->bSurpriseRemoved == true) {
> - RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
> ("padapter->bSurpriseRemoved==true"));
> + pr_err("%s padapter->bSurpriseRemoved==true", DRIVER_PREFIX);

As Dan said, this is not the same thing.  You are now always printing
out this mess, when before you were not unless you explicitly enabled
"tracing".

And you are sending it to the error log?

And finally, drivers should never be using pr_*() for messages, they
should be using dev_*() instead as they are a driver and have access to
a device pointer.

thanks,

greg k-h


[PATCH 03/40] staging: rtl8723bs: replace RT_TRACE with public printk wrappers in core/rtw_eeprom.c

2021-03-31 Thread Fabio Aiuto
replace private macro RT_TRACE for tracing with in-kernel
pr_* printk wrappers

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_eeprom.c | 26 ++---
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_eeprom.c 
b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
index 3cbd65dee741..6176d741d60e 100644
--- a/drivers/staging/rtl8723bs/core/rtw_eeprom.c
+++ b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
@@ -36,7 +36,7 @@ void shift_out_bits(_adapter *padapter, u16 data, u16 count)
 _func_enter_;
 
if (padapter->bSurpriseRemoved == true) {
-   RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
("padapter->bSurpriseRemoved==true"));
+   pr_err("%s padapter->bSurpriseRemoved==true", DRIVER_PREFIX);
goto out;
}
mask = 0x01 << (count - 1);
@@ -49,8 +49,8 @@ _func_enter_;
if (data & mask)
x |= _EEDI;
if (padapter->bSurpriseRemoved == true) {
-   RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
("padapter->bSurpriseRemoved==true"));
-   goto out;
+   pr_err("%s padapter->bSurpriseRemoved==true", 
DRIVER_PREFIX);
+   goto out;
}
rtw_write8(padapter, EE_9346CR, (u8)x);
udelay(CLOCK_RATE);
@@ -59,7 +59,7 @@ _func_enter_;
mask = mask >> 1;
} while (mask);
if (padapter->bSurpriseRemoved == true) {
-   RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
("padapter->bSurpriseRemoved==true"));
+   pr_err("%s padapter->bSurpriseRemoved==true", DRIVER_PREFIX);
goto out;
}
x &= ~_EEDI;
@@ -73,7 +73,7 @@ u16 shift_in_bits(_adapter *padapter)
u16 x, d = 0, i;
 _func_enter_;
if (padapter->bSurpriseRemoved == true) {
-   RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
("padapter->bSurpriseRemoved==true"));
+   pr_err("%s padapter->bSurpriseRemoved==true", DRIVER_PREFIX);
goto out;
}
x = rtw_read8(padapter, EE_9346CR);
@@ -85,7 +85,7 @@ _func_enter_;
d = d << 1;
up_clk(padapter, );
if (padapter->bSurpriseRemoved == true) {
-   RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
("padapter->bSurpriseRemoved==true"));
+   pr_err("%s padapter->bSurpriseRemoved==true", DRIVER_PREFIX);
goto out;
}
x = rtw_read8(padapter, EE_9346CR);
@@ -123,23 +123,23 @@ void eeprom_clean(_adapter *padapter)
u16 x;
 _func_enter_;
if (padapter->bSurpriseRemoved == true) {
-   RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
("padapter->bSurpriseRemoved==true"));
+   pr_err("%s padapter->bSurpriseRemoved==true", DRIVER_PREFIX);
goto out;
}
x = rtw_read8(padapter, EE_9346CR);
if (padapter->bSurpriseRemoved == true) {
-   RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
("padapter->bSurpriseRemoved==true"));
+   pr_err("%s padapter->bSurpriseRemoved==true", DRIVER_PREFIX);
goto out;
}
x &= ~(_EECS | _EEDI);
rtw_write8(padapter, EE_9346CR, (u8)x);
if (padapter->bSurpriseRemoved == true) {
-   RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
("padapter->bSurpriseRemoved==true"));
+   pr_err("%s padapter->bSurpriseRemoved==true", DRIVER_PREFIX);
goto out;
}
up_clk(padapter, );
-   if (padapter->bSurpriseRemoved == true) {
-   RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
("padapter->bSurpriseRemoved==true"));
+   if (padapter->bSurpriseRemoved == true) {
+   pr_err("%s padapter->bSurpriseRemoved==true", DRIVER_PREFIX);
goto out;
}
down_clk(padapter, );
@@ -156,14 +156,14 @@ u16 eeprom_read16(_adapter *padapter, u16 reg) 
/*ReadEEprom*/
 _func_enter_;
 
if (padapter->bSurpriseRemoved == true) {
-   RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
("padapter->bSurpriseRemoved==true"));
+   pr_err("%s padapter->bSurpriseRemoved==true", DRIVER_PREFIX);
goto out;
}
/* select EEPROM, reset bits, set _EECS*/
x = rtw_read8(padapter, EE_9346CR);
 
if (padapter->bSurpriseRemoved == true) {
-   RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, 
("padapter->bSurpriseRemoved==true"));
+   pr_err("%s padapter->bSurpriseRemoved==true", DRIVER_PREFIX);
goto out;
}
 
-- 
2.20.1