lkml.org 
[lkml]   [2022]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2022-01-26 12:14    [W:0.035 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site