mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Ulf Hansson <ulf.hansson@oss.qualcomm.com>
Cc: linux-mmc@vger.kernel.org, Ulf Hansson <ulfh@kernel.org>,
	Rui Miguel Silva <rmfrfs@gmail.com>,
	Alex Elder <elder@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mmc: core: Turn mmc_alloc|free_host() into static functions
Date: Wed, 16 Sep 2026 09:43:19 +0200	[thread overview]
Message-ID: <aqpIl5NWCFiuKy9b@hovoldconsulting.com> (raw)
In-Reply-To: <20260915132052.273212-3-ulf.hansson@oss.qualcomm.com>

On Tue, Sep 15, 2026 at 03:20:46PM +0200, Ulf Hansson wrote:
> From: Ulf Hansson <ulfh@kernel.org>
> 
> As there are no longer any users of these functions, let's make them
> internal to the mmc core. 

Why would you want to do that? The devres helpers should just be simple
wrappers around these and sometimes devres just isn't a good fit.

Especially with the work cancellations present in mmc_free_host() (which
I have pointed out elsewhere should not be there), a driver may need to
free the host before tearing down other non-devres managed resources
during unbind.

This may even be needed for greybus which currently destroys the
connection before freeing the host.

I suggest you just keep the non-devres interface around (after updating
the prototype).

> While at it, let's also flip the order of the
> in-parameters to mmc_alloc_host() to be consistent with devm_alloc_host().

Johan

  parent reply	other threads:[~2026-09-16  7:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 13:20 [PATCH 0/2] mmc: core: Avoid export of mmc_alloc|free_host() Ulf Hansson
2026-09-15 13:20 ` [PATCH 1/2] staging: greybus: sdio: Convert to devm_mmc_alloc_host() Ulf Hansson
2026-09-15 13:47   ` Rui Miguel Silva
2026-09-16  7:37   ` Greg Kroah-Hartman
2026-09-15 13:20 ` [PATCH 2/2] mmc: core: Turn mmc_alloc|free_host() into static functions Ulf Hansson
2026-09-16  0:33   ` Shawn Lin
2026-09-16  7:43   ` Johan Hovold [this message]
2026-09-16  9:36     ` Ulf Hansson
2026-09-16 10:00       ` Johan Hovold

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=aqpIl5NWCFiuKy9b@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=rmfrfs@gmail.com \
    --cc=ulf.hansson@oss.qualcomm.com \
    --cc=ulfh@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®