X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cmd%2Fmdio.c;h=c48bb51237c5cf4ac6a8750c83305a2e351d85f3;hb=HEAD;hp=add6440813f6f4f759c0d966eb0c8e78d7f818c7;hpb=92430b8fc8aac3b4ab92e9ca8a09d83c4788c609;p=oweals%2Fu-boot.git diff --git a/cmd/mdio.c b/cmd/mdio.c index add6440813..c48bb51237 100644 --- a/cmd/mdio.c +++ b/cmd/mdio.c @@ -190,7 +190,8 @@ static int extract_phy_range(char *const argv[], int argc, struct mii_dev **bus, } /* ---------------------------------------------------------------- */ -static int do_mdio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_mdio(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { char op[2]; int addrlo, addrhi, reglo, reghi, devadlo, devadhi; @@ -253,12 +254,13 @@ static int do_mdio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) case 'w': if (pos > 1) data = simple_strtoul(argv[pos--], NULL, 16); + /* Intentional fall-through - Get reg for read and write */ case 'r': if (pos > 1) if (extract_reg_range(argv[pos--], &devadlo, &devadhi, ®lo, ®hi)) return CMD_RET_FAILURE; - + /* Intentional fall-through - Get phy for all commands */ default: if (pos > 1) if (extract_phy_range(&argv[2], pos - 1, &bus,