Re: [PATCH *-next 00/18] Remove weird and needless 'return' for void APIs

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

 



On Fri, 2025-02-21 at 11:00 -0800, Stephen Hemminger wrote:
> 
> Is this something that could be done with a coccinelle script?
> 

Almost enough to do this:

@@
identifier fn;
expression E;
@@
void fn(...)
{
...
-return
E;
}


It takes a long time to run though, and does some wrong things as well:
if the return is in the middle of the function, it still matches and
removes it erroneously.

johannes





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux