[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YfEtDN6qiRci02Xe@kroah.com>
Date: Wed, 26 Jan 2022 12:14:20 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Pavel Skripkin <paskripkin@...il.com>
Cc: Phillip Potter <phil@...lpotter.co.uk>, dan.carpenter@...cle.com,
Larry.Finger@...inger.net, straube.linux@...il.com,
martin@...ser.cx, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 06/10] staging: r8188eu: remove DBG_88E calls from
os_dep/ioctl_linux.c
On Wed, Jan 26, 2022 at 01:58:52PM +0300, Pavel Skripkin wrote:
> Hi Greg,
>
> On 1/26/22 13:48, Greg KH wrote:
> > > IMHO the best thing you can do is to leave these reads and leave a comment
> > > like "hey, please remove me and test". One day useless reads should be
> > > anyway removed, since ideally rtw_read family must get __must_check
> > > annotation + normal error handling.
> >
> > No, if these were never getting called in normal operation, there's no
> > need to add them back.
> >
>
> I guess, I was not clear, sorry. I mean leave reads that were called during
> normal operations, but used only for printing debug info. (As Phillip has
> already done in v1)
>
> Reads inside R88_DBG() and other debug macros of course should be removed,
> but other places seems dangerous without good testing. There is al least one
> place with following comment:
>
> > /* Although lenc is only used in a debug statement,
> > * do not remove it as the rtw_read16() call consumes
> > * 2 bytes from the EEPROM source.
> > */
> > u16 lenc = rtw_read16(adapter, REG_PKTBUF_DBG_DATA_L);
>
> There is a chance that other places have same problem, but don't have a
> comment above it. That's why I suggested to leave all these "debug" reads
> and leave a comment for further work. It will help to easily spot them in
> future and remove or leave them with explanations why.
Yes, those are fine, thanks.
Powered by blists - more mailing lists