All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	linux-rtc@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 7/8] rtc: rework rtc_register_device() resource management
Date: Fri, 27 Nov 2020 13:22:28 +0000	[thread overview]
Message-ID: <20201127132228.GV2455276@dell> (raw)
In-Reply-To: <CAMpxmJXa8L0TaeENeYsypmgfkabdP8pH6H6iniwmy0KJs8w4Pg@mail.gmail.com>

On Fri, 27 Nov 2020, Bartosz Golaszewski wrote:

> On Fri, Nov 27, 2020 at 10:16 AM Lee Jones <lee.jones@linaro.org> wrote:
> >
> >
> >
> > On Mon, 9 Nov 2020 at 16:34, Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> >>
> >> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> >>
> >> rtc_register_device() is a managed interface but it doesn't use devres
> >> by itself - instead it marks an rtc_device as "registered" and the devres
> >> callback for devm_rtc_allocate_device() takes care of resource release.
> >>
> >> This doesn't correspond with the design behind devres where managed
> >> structures should not be aware of being managed. The correct solution
> >> here is to register a separate devres callback for unregistering the
> >> device.
> >>
> >> While at it: rename rtc_register_device() to devm_rtc_register_device()
> >> and add it to the list of managed interfaces in devres.rst. This way we
> >> can avoid any potential confusion of driver developers who may expect
> >> there to exist a corresponding unregister function.
> >>
> >> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> >> ---
> >>  .../driver-api/driver-model/devres.rst        |  1 +
> >>  arch/alpha/kernel/rtc.c                       |  2 +-
> >>  drivers/mfd/menelaus.c                        |  2 +-
> >
> >
> > This patch should have been sent to and Acked by MFD too.
> >
> 
> Sorry Lee, I missed the fact that there were changes outside of
> drivers/rtc/. Other than skipping the MFD maintainer - do you see
> anything wrong in that bit?

No real harm done.

The patch looks fine from an MFD standpoint.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2020-11-27 13:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-09 16:34 [PATCH 0/8] rtc: rework resource management Bartosz Golaszewski
2020-11-09 16:34 ` [PATCH 1/8] rtc: omap: use devm_pinctrl_register() Bartosz Golaszewski
2020-11-09 16:34 ` [PATCH 2/8] Revert "rtc: sc27xx: Always read normal alarm when registering RTC device" Bartosz Golaszewski
2020-11-17 21:23   ` Alexandre Belloni
2020-11-09 16:34 ` [PATCH 3/8] Documentation: list RTC devres helpers in devres.rst Bartosz Golaszewski
2020-11-09 16:34 ` [PATCH 4/8] rtc: nvmem: remove nvram ABI Bartosz Golaszewski
2020-11-09 16:34 ` [PATCH 5/8] rtc: add devm_ prefix to rtc_nvmem_register() Bartosz Golaszewski
2020-11-09 16:34 ` [PATCH 6/8] rtc: nvmem: emit an error message when nvmem registration fails Bartosz Golaszewski
2020-11-09 16:34 ` [PATCH 7/8] rtc: rework rtc_register_device() resource management Bartosz Golaszewski
2020-11-17 21:35   ` Alexandre Belloni
2020-11-18  8:13     ` Bartosz Golaszewski
     [not found]   ` <CAF2Aj3inp8=dn9xuc8f3uJbL+m5LH7W3BDoOeZyiiOupmbfgOw@mail.gmail.com>
2020-11-27  9:23     ` Bartosz Golaszewski
2020-11-27 13:22       ` Lee Jones [this message]
2020-11-09 16:34 ` [PATCH 8/8] rtc: shrink devm_rtc_allocate_device() Bartosz Golaszewski
2020-11-17 22:57 ` [PATCH 0/8] rtc: rework resource management Alexandre Belloni

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=20201127132228.GV2455276@dell \
    --to=lee.jones@linaro.org \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=brgl@bgdev.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.