Re: [MAINTAINER SUMMIT] Enforcing API deprecation

Eric W. Biederman
2025-09-03T14:18:28Z

Bartosz Golaszewski <bartosz.golaszewski@linaro.org> writes:

> On Wed, 27 Aug 2025 at 18:58, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>>
>> All I'm saying is that people who do new API's should either just
>> accept that, or just convert between the two. None of this "deprecate"
>> garbage. None of this "blame other developers because they use the old
>> interface".
>>
>
> How about "let developers know, people are actively working to replace
> this old, bad* API with a better alternative so at least don't
> (unknowingly) sabotage their efforts"?

Perhaps the old API could be hidden in the header files unless
an appropriate macro is defined before including the headers.
Something like:

#define I_REALLY_REALLY_WANT_TO_USE_THIS_OLD_JANKY_API

Everything can be mass converted to that safely, and any random
stragglers can be updated quickly.

At which point any new uses will be at least give people a hint
that something else is going on. There would still be a lot of
cat herding involved to get the conversion done.

Finding uses of the old api would be a simple as grepping for the
define, or changing the define in the header and doing a complete
kernel build.

Eric