mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rui Miguel Silva <rui.silva@linaro.org>
To: "Ulf Hansson" <ulf.hansson@oss.qualcomm.com>,
	<linux-mmc@vger.kernel.org>, "Ulf Hansson" <ulfh@kernel.org>
Cc: "Rui Miguel Silva" <rmfrfs@gmail.com>,
	"Johan Hovold" <johan@kernel.org>,
	"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 1/2] staging: greybus: sdio: Convert to devm_mmc_alloc_host()
Date: Tue, 15 Sep 2026 14:47:31 +0100	[thread overview]
Message-ID: <DLFXQIQX6Y6W.13CBS3NB0BTI4@linaro.com> (raw)
In-Reply-To: <20260915132052.273212-2-ulf.hansson@oss.qualcomm.com>

Hey Ulf,
Thanks for the patch.

On Tue Sep 15, 2026 at 2:20 PM WEST, Ulf Hansson wrote:

> From: Ulf Hansson <ulfh@kernel.org>
>
> Simplify the code by converting from mmc_alloc_host() to the resource
> managed devm_mmc_alloc_host().
>
> Signed-off-by: Ulf Hansson <ulfh@kernel.org>

LGTM,

Acked-by: Rui Miguel Silva <rui.silva@linaro.org>

Cheers,
    Rui
> ---
>  drivers/staging/greybus/sdio.c | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/greybus/sdio.c b/drivers/staging/greybus/sdio.c
> index 3952f3d225db..642d785fe918 100644
> --- a/drivers/staging/greybus/sdio.c
> +++ b/drivers/staging/greybus/sdio.c
> @@ -767,17 +767,15 @@ static int gb_sdio_probe(struct gbphy_device *gbphy_dev,
>  	struct gb_sdio_host *host;
>  	int ret = 0;
>  
> -	mmc = mmc_alloc_host(sizeof(*host), &gbphy_dev->dev);
> +	mmc = devm_mmc_alloc_host(&gbphy_dev->dev, sizeof(*host));
>  	if (!mmc)
>  		return -ENOMEM;
>  
>  	connection = gb_connection_create(gbphy_dev->bundle,
>  					  le16_to_cpu(gbphy_dev->cport_desc->id),
>  					  gb_sdio_request_handler);
> -	if (IS_ERR(connection)) {
> -		ret = PTR_ERR(connection);
> -		goto exit_mmc_free;
> -	}
> +	if (IS_ERR(connection))
> +		return PTR_ERR(connection);
>  
>  	host = mmc_priv(mmc);
>  	host->mmc = mmc;
> @@ -835,8 +833,6 @@ static int gb_sdio_probe(struct gbphy_device *gbphy_dev,
>  	gb_connection_disable(connection);
>  exit_connection_destroy:
>  	gb_connection_destroy(connection);
> -exit_mmc_free:
> -	mmc_free_host(mmc);
>  
>  	return ret;
>  }
> @@ -863,7 +859,6 @@ static void gb_sdio_remove(struct gbphy_device *gbphy_dev)
>  	mmc_remove_host(mmc);
>  	gb_connection_disable(connection);
>  	gb_connection_destroy(connection);
> -	mmc_free_host(mmc);
>  }
>  
>  static const struct gbphy_device_id gb_sdio_id_table[] = {
> -- 
> 2.43.0




  reply	other threads:[~2026-09-15 13:47 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 [this message]
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
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=DLFXQIQX6Y6W.13CBS3NB0BTI4@linaro.com \
    --to=rui.silva@linaro.org \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@kernel.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®