lkml.org 
[lkml]   [2022]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 06/10] staging: r8188eu: remove DBG_88E calls from os_dep/ioctl_linux.c
From
Hi Phillip,

On 1/26/22 04:13, Phillip Potter wrote:

[snip]

}
>>
>> And here you also removes the reads. I guess, some kind of magic pattern is
>> used
>>
>
> So these calls are macro arguments, they would never be executed under
> normal circumstances anyway, unless the rtw_debug kernel module was
> passed in as 5 or more - it is 1 by default. The DBG_88E macro would
> expand during preprocessing phase to (for example):
>
> do {
> if (5 <= GlobalDebugLevel)
> pr_info("R8188EU: " "dbg(0x450) = 0x%x\n", rtw_read32(padapter, 0x450));
> } while (0)
>
> As this is never executed under normal circumstances anyway, I would say
> calls like these are therefore safe to remove. Happy to be convinced
> though :-) Many thanks.
>

I see your point, thanks for explanation.

Well, in this case, you may left all reads, that are executed during
normal lifetime of a driver. We know, that there is at least 1 place,
where read() call removal can break things. Might be there are couple of
other places we don't know about.

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.

Thanks :)




With regards,
Pavel Skripkin

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