* [PATCH 2/2] mmc: Remove dead code
@ 2012-04-11 20:32 Philippe De Swert
2012-04-11 20:56 ` Philip Rakity
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Philippe De Swert @ 2012-04-11 20:32 UTC (permalink / raw)
To: philippedeswert, linux-mmc, linux-kernel, john.calixto, prakity, cjb
bus_width is passed to the function and when 0 (MMC_BUS_WIDTH_1)
will cause the function to return. So in in the second test it
definitly is different from 0, and the third test is redundant.
Signed-off-by: Philippe De Swert <philippedeswert@gmail.com>
---
drivers/mmc/core/mmc.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 54df5ad..4a1bf8f 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -556,14 +556,10 @@ static int mmc_compare_ext_csds(struct mmc_card *card, unsigned bus_width)
err = mmc_get_ext_csd(card, &bw_ext_csd);
if (err || bw_ext_csd == NULL) {
- if (bus_width != MMC_BUS_WIDTH_1)
- err = -EINVAL;
+ err = -EINVAL;
goto out;
}
- if (bus_width == MMC_BUS_WIDTH_1)
- goto out;
-
/* only compare read only fields */
err = !((card->ext_csd.raw_partition_support ==
bw_ext_csd[EXT_CSD_PARTITION_SUPPORT]) &&
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] mmc: Remove dead code
2012-04-11 20:32 [PATCH 2/2] mmc: Remove dead code Philippe De Swert
@ 2012-04-11 20:56 ` Philip Rakity
2012-04-12 1:39 ` Namjae Jeon
2012-05-10 0:55 ` Chris Ball
2 siblings, 0 replies; 5+ messages in thread
From: Philip Rakity @ 2012-04-11 20:56 UTC (permalink / raw)
To: Philippe De Swert; +Cc: linux-mmc, linux-kernel, john.calixto, cjb
Acked-by: Philip Rakity <prakity@marvell.com>
On Apr 11, 2012, at 1:32 PM, Philippe De Swert wrote:
> bus_width is passed to the function and when 0 (MMC_BUS_WIDTH_1)
> will cause the function to return. So in in the second test it
> definitly is different from 0, and the third test is redundant.
>
> Signed-off-by: Philippe De Swert <philippedeswert@gmail.com>
> ---
> drivers/mmc/core/mmc.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 54df5ad..4a1bf8f 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -556,14 +556,10 @@ static int mmc_compare_ext_csds(struct mmc_card *card, unsigned bus_width)
> err = mmc_get_ext_csd(card, &bw_ext_csd);
>
> if (err || bw_ext_csd == NULL) {
> - if (bus_width != MMC_BUS_WIDTH_1)
> - err = -EINVAL;
> + err = -EINVAL;
> goto out;
> }
>
> - if (bus_width == MMC_BUS_WIDTH_1)
> - goto out;
> -
> /* only compare read only fields */
> err = !((card->ext_csd.raw_partition_support ==
> bw_ext_csd[EXT_CSD_PARTITION_SUPPORT]) &&
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] mmc: Remove dead code
2012-04-11 20:32 [PATCH 2/2] mmc: Remove dead code Philippe De Swert
2012-04-11 20:56 ` Philip Rakity
@ 2012-04-12 1:39 ` Namjae Jeon
2012-05-10 0:48 ` Namjae Jeon
2012-05-10 0:55 ` Chris Ball
2 siblings, 1 reply; 5+ messages in thread
From: Namjae Jeon @ 2012-04-12 1:39 UTC (permalink / raw)
To: Philippe De Swert; +Cc: linux-mmc, linux-kernel, john.calixto, prakity, cjb
2012/4/12 Philippe De Swert <philippedeswert@gmail.com>:
> bus_width is passed to the function and when 0 (MMC_BUS_WIDTH_1)
> will cause the function to return. So in in the second test it
> definitly is different from 0, and the third test is redundant.
>
> Signed-off-by: Philippe De Swert <philippedeswert@gmail.com>
> ---
Looks good to me.
Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] mmc: Remove dead code
2012-04-12 1:39 ` Namjae Jeon
@ 2012-05-10 0:48 ` Namjae Jeon
0 siblings, 0 replies; 5+ messages in thread
From: Namjae Jeon @ 2012-05-10 0:48 UTC (permalink / raw)
To: cjb; +Cc: linux-mmc, Philippe De Swert
Hi. Chris.
Would you check this patch also ?
Thanks.
2012/4/12, Namjae Jeon <linkinjeon@gmail.com>:
> 2012/4/12 Philippe De Swert <philippedeswert@gmail.com>:
>> bus_width is passed to the function and when 0 (MMC_BUS_WIDTH_1)
>> will cause the function to return. So in in the second test it
>> definitly is different from 0, and the third test is redundant.
>>
>> Signed-off-by: Philippe De Swert <philippedeswert@gmail.com>
>> ---
> Looks good to me.
> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] mmc: Remove dead code
2012-04-11 20:32 [PATCH 2/2] mmc: Remove dead code Philippe De Swert
2012-04-11 20:56 ` Philip Rakity
2012-04-12 1:39 ` Namjae Jeon
@ 2012-05-10 0:55 ` Chris Ball
2 siblings, 0 replies; 5+ messages in thread
From: Chris Ball @ 2012-05-10 0:55 UTC (permalink / raw)
To: Philippe De Swert; +Cc: linux-mmc, linux-kernel, john.calixto, prakity
Hi,
On Wed, Apr 11 2012, Philippe De Swert wrote:
> bus_width is passed to the function and when 0 (MMC_BUS_WIDTH_1)
> will cause the function to return. So in in the second test it
> definitly is different from 0, and the third test is redundant.
>
> Signed-off-by: Philippe De Swert <philippedeswert@gmail.com>
> ---
> drivers/mmc/core/mmc.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 54df5ad..4a1bf8f 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -556,14 +556,10 @@ static int mmc_compare_ext_csds(struct mmc_card *card, unsigned bus_width)
> err = mmc_get_ext_csd(card, &bw_ext_csd);
>
> if (err || bw_ext_csd == NULL) {
> - if (bus_width != MMC_BUS_WIDTH_1)
> - err = -EINVAL;
> + err = -EINVAL;
> goto out;
> }
>
> - if (bus_width == MMC_BUS_WIDTH_1)
> - goto out;
> -
> /* only compare read only fields */
> err = !((card->ext_csd.raw_partition_support ==
> bw_ext_csd[EXT_CSD_PARTITION_SUPPORT]) &&
Thanks, pushed for mmc-next for 3.5.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-05-10 0:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-11 20:32 [PATCH 2/2] mmc: Remove dead code Philippe De Swert
2012-04-11 20:56 ` Philip Rakity
2012-04-12 1:39 ` Namjae Jeon
2012-05-10 0:48 ` Namjae Jeon
2012-05-10 0:55 ` Chris Ball
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.