[U-Boot] [PATCH] cmd_usage(): simplify return code handling
Wolfgang Denk
wd at denx.de
Sat Jul 24 20:44:23 CEST 2010
Dear Wolfgang Denk,
In message <1279321564-19845-1-git-send-email-wd at denx.de> you wrote:
> Lots of code use this construct:
>
> cmd_usage(cmdtp);
> return 1;
>
> Change cmd_usage() let it return 1 - then we can replace all these
> ocurrances by
>
> return cmd_usage(cmdtp);
>
> This fixes a few places with incorrect return code handling, too.
>
> Signed-off-by: Wolfgang Denk <wd at denx.de>
> ---
> arch/powerpc/cpu/mpc512x/diu.c | 6 +-
> arch/powerpc/cpu/mpc8260/bedbug_603e.c | 10 +--
> arch/powerpc/cpu/mpc83xx/ecc.c | 9 +--
> arch/powerpc/cpu/mpc8xx/bedbug_860.c | 10 +--
> board/amcc/acadia/cmd_acadia.c | 6 +-
> board/amcc/luan/luan.c | 3 +-
> board/amcc/makalu/cmd_pll.c | 13 ++--
> board/amcc/taihu/lcd.c | 20 ++----
> board/amcc/taihu/taihu.c | 15 ++---
> board/amcc/taishan/lcd.c | 20 ++----
> board/amcc/yucca/cmd_yucca.c | 6 +-
> board/barco/barco.c | 6 --
> board/digsy_mtc/cmd_mtc.c | 21 ++----
> board/esd/common/lcd.c | 6 +-
> board/esd/dasa_sim/cmd_dasa_sim.c | 4 +-
> board/freescale/common/sys_eeprom.c | 6 +-
> board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c | 6 +-
> board/hymod/bsp.c | 6 +-
> board/inka4x0/inkadiag.c | 18 ++----
> board/keymile/km_arm/km_arm.c | 9 +--
> board/lwmon/lwmon.c | 6 +-
> board/lwmon5/lwmon5.c | 17 ++---
> board/mpl/common/common_util.c | 3 +-
> board/pcippc2/pcippc2.c | 3 +-
> board/pcs440ep/pcs440ep.c | 5 +-
> board/pdm360ng/pdm360ng.c | 6 +-
> board/pn62/cmd_pn62.c | 27 ++++----
> board/prodrive/pdnb3/pdnb3.c | 6 +-
> board/renesas/sh7785lcr/rtl8169_mac.c | 12 +--
> board/renesas/sh7785lcr/selfcheck.c | 9 +--
> board/siemens/common/fpga.c | 3 +-
> board/siemens/pcu_e/pcu_e.c | 3 +-
> board/spear/common/spr_misc.c | 9 +--
> board/tqc/tqm5200/cmd_stk52xx.c | 18 ++----
> board/trab/cmd_trab.c | 67 +++++++------------
> board/trizepsiv/eeprom.c | 25 +++-----
> board/w7o/cmd_vpd.c | 6 +-
> common/cmd_bedbug.c | 12 +--
> common/cmd_bmp.c | 14 ++---
> common/cmd_boot.c | 6 +-
> common/cmd_bootm.c | 11 +--
> common/cmd_cache.c | 14 +----
> common/cmd_dcr.c | 24 ++-----
> common/cmd_df.c | 3 +-
> common/cmd_eeprom.c | 3 +-
> common/cmd_ext2.c | 10 +--
> common/cmd_fdc.c | 3 +-
> common/cmd_fdos.c | 3 +-
> common/cmd_fdt.c | 76 +++++++++-------------
> common/cmd_flash.c | 47 +++++---------
> common/cmd_fpga.c | 12 +---
> common/cmd_i2c.c | 87 +++++++++----------------
> common/cmd_ide.c | 20 ++----
> common/cmd_irq.c | 11 +--
> common/cmd_itest.c | 6 +-
> common/cmd_load.c | 2 +-
> common/cmd_log.c | 6 +-
> common/cmd_mem.c | 80 ++++++++---------------
> common/cmd_mfsl.c | 28 +++-----
> common/cmd_mii.c | 9 +--
> common/cmd_misc.c | 10 +--
> common/cmd_mmc.c | 15 ++---
> common/cmd_mp.c | 31 ++++------
> common/cmd_mtdparts.c | 3 +-
> common/cmd_nand.c | 9 +--
> common/cmd_net.c | 16 ++---
> common/cmd_nvedit.c | 22 ++----
> common/cmd_onenand.c | 30 ++------
> common/cmd_otp.c | 3 +-
> common/cmd_pci.c | 3 +-
> common/cmd_portio.c | 18 ++---
> common/cmd_reiser.c | 10 +--
> common/cmd_sata.c | 12 +--
> common/cmd_scsi.c | 15 ++---
> common/cmd_setexpr.c | 6 +-
> common/cmd_sf.c | 3 +-
> common/cmd_strings.c | 6 +-
> common/cmd_ubi.c | 12 +--
> common/cmd_ubifs.c | 25 +++-----
> common/cmd_usb.c | 12 +--
> common/cmd_vfd.c | 6 +-
> common/command.c | 2 +-
> common/hush.c | 6 +-
> common/main.c | 6 +-
> drivers/gpio/pca953x.c | 3 +-
> drivers/misc/ds4510.c | 13 ++--
> drivers/misc/fsl_pmic.c | 20 ++----
> drivers/qe/qe.c | 9 +--
> tools/updater/cmd_flash.c | 49 +++++---------
> 89 files changed, 454 insertions(+), 833 deletions(-)
Applied.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If the car industry behaved like the computer industry over the last
30 years, a Rolls-Royce would cost $5, get 300 miles per gallon, and
blow up once a year killing all passengers inside.
More information about the U-Boot
mailing list