mmc: Remove dead code
PATCH 2/2 mmc: Remove dead code
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.
--- drivers/mmc/core/mmc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/mmc/core/mmc.c +1 -5
@@ -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]) &&
Signature · 1 line
1.7.9.5
Quoted 32 lines · Philippe De Swert
bus_widthis 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 <[email protected]>---
drivers/mmc/core/mmc.c| 6 +-----1 file changed, 1 insertion(+), 5 deletions(-)drivers/mmc/core/mmc.c +1
-5@@ -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]) &&Signature · 1 line
1.7.9.5
2012/4/12 Philippe De Swert <[email protected]>:
Quoted 6 lines
bus_widthis 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 <[email protected]>---
Looks good to me.
Hi. Chris.
Would you check this patch also ?
Thanks.
2012/4/12, Namjae Jeon <[email protected]>:
Quoted 10 lines
2012/4/12 Philippe De Swert <[email protected]>:
Quoted 6 lines
bus_widthis 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 <[email protected]>---
Looks good to me.
Reviewed-by Namjae Jeon <[email protected]>
Hi,
Quoted 19 lines · Philippe De Swert
bus_widthis 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 <[email protected]>--- drivers/mmc/core/mmc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)drivers/mmc/core/mmc.c +0
-2@@ -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 ;
drivers/mmc/core/mmc.c static int mmc_compare_ext_csds(struct mmc_card *card, unsigned bus_width) · line 565
Quoted 10 lines
drivers/mmc/core/mmc.c +1
-3+ 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.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child