mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Victor Shih <victorshihgli@gmail.com>
Cc: adrian.hunter@intel.com, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org, benchuanggli@gmail.com,
	HL.Liu@genesyslogic.com.tw, Greg.tu@genesyslogic.com.tw,
	Victor Shih <victor.shih@genesyslogic.com.tw>
Subject: Re: [PATCH V1] mmc: core: Cleanup mmc_sd_num_wr_blocks function
Date: Fri, 11 Aug 2023 12:45:42 +0200	[thread overview]
Message-ID: <CAPDyKFrCObwmjnZP0Nc3FUfckvjSFMSM0dpfmp_2gPpgYdiRhg@mail.gmail.com> (raw)
In-Reply-To: <20230811101404.4463-1-victorshihgli@gmail.com>

On Fri, 11 Aug 2023 at 12:14, Victor Shih <victorshihgli@gmail.com> wrote:
>
> From: Victor Shih <victor.shih@genesyslogic.com.tw>
>
> Use mmc_app_cmd function to simplify code in
> mmc_sd_num_wr_blocks function.
>
> Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw>

Applied for next (by amending a minor part, see below), thanks!

Kind regards
Uffe

> ---
>  drivers/mmc/core/block.c | 14 +++-----------
>  1 file changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
> index f701efb1fa78..c665b25bffc3 100644
> --- a/drivers/mmc/core/block.c
> +++ b/drivers/mmc/core/block.c
> @@ -918,17 +918,9 @@ static int mmc_sd_num_wr_blocks(struct mmc_card *card, u32 *written_blocks)
>
>         struct scatterlist sg;
>
> -       cmd.opcode = MMC_APP_CMD;
> -       cmd.arg = card->rca << 16;
> -       cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_AC;
> -
> -       err = mmc_wait_for_cmd(card->host, &cmd, 0);
> -       if (err)
> -               return err;
> -       if (!mmc_host_is_spi(card->host) && !(cmd.resp[0] & R1_APP_CMD))
> -               return -EIO;
> -
> -       memset(&cmd, 0, sizeof(struct mmc_command));
> +       err = mmc_app_cmd(card->host, card);
> +               if (err)

This is one more indentation than required. As I said above, I have
fixed it up before applying, no action from you needed this time.


> +                       return err;
>
>         cmd.opcode = SD_APP_SEND_NUM_WR_BLKS;
>         cmd.arg = 0;
> --
> 2.25.1
>

      reply	other threads:[~2023-08-11 10:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11 10:14 Victor Shih
2023-08-11 10:45 ` 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=CAPDyKFrCObwmjnZP0Nc3FUfckvjSFMSM0dpfmp_2gPpgYdiRhg@mail.gmail.com \
    --to=ulf.hansson@linaro.org \
    --cc=Greg.tu@genesyslogic.com.tw \
    --cc=HL.Liu@genesyslogic.com.tw \
    --cc=adrian.hunter@intel.com \
    --cc=benchuanggli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=victor.shih@genesyslogic.com.tw \
    --cc=victorshihgli@gmail.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

all inboxes | Powered by JetHome®