mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-17 22:28:17 +01:00
cmd: mmc: don't assign unused values
Don't assign a value to variable speedmode which is never used. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
6d81319728
commit
2743470306
@ -501,11 +501,12 @@ static int do_mmc_rescan(struct cmd_tbl *cmdtp, int flag,
|
|||||||
int argc, char *const argv[])
|
int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
struct mmc *mmc;
|
struct mmc *mmc;
|
||||||
enum bus_mode speed_mode = MMC_MODES_END;
|
|
||||||
|
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
mmc = init_mmc_device(curr_device, true);
|
mmc = init_mmc_device(curr_device, true);
|
||||||
} else if (argc == 2) {
|
} else if (argc == 2) {
|
||||||
|
enum bus_mode speed_mode;
|
||||||
|
|
||||||
speed_mode = (int)dectoul(argv[1], NULL);
|
speed_mode = (int)dectoul(argv[1], NULL);
|
||||||
mmc = __init_mmc_device(curr_device, true, speed_mode);
|
mmc = __init_mmc_device(curr_device, true, speed_mode);
|
||||||
} else {
|
} else {
|
||||||
@ -543,7 +544,6 @@ static int do_mmc_dev(struct cmd_tbl *cmdtp, int flag,
|
|||||||
{
|
{
|
||||||
int dev, part = 0, ret;
|
int dev, part = 0, ret;
|
||||||
struct mmc *mmc;
|
struct mmc *mmc;
|
||||||
enum bus_mode speed_mode = MMC_MODES_END;
|
|
||||||
|
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
dev = curr_device;
|
dev = curr_device;
|
||||||
@ -561,6 +561,8 @@ static int do_mmc_dev(struct cmd_tbl *cmdtp, int flag,
|
|||||||
}
|
}
|
||||||
mmc = init_mmc_device(dev, true);
|
mmc = init_mmc_device(dev, true);
|
||||||
} else if (argc == 4) {
|
} else if (argc == 4) {
|
||||||
|
enum bus_mode speed_mode;
|
||||||
|
|
||||||
dev = (int)dectoul(argv[1], NULL);
|
dev = (int)dectoul(argv[1], NULL);
|
||||||
part = (int)dectoul(argv[2], NULL);
|
part = (int)dectoul(argv[2], NULL);
|
||||||
if (part > PART_ACCESS_MASK) {
|
if (part > PART_ACCESS_MASK) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user