lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 09 May 2012 20:55:33 -0400
From:	Chris Ball <cjb@...top.org>
To:	Philippe De Swert <philippedeswert@...il.com>
Cc:	linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
	john.calixto@...systems.com, prakity@...vell.com
Subject: Re: [PATCH 2/2] mmc: Remove dead code

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@...il.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@...top.org>   <http://printf.net/>
One Laptop Per Child
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ