public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
From: "Danilo Krummrich" <dakr@kernel.org>
To: "Bartosz Golaszewski" <brgl@kernel.org>
Cc: "Tzung-Bi Shih" <tzungbi@kernel.org>,
	"Benson Leung" <bleung@chromium.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	"Linus Walleij" <linusw@kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Shuah Khan" <shuah@kernel.org>, <linux-doc@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <chrome-platform@lists.linux.dev>,
	<linux-kselftest@vger.kernel.org>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
	"Simona Vetter" <simona.vetter@ffwll.ch>,
	"Dan Williams" <dan.j.williams@intel.com>,
	"Jason Gunthorpe" <jgg@nvidia.com>, <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH v7 1/3] revocable: Revocable resource management
Date: Fri, 16 Jan 2026 16:35:23 +0100	[thread overview]
Message-ID: <DFQ4H9T3QMLK.3TNZF7ID6EJB6@kernel.org> (raw)
In-Reply-To: <CAMRc=Medaqr5UPimc8o+VTy=9MgU5p8AXjArisQfBNqi7ktSGg@mail.gmail.com>

On Fri Jan 16, 2026 at 4:27 PM CET, Bartosz Golaszewski wrote:
> On Fri, Jan 16, 2026 at 4:20 PM Danilo Krummrich <dakr@kernel.org> wrote:
>>
>> On Fri Jan 16, 2026 at 9:02 AM CET, Tzung-Bi Shih wrote:
>> > diff --git a/MAINTAINERS b/MAINTAINERS
>> > index a671e3d4e8be..fd683c62012a 100644
>> > --- a/MAINTAINERS
>> > +++ b/MAINTAINERS
>> > @@ -22517,6 +22517,13 @@ F:   include/uapi/linux/rseq.h
>> >  F:   kernel/rseq.c
>> >  F:   tools/testing/selftests/rseq/
>> >
>> > +REVOCABLE RESOURCE MANAGEMENT
>> > +M:   Tzung-Bi Shih <tzungbi@kernel.org>
>> > +L:   linux-kernel@vger.kernel.org
>> > +S:   Maintained
>> > +F:   drivers/base/revocable.c
>> > +F:   include/linux/revocable.h
>>
>> NIT: I think we should add this include to the DRIVER CORE entry as well.
>
> FWIW: I'm not even sure drivers/base/ is the right place for this.
> Except for a few devm_ helpers, nothing here is inherently tied into
> the driver model This could be useful outside of device drivers and I
> would suggest to put it under lib/ with devres factored out into a
> separate source file.

It is indeed correct that in the end revocable is more of a generic
synchronization primitve.

In fact, the Revocable type in Rust is not listed under driver core
infrastructure either. However, it was introduced for use with Devres (which is
still the only user).

I think the, by far, most common use-case where a resource is revoked from an
entity are device resources revoked by devres.

So, I'd say let's factor it out once we see interest by more users?

  reply	other threads:[~2026-01-16 15:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-16  8:02 [PATCH v7 0/3] drivers/base: Introduce revocable Tzung-Bi Shih
2026-01-16  8:02 ` [PATCH v7 1/3] revocable: Revocable resource management Tzung-Bi Shih
2026-01-16 15:19   ` Danilo Krummrich
2026-01-16 15:27     ` Bartosz Golaszewski
2026-01-16 15:35       ` Danilo Krummrich [this message]
2026-01-16 16:04       ` Laurent Pinchart
2026-01-16 16:41         ` Danilo Krummrich
2026-01-16 18:19           ` Bartosz Golaszewski
2026-01-16 18:24             ` Jason Gunthorpe
2026-01-16 18:31               ` Bartosz Golaszewski
2026-02-04 13:12   ` Bartosz Golaszewski
2026-01-16  8:02 ` [PATCH v7 2/3] revocable: Add Kunit test cases Tzung-Bi Shih
2026-01-16  8:02 ` [PATCH v7 3/3] selftests: revocable: Add kselftest cases Tzung-Bi Shih
2026-01-16 15:17 ` [PATCH v7 0/3] drivers/base: Introduce revocable Greg Kroah-Hartman
2026-01-16 16:04   ` Laurent Pinchart
2026-01-16 16:16     ` Danilo Krummrich
2026-01-16 16:52       ` Jason Gunthorpe
2026-01-16 17:00         ` Danilo Krummrich

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=DFQ4H9T3QMLK.3TNZF7ID6EJB6@kernel.org \
    --to=dakr@kernel.org \
    --cc=bleung@chromium.org \
    --cc=brgl@kernel.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=corbet@lwn.net \
    --cc=dan.j.williams@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jgg@nvidia.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linusw@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=shuah@kernel.org \
    --cc=simona.vetter@ffwll.ch \
    --cc=tzungbi@kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    /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