From: Jaehoon Chung <jh80.chung@samsung.com>
To: Ulf Hansson <ulf.hansson@stericsson.com>
Cc: linux-mmc@vger.kernel.org, Chris Ball <cjb@laptop.org>,
Ulf Hansson <ulf.hansson@linaro.org>
Subject: Re: [PATCH 1/4] mmc: core: Remove unnecessary check for the remove callback
Date: Fri, 31 May 2013 16:43:52 +0900 [thread overview]
Message-ID: <51A854B8.3020605@samsung.com> (raw)
In-Reply-To: <1369918391-15277-2-git-send-email-ulf.hansson@stericsson.com>
Hi Ulf,
According to your commit message, host->bus_ops is also always existed, isn't?
Best Regards,
Jaehoon Chung
On 05/30/2013 09:53 PM, Ulf Hansson wrote:
> From: Ulf Hansson <ulf.hansson@linaro.org>
>
> For every bus_ops type the .remove callback always exist, thus there
> are no need to check the existence of it, before we decide to call it.
>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
> drivers/mmc/core/core.c | 11 +++--------
> 1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index e9a104b..d2ee282 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -2483,9 +2483,7 @@ void mmc_stop_host(struct mmc_host *host)
> mmc_bus_get(host);
> if (host->bus_ops && !host->bus_dead) {
> /* Calling bus_ops->remove() with a claimed host can deadlock */
> - if (host->bus_ops->remove)
> - host->bus_ops->remove(host);
> -
> + host->bus_ops->remove(host);
> mmc_claim_host(host);
> mmc_detach_bus(host);
> mmc_power_off(host);
> @@ -2638,8 +2636,7 @@ int mmc_suspend_host(struct mmc_host *host)
> * bus_ops->remove() with a claimed host can
> * deadlock.)
> */
> - if (host->bus_ops->remove)
> - host->bus_ops->remove(host);
> + host->bus_ops->remove(host);
> mmc_claim_host(host);
> mmc_detach_bus(host);
> mmc_power_off(host);
> @@ -2722,9 +2719,7 @@ int mmc_pm_notify(struct notifier_block *notify_block,
> break;
>
> /* Calling bus_ops->remove() with a claimed host can deadlock */
> - if (host->bus_ops->remove)
> - host->bus_ops->remove(host);
> -
> + host->bus_ops->remove(host);
> mmc_claim_host(host);
> mmc_detach_bus(host);
> mmc_power_off(host);
>
next prev parent reply other threads:[~2013-05-31 7:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 12:53 [PATCH 0/4] mmc: core: Let the mmc_bus handle suspend|resume sequence Ulf Hansson
2013-05-30 12:53 ` [PATCH 1/4] mmc: core: Remove unnecessary check for the remove callback Ulf Hansson
2013-05-31 7:43 ` Jaehoon Chung [this message]
2013-05-31 8:11 ` Ulf Hansson
2013-05-31 8:22 ` Jaehoon Chung
2013-05-31 9:33 ` Ulf Hansson
2013-05-31 10:50 ` Jaehoon Chung
2013-05-31 15:05 ` Ulf Hansson
2013-05-30 12:53 ` [PATCH 2/4] mmc: core: Validate suspend prerequisites for SDIO at SUSPEND_PREPARE Ulf Hansson
2013-05-30 12:53 ` [PATCH 3/4] mmc: core: Push common suspend|resume code into each bus_ops Ulf Hansson
2013-05-30 12:53 ` [PATCH 4/4] mmc: core: Initiate suspend|resume from mmc bus instead of mmc host Ulf Hansson
2013-06-04 5:28 ` Jaehoon Chung
2013-06-04 8:34 ` Ulf Hansson
2013-06-04 8:47 ` Jaehoon Chung
2013-06-04 8:57 ` Ulf Hansson
2013-06-04 9:53 ` [PATCH 0/4] mmc: core: Let the mmc_bus handle suspend|resume sequence Jaehoon Chung
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=51A854B8.3020605@samsung.com \
--to=jh80.chung@samsung.com \
--cc=cjb@laptop.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=ulf.hansson@stericsson.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