[PATCH] mvebu: bubt: Drop dead code

Stefan Roese sr at denx.de
Sat Jul 25 13:38:12 CEST 2020


Hi Tom,

On 24.07.20 23:13, Tom Rini wrote:
> The code around CONFIG_SYS_MMC_ENV_PART has been untested since merge.
> This can be seen by it referencing 'mmc->part_num' which was migrated
> elsewhere prior to this code being merged.

I'm seeing that CONFIG_SYS_MMC_ENV_PART is also mentioned in the
documentation for this MVEBU cmd:

doc/mvebu/cmd/bubt.txt

So I hesitate a bit to remove it completely from this command (even
though I personally have never used it). Could you perhaps send me a
link a patch / commit, where 'mmc->part_num' has been migrated?

Thanks,
Stefan

> Cc: Joel Johnson <mrjoel at lixil.net>
> Cc: Stefan Roese <sr at denx.de>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
>   cmd/mvebu/bubt.c | 15 ---------------
>   1 file changed, 15 deletions(-)
> 
> diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c
> index a27b0df8ae78..85ae588676fe 100644
> --- a/cmd/mvebu/bubt.c
> +++ b/cmd/mvebu/bubt.c
> @@ -176,16 +176,6 @@ static int mmc_burn_image(size_t image_size)
>   		return err;
>   	}
>   
> -#ifdef CONFIG_SYS_MMC_ENV_PART
> -	if (mmc->part_num != CONFIG_SYS_MMC_ENV_PART) {
> -		err = mmc_switch_part(mmc_dev_num, CONFIG_SYS_MMC_ENV_PART);
> -		if (err) {
> -			printf("MMC partition switch failed\n");
> -			return err;
> -		}
> -	}
> -#endif
> -
>   	/* SD reserves LBA-0 for MBR and boots from LBA-1,
>   	 * MMC/eMMC boots from LBA-0
>   	 */
> @@ -217,11 +207,6 @@ static int mmc_burn_image(size_t image_size)
>   	}
>   	printf("Done!\n");
>   
> -#ifdef CONFIG_SYS_MMC_ENV_PART
> -	if (mmc->part_num != CONFIG_SYS_MMC_ENV_PART)
> -		mmc_switch_part(mmc_dev_num, mmc->part_num);
> -#endif
> -
>   	return 0;
>   }
>   
> 


Viele Grüße,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list