Search Linux Wireless

Re: [RFC v5 08/13] rtw88: debug files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2018-11-05 at 06:13 +0000, Tony Chuang wrote:
> > -----Original Message-----
> > From: Joe Perches [mailto:joe@xxxxxxxxxxx]
> > Sent: Sunday, November 04, 2018 12:29 PM
> > To: Tony Chuang; kvalo@xxxxxxxxxxxxxx; sgruszka@xxxxxxxxxx
> > Cc: Larry.Finger@xxxxxxxxxxxx; linux-wireless@xxxxxxxxxxxxxxx; Pkshih; Andy
> > Huang; johannes@xxxxxxxxxxxxxxxx
> > Subject: Re: [RFC v5 08/13] rtw88: debug files
> > 
> > On Wed, 2018-10-31 at 18:12 +0800, yhchuang@xxxxxxxxxxx wrote
> > > From: Yan-Hsuan Chuang <yhchuang@xxxxxxxxxxx>
> > > debug files for Realtek 802.11ac wireless network chips
> > []
> > > diff --git a/drivers/net/wireless/realtek/rtw88/debug.h
> > b/drivers/net/wireless/realtek/rtw88/debug.h
> > []
> > > +#ifdef CONFIG_RTW88_DEBUG
> > []
> > > +#else
> > > +
> > > +static inline void rtw_dbg(struct rtw_dev *rtwdev, const char *fmt, ...) {}
> > > +static inline void rtw_info(struct rtw_dev *rtwdev, const char *fmt, ...) {}
> > > +static inline void rtw_warn(struct rtw_dev *rtwdev, const char *fmt, ...) {}
> > > +static inline void rtw_err(struct rtw_dev *rtwdev, const char *fmt, ...) {}
> > 
> > I still think it's _very, very bad_, and extremely
> > unusual to turn off _all_ logging, even for error
> > conditions, based on a debug config flag.
> > 
[]
> So I think we should move rtw_[err/warn/info] out of the flag.
> Should we need to send it in RFC v6 or in the next patch series?

Up to you.

I think you should look at all the rtw_err/rtw_warn/rtw_info uses
as many seem to be more like they should use rtw_dbg instead.

Also, I think the rtw_err/rtw_warn/rtw_info function calls aren't
particularly useful and these should be simple macros or static
inlines and not use %pV at all.

#define rtw_err(rtw_dev, fmt, ...)	\
	dev_err((rtw_dev)->dev, fmt, ##__VA_ARGS__)

etc





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux