[Ksummit-discuss] [MAINTAINERS SUMMIT] API replacement/deprecation

Alexandre Belloni alexandre.belloni at bootlin.com
Fri Sep 7 10:25:19 UTC 2018


On 07/09/2018 12:54:37+0300, Jani Nikula wrote:
> On Fri, 07 Sep 2018, Julia Lawall <julia.lawall at lip6.fr> wrote:
> > I came up with the following Coccinelle semantic patch.  The advantage is
> > that it can also give a hint as to what should be done.  The intent is
> > that it should be easily extensible.
> 
> The only real downside that I can see is that it centralizes the
> deprecation information in the semantic patch instead of the functions
> themselves.
> 

Which is not bad because how do you expect maintainers to learn about
the deprecation?
I don't think anyone will go and read the strcpy's code or
documentation.

The same holds true for the introduction of new helpers. There is often
a treewide commit adding its usage that doesn't get send to all the
maintainers so there is zero chance to learn about them. For example the
recent:

0ed2dd03b94b treewide: Use struct_size() for devm_kmalloc() and friends
b4b06db115bb treewide: Use struct_size() for vmalloc()-family
acafe7e30216 treewide: Use struct_size() for kmalloc()-family

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the Ksummit-discuss mailing list