Message ID | 56f1e2278db4195a76578edbf84ea1b730b7b8ad.1531926958.git.michal.simek@xilinx.com |
---|---|
State | RFC |
Delegated to: | Michal Simek |
Headers | show |
Series | cmd: fpga: Fix fpga command handling and add some fpga tests | expand |
On 18 July 2018 at 09:16, Michal Simek <michal.simek@xilinx.com> wrote: > Parameter checking is dead code because all the time there must be all > params assigned. If they are not assigned there is no 9th parameters > passed and checking before return CMD_RET_USAGE. > > Signed-off-by: Michal Simek <michal.simek@xilinx.com> > --- > > cmd/fpga.c | 7 ------- > 1 file changed, 7 deletions(-) Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/cmd/fpga.c b/cmd/fpga.c index 48902286f1d5..b03dd9dc0ace 100644 --- a/cmd/fpga.c +++ b/cmd/fpga.c @@ -124,13 +124,6 @@ int do_fpga(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) fpga_fsinfo.dev_part = argv[7]; fpga_fsinfo.filename = argv[8]; - /* Blocksize can be zero */ - if (!fpga_fsinfo.interface || !fpga_fsinfo.dev_part || - !fpga_fsinfo.filename) { - puts("ERR: Wrong interface, dev_part or filename\n"); - return CMD_RET_USAGE; - } - argc = 5; break; #endif
Parameter checking is dead code because all the time there must be all params assigned. If they are not assigned there is no 9th parameters passed and checking before return CMD_RET_USAGE. Signed-off-by: Michal Simek <michal.simek@xilinx.com> --- cmd/fpga.c | 7 ------- 1 file changed, 7 deletions(-)