linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: core: remove dead function mmc_try_claim_host
@ 2013-09-20  1:21 Grant Grundler
  2013-09-20  7:35 ` Ulf Hansson
  0 siblings, 1 reply; 5+ messages in thread
From: Grant Grundler @ 2013-09-20  1:21 UTC (permalink / raw)
  To: Chris Ball, Seungwon Jeon; +Cc: linux-mmc, linux-kernel, Grant Grundler

cscsope says there are no callers for mmc_try_claim_host in the kernel.
No reason to keep it.

Signed-off-by: Grant Grundler <grundler@chromium.org>
---
 drivers/mmc/core/core.c  | 25 -------------------------
 include/linux/mmc/core.h |  1 -
 2 files changed, 26 deletions(-)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index bf18b6b..006ead2 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -918,31 +918,6 @@ int __mmc_claim_host(struct mmc_host *host, atomic_t *abort)
 EXPORT_SYMBOL(__mmc_claim_host);
 
 /**
- *	mmc_try_claim_host - try exclusively to claim a host
- *	@host: mmc host to claim
- *
- *	Returns %1 if the host is claimed, %0 otherwise.
- */
-int mmc_try_claim_host(struct mmc_host *host)
-{
-	int claimed_host = 0;
-	unsigned long flags;
-
-	spin_lock_irqsave(&host->lock, flags);
-	if (!host->claimed || host->claimer == current) {
-		host->claimed = 1;
-		host->claimer = current;
-		host->claim_cnt += 1;
-		claimed_host = 1;
-	}
-	spin_unlock_irqrestore(&host->lock, flags);
-	if (host->ops->enable && claimed_host && host->claim_cnt == 1)
-		host->ops->enable(host);
-	return claimed_host;
-}
-EXPORT_SYMBOL(mmc_try_claim_host);
-
-/**
  *	mmc_release_host - release a host
  *	@host: mmc host to release
  *
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index da51bec..a00fc49 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -188,7 +188,6 @@ extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int);
 
 extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort);
 extern void mmc_release_host(struct mmc_host *host);
-extern int mmc_try_claim_host(struct mmc_host *host);
 
 extern void mmc_get_card(struct mmc_card *card);
 extern void mmc_put_card(struct mmc_card *card);
-- 
1.8.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] mmc: core: remove dead function mmc_try_claim_host
  2013-09-20  1:21 [PATCH] mmc: core: remove dead function mmc_try_claim_host Grant Grundler
@ 2013-09-20  7:35 ` Ulf Hansson
  2013-09-23 21:56   ` Grant Grundler
  2013-09-26  1:25   ` Chris Ball
  0 siblings, 2 replies; 5+ messages in thread
From: Ulf Hansson @ 2013-09-20  7:35 UTC (permalink / raw)
  To: Grant Grundler; +Cc: Chris Ball, Seungwon Jeon, linux-mmc, linux-kernel

On 20 September 2013 03:21, Grant Grundler <grundler@chromium.org> wrote:
> cscsope says there are no callers for mmc_try_claim_host in the kernel.
> No reason to keep it.
>
> Signed-off-by: Grant Grundler <grundler@chromium.org>

Acked-by: Ulf Hansson <ulf.hansson@linaro.org>

> ---
>  drivers/mmc/core/core.c  | 25 -------------------------
>  include/linux/mmc/core.h |  1 -
>  2 files changed, 26 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index bf18b6b..006ead2 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -918,31 +918,6 @@ int __mmc_claim_host(struct mmc_host *host, atomic_t *abort)
>  EXPORT_SYMBOL(__mmc_claim_host);
>
>  /**
> - *     mmc_try_claim_host - try exclusively to claim a host
> - *     @host: mmc host to claim
> - *
> - *     Returns %1 if the host is claimed, %0 otherwise.
> - */
> -int mmc_try_claim_host(struct mmc_host *host)
> -{
> -       int claimed_host = 0;
> -       unsigned long flags;
> -
> -       spin_lock_irqsave(&host->lock, flags);
> -       if (!host->claimed || host->claimer == current) {
> -               host->claimed = 1;
> -               host->claimer = current;
> -               host->claim_cnt += 1;
> -               claimed_host = 1;
> -       }
> -       spin_unlock_irqrestore(&host->lock, flags);
> -       if (host->ops->enable && claimed_host && host->claim_cnt == 1)
> -               host->ops->enable(host);
> -       return claimed_host;
> -}
> -EXPORT_SYMBOL(mmc_try_claim_host);
> -
> -/**
>   *     mmc_release_host - release a host
>   *     @host: mmc host to release
>   *
> diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
> index da51bec..a00fc49 100644
> --- a/include/linux/mmc/core.h
> +++ b/include/linux/mmc/core.h
> @@ -188,7 +188,6 @@ extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int);
>
>  extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort);
>  extern void mmc_release_host(struct mmc_host *host);
> -extern int mmc_try_claim_host(struct mmc_host *host);
>
>  extern void mmc_get_card(struct mmc_card *card);
>  extern void mmc_put_card(struct mmc_card *card);
> --
> 1.8.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mmc: core: remove dead function mmc_try_claim_host
  2013-09-20  7:35 ` Ulf Hansson
@ 2013-09-23 21:56   ` Grant Grundler
  2013-09-23 21:58     ` Chris Ball
  2013-09-26  1:25   ` Chris Ball
  1 sibling, 1 reply; 5+ messages in thread
From: Grant Grundler @ 2013-09-23 21:56 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Grant Grundler, Chris Ball, Seungwon Jeon, linux-mmc, linux-kernel

On Fri, Sep 20, 2013 at 12:35 AM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> On 20 September 2013 03:21, Grant Grundler <grundler@chromium.org> wrote:
>> cscsope says there are no callers for mmc_try_claim_host in the kernel.
>> No reason to keep it.
>>
>> Signed-off-by: Grant Grundler <grundler@chromium.org>
>
> Acked-by: Ulf Hansson <ulf.hansson@linaro.org>

Thank you Ulf!

In which maintainer's git tree/branch should I expect this patch to land?

Just looking for some confirmation that it was applied.

thanks,
grant

>
>> ---
>>  drivers/mmc/core/core.c  | 25 -------------------------
>>  include/linux/mmc/core.h |  1 -
>>  2 files changed, 26 deletions(-)
>>
>> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
>> index bf18b6b..006ead2 100644
>> --- a/drivers/mmc/core/core.c
>> +++ b/drivers/mmc/core/core.c
>> @@ -918,31 +918,6 @@ int __mmc_claim_host(struct mmc_host *host, atomic_t *abort)
>>  EXPORT_SYMBOL(__mmc_claim_host);
>>
>>  /**
>> - *     mmc_try_claim_host - try exclusively to claim a host
>> - *     @host: mmc host to claim
>> - *
>> - *     Returns %1 if the host is claimed, %0 otherwise.
>> - */
>> -int mmc_try_claim_host(struct mmc_host *host)
>> -{
>> -       int claimed_host = 0;
>> -       unsigned long flags;
>> -
>> -       spin_lock_irqsave(&host->lock, flags);
>> -       if (!host->claimed || host->claimer == current) {
>> -               host->claimed = 1;
>> -               host->claimer = current;
>> -               host->claim_cnt += 1;
>> -               claimed_host = 1;
>> -       }
>> -       spin_unlock_irqrestore(&host->lock, flags);
>> -       if (host->ops->enable && claimed_host && host->claim_cnt == 1)
>> -               host->ops->enable(host);
>> -       return claimed_host;
>> -}
>> -EXPORT_SYMBOL(mmc_try_claim_host);
>> -
>> -/**
>>   *     mmc_release_host - release a host
>>   *     @host: mmc host to release
>>   *
>> diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
>> index da51bec..a00fc49 100644
>> --- a/include/linux/mmc/core.h
>> +++ b/include/linux/mmc/core.h
>> @@ -188,7 +188,6 @@ extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int);
>>
>>  extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort);
>>  extern void mmc_release_host(struct mmc_host *host);
>> -extern int mmc_try_claim_host(struct mmc_host *host);
>>
>>  extern void mmc_get_card(struct mmc_card *card);
>>  extern void mmc_put_card(struct mmc_card *card);
>> --
>> 1.8.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mmc: core: remove dead function mmc_try_claim_host
  2013-09-23 21:56   ` Grant Grundler
@ 2013-09-23 21:58     ` Chris Ball
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Ball @ 2013-09-23 21:58 UTC (permalink / raw)
  To: Grant Grundler; +Cc: Ulf Hansson, Seungwon Jeon, linux-mmc, linux-kernel

Hi Grant,

On Mon, Sep 23 2013, Grant Grundler wrote:
> On Fri, Sep 20, 2013 at 12:35 AM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>> On 20 September 2013 03:21, Grant Grundler <grundler@chromium.org> wrote:
>>> cscsope says there are no callers for mmc_try_claim_host in the kernel.
>>> No reason to keep it.
>>>
>>> Signed-off-by: Grant Grundler <grundler@chromium.org>
>>
>> Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
>
> Thank you Ulf!
>
> In which maintainer's git tree/branch should I expect this patch to land?
>
> Just looking for some confirmation that it was applied.

I'll take this into mmc-next soon.  Thanks!

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mmc: core: remove dead function mmc_try_claim_host
  2013-09-20  7:35 ` Ulf Hansson
  2013-09-23 21:56   ` Grant Grundler
@ 2013-09-26  1:25   ` Chris Ball
  1 sibling, 0 replies; 5+ messages in thread
From: Chris Ball @ 2013-09-26  1:25 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: Grant Grundler, Seungwon Jeon, linux-mmc, linux-kernel

Hi,

On Fri, Sep 20 2013, Ulf Hansson wrote:
> On 20 September 2013 03:21, Grant Grundler <grundler@chromium.org> wrote:
>> cscsope says there are no callers for mmc_try_claim_host in the kernel.
>> No reason to keep it.
>>
>> Signed-off-by: Grant Grundler <grundler@chromium.org>
>
> Acked-by: Ulf Hansson <ulf.hansson@linaro.org>

Thanks, pushed to mmc-next for 3.13 with Ulf's ACK.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-09-26  1:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-20  1:21 [PATCH] mmc: core: remove dead function mmc_try_claim_host Grant Grundler
2013-09-20  7:35 ` Ulf Hansson
2013-09-23 21:56   ` Grant Grundler
2013-09-23 21:58     ` Chris Ball
2013-09-26  1:25   ` Chris Ball

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).