[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210401091031.GB1442@agape.jhs>
Date: Thu, 1 Apr 2021 11:10:32 +0200
From: Fabio Aiuto <fabioaiuto83@...il.com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: joe@...ches.com, dan.carpenter@...cle.com,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 03/40] staging: rtl8723bs: replace RT_TRACE with public
printk wrappers in core/rtw_eeprom.c
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 <fabioaiuto83@...il.com>
> > > > ---
> > > > 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
Powered by blists - more mailing lists