All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-renesas-soc@vger.kernel.org,
	Dirk Behme <dirk.behme@de.bosch.com>,
	 linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mmc: tmio: comment the ERR_PTR usage in this driver
Date: Tue, 5 Mar 2024 13:14:48 +0100	[thread overview]
Message-ID: <CAPDyKFr_GyWVXPbaeLf5hp_SKuRpr9sixhDQxoYBbFEU2qiJ-Q@mail.gmail.com> (raw)
In-Reply-To: <20240305105623.3379-2-wsa+renesas@sang-engineering.com>

On Tue, 5 Mar 2024 at 11:56, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> It is not super obvious why the driver sometimes uses an ERR_PTR for the
> current mrq. Explain why in comments.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/tmio_mmc_core.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
> index c253d176db69..93e912afd3ae 100644
> --- a/drivers/mmc/host/tmio_mmc_core.c
> +++ b/drivers/mmc/host/tmio_mmc_core.c
> @@ -972,6 +972,7 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>                 return;
>         }
>
> +       /* Disallow new mrqs and work handlers to run */
>         host->mrq = ERR_PTR(-EBUSY);
>
>         spin_unlock_irqrestore(&host->lock, flags);
> @@ -1006,8 +1007,9 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>                         "%s.%d: IOS interrupted: clk %u, mode %u",
>                         current->comm, task_pid_nr(current),
>                         ios->clock, ios->power_mode);
> -       host->mrq = NULL;
>
> +       /* Ready for new mrqs */
> +       host->mrq = NULL;
>         host->clk_cache = ios->clock;
>
>         mutex_unlock(&host->ios_lock);
> --
> 2.43.0
>

      parent reply	other threads:[~2024-03-05 12:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05 10:56 [PATCH] mmc: tmio: comment the ERR_PTR usage in this driver Wolfram Sang
2024-03-05 10:58 ` Wolfram Sang
2024-03-05 12:14 ` Ulf Hansson [this message]

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=CAPDyKFr_GyWVXPbaeLf5hp_SKuRpr9sixhDQxoYBbFEU2qiJ-Q@mail.gmail.com \
    --to=ulf.hansson@linaro.org \
    --cc=dirk.behme@de.bosch.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.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 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.