[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b6da2cde-b489-0b9d-819f-c36cd64f9531@gmail.com>
Date: Wed, 26 Jan 2022 13:58:52 +0300
From: Pavel Skripkin <paskripkin@...il.com>
To: Greg KH <gregkh@...uxfoundation.org>
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
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.
With regards,
Pavel Skripkin
Powered by blists - more mailing lists