From: Ulf Hansson <ulf.hansson@linaro.org>
To: Yue Hu <zbestahu@gmail.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Yue Hu <huyue2@yulong.com>,
zbestahu@163.com
Subject: Re: [PATCH] mmc: core: remove needless err = 0 in mmc_init_card()
Date: Wed, 13 Jan 2021 14:07:36 +0100 [thread overview]
Message-ID: <CAPDyKFqzKf44RV29c+ncKffgRQrz7gSHNGmmKqeYWJMj5rQ0hw@mail.gmail.com> (raw)
In-Reply-To: <20210113113431.522-1-zbestahu@gmail.com>
On Wed, 13 Jan 2021 at 12:34, Yue Hu <zbestahu@gmail.com> wrote:
>
> From: Yue Hu <huyue2@yulong.com>
>
> Since they will always being in successful path to return 0 directly,
> no need to set err = 0.
>
> Signed-off-by: Yue Hu <huyue2@yulong.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/core/mmc.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index ff3063c..54ab1c7 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -1697,7 +1697,6 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
> goto free_card;
>
> if (err) {
> - err = 0;
> /*
> * Just disable enhanced area off & sz
> * will try to enable ERASE_GROUP_DEF
> @@ -1802,7 +1801,6 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
> pr_warn("%s: Enabling HPI failed\n",
> mmc_hostname(card->host));
> card->ext_csd.hpi_en = 0;
> - err = 0;
> } else {
> card->ext_csd.hpi_en = 1;
> }
> @@ -1831,7 +1829,6 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
> pr_warn("%s: Cache is supported, but failed to turn on (%d)\n",
> mmc_hostname(card->host), err);
> card->ext_csd.cache_ctrl = 0;
> - err = 0;
> } else {
> card->ext_csd.cache_ctrl = 1;
> }
> @@ -1851,7 +1848,6 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
> mmc_hostname(card->host));
> card->ext_csd.cmdq_support = false;
> card->ext_csd.cmdq_depth = 0;
> - err = 0;
> }
> }
> /*
> --
> 1.9.1
>
prev parent reply other threads:[~2021-01-13 13:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-13 11:34 [PATCH] mmc: core: remove needless err = 0 in mmc_init_card() Yue Hu
2021-01-13 13:07 ` 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=CAPDyKFqzKf44RV29c+ncKffgRQrz7gSHNGmmKqeYWJMj5rQ0hw@mail.gmail.com \
--to=ulf.hansson@linaro.org \
--cc=huyue2@yulong.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=zbestahu@163.com \
--cc=zbestahu@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;
as well as URLs for NNTP newsgroup(s).