Re: Coccinelle: Add a SmPL script for the reconsideration of redundant dev_err() calls

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

 



> I think that something like
>
> if (IS_ERR(e))
> {
> <+...
> *dev_err(...)
> ...+>
> }
>
> would be more appropriate.  Whether there is a return or not doesn't
> really matter.

Do you find the following SmPL change specification useful and acceptable?


@deletion depends on patch@
expression e;
@@
 e = devm_ioremap_resource(...);
 if (IS_ERR(e))
(
-{
-   dev_err(...);
    return (...);
-}
|{
 <+...
-   dev_err(...);
 ...+>
 }
)


Would this approach need a version check for the Coccinelle software?

Regards,
Markus




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux