ksummit.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jiri Kosina <jikos@kernel.org>, ksummit@lists.linux.dev
Subject: Re: [MAINTAINER SUMMIT] Enforcing API deprecation
Date: Wed, 27 Aug 2025 17:07:25 +0200	[thread overview]
Message-ID: <CACMJSesxLDH+ZPcbFq+s-4E+3QmhU4JejYZ6-SoYBfM0ePCCtQ@mail.gmail.com> (raw)
In-Reply-To: <CAHk-=wi2E0BBX1ZUEo5B5a0E+M_eFU_NgWgp+cABfsqR9f-cAQ@mail.gmail.com>

On Wed, 27 Aug 2025 at 00:44, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>

[snip]

>
> Perfect is often the enemy of good. Making the new API easier to
> convert to, in the name of making for a smoother development model,
> may be the right thing to do, even if maybe the new API isn't then
> everything you would want it to be.
>
> I suspect Bartosz comes at this from the recent GPIO setting changes,
> and honestly, I do think that could have been done with a coccinelle
> script originally, instead of doing a parallel API at all.
>

No, not at all, that was super easy as the conversions were - for most
part - trivial and while I did catch some new incoming code with the
old callbacks, the whole conversion took 2 or 3 cycles so that wasn't
an issue.

I'm mostly referring to the conversion from global GPIO numbers to
GPIO descriptors. This change is so profound that the two APIs don't
even have much in common (including their implementations) so most of
your points above don't apply: there's a fundamental difference
between requesting a global GPIO number that's a magic value defined
somewhere and getting it through device property accessors. We do, of
course, have a compatibility layer for that but it's janky at best.

This is the conversion that's really challenging and taking years and
the progress is slow because you have to functionally test these
changes. This cannot be automated or coccinelled away because it
touches on providers, consumers and firmware nodes.

And in the process: even really experienced developers (I won't point
fingers :) ) sometimes submit patches using the legacy API which is
something I'd like to avoid, hence this proposal.

Bartosz

  parent reply	other threads:[~2025-08-27 15:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-26 19:57 Bartosz Golaszewski
2025-08-26 20:12 ` Linus Torvalds
2025-08-26 20:28   ` Jiri Kosina
2025-08-26 22:44     ` Linus Torvalds
2025-08-26 23:25       ` Al Viro
2025-08-27 15:07       ` Bartosz Golaszewski [this message]
2025-08-27 16:42         ` Rob Herring
2025-08-27 16:57           ` Linus Torvalds
2025-08-28 15:11             ` Bartosz Golaszewski
2025-09-03 13:19               ` Eric W. Biederman
2025-08-27 14:47   ` Bartosz Golaszewski
2025-08-27 14:58     ` Julia Lawall
2025-08-27 15:31       ` Bartosz Golaszewski
2025-08-29  9:00     ` Krzysztof Kozlowski
2025-08-26 20:24 ` Johannes Berg
2025-08-26 21:02   ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACMJSesxLDH+ZPcbFq+s-4E+3QmhU4JejYZ6-SoYBfM0ePCCtQ@mail.gmail.com \
    --to=bartosz.golaszewski@linaro.org \
    --cc=jikos@kernel.org \
    --cc=ksummit@lists.linux.dev \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox