[U-Boot] [PATCH] treewide: compress lines for immediate return

Stefano Babic sbabic at denx.de
Tue Sep 6 11:25:03 CEST 2016


Hi Masahiro,

On 02/09/2016 12:36, Masahiro Yamada wrote:
>   -ret = expression;
>   -if (ret)
>   -        return ret;
>   -return 0;
>   +return expression;
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
> ---
> 
>  arch/arm/cpu/armv7/bcm235xx/clk-bsc.c           |  6 +-----
>  arch/arm/cpu/armv7/bcm281xx/clk-bsc.c           |  6 +-----
>  arch/arm/mach-rockchip/rk3288/sdram_rk3288.c    | 11 ++++------
>  arch/arm/mach-uniphier/dram/umc-ld20.c          |  6 +-----
>  arch/powerpc/lib/bootm.c                        |  6 +-----
>  arch/x86/cpu/baytrail/valleyview.c              |  8 +------
>  arch/x86/cpu/broadwell/cpu.c                    |  6 +-----
>  arch/x86/cpu/broadwell/sata.c                   |  7 +------
>  arch/x86/cpu/ivybridge/bd82x6x.c                |  6 +-----
>  arch/x86/cpu/ivybridge/cpu.c                    |  6 +-----
>  arch/x86/cpu/ivybridge/gma.c                    |  6 +-----
>  arch/x86/cpu/ivybridge/ivybridge.c              |  8 +------
>  arch/x86/cpu/qemu/qemu.c                        |  8 +------
>  arch/x86/cpu/queensbay/tnc.c                    | 14 ++-----------
>  board/compulab/cm_fx6/cm_fx6.c                  |  6 +-----
>  board/freescale/common/fsl_validate.c           |  6 +-----
>  board/freescale/mx6qsabreauto/mx6qsabreauto.c   | 11 +++-------
>  board/freescale/mx6sxsabreauto/mx6sxsabreauto.c | 11 +++-------
>  board/keymile/km_arm/fpga_config.c              | 14 ++-----------
>  board/kosagi/novena/novena.c                    |  6 +-----
>  board/samsung/goni/goni.c                       |  8 +------
>  board/ti/common/board_detect.c                  |  6 +-----
>  drivers/adc/adc-uclass.c                        | 12 ++---------
>  drivers/core/root.c                             | 12 ++---------
>  drivers/dfu/dfu_sf.c                            |  8 ++-----
>  drivers/gpio/74x164_gpio.c                      |  7 +------
>  drivers/gpio/axp_gpio.c                         |  6 +-----
>  drivers/misc/cros_ec.c                          |  6 +-----
>  drivers/misc/pca9551_led.c                      | 13 ++----------
>  drivers/misc/tegra186_bpmp.c                    |  6 +-----
>  drivers/mmc/atmel_sdhci.c                       |  7 +------
>  drivers/mmc/davinci_mmc.c                       |  6 +-----
>  drivers/mmc/exynos_dw_mmc.c                     |  7 +------
>  drivers/mmc/mmc-uclass.c                        |  7 +------
>  drivers/mmc/mmc_boot.c                          | 28 +++++++------------------
>  drivers/mmc/mmc_legacy.c                        |  7 +------
>  drivers/mmc/msm_sdhci.c                         |  7 +------
>  drivers/mmc/mxcmmc.c                            |  6 +-----
>  drivers/mmc/pxa_mmc_gen.c                       | 21 +++----------------
>  drivers/mmc/rockchip_dw_mmc.c                   |  7 +------
>  drivers/mmc/rockchip_sdhci.c                    |  7 +------
>  drivers/mmc/sandbox_mmc.c                       |  7 +------
>  drivers/mmc/zynq_sdhci.c                        |  7 +------
>  drivers/mtd/nand/fsl_elbc_nand.c                |  6 +-----
>  drivers/mtd/nand/fsl_ifc_nand.c                 |  5 +----
>  drivers/mtd/nand/tegra_nand.c                   |  6 +-----
>  drivers/mtd/nand/vf610_nfc.c                    |  6 +-----
>  drivers/mtd/ubi/attach.c                        | 14 ++++---------
>  drivers/net/fm/eth.c                            |  6 +-----
>  drivers/net/mvpp2.c                             | 16 ++++----------
>  drivers/net/phy/mv88e6352.c                     |  6 +-----
>  drivers/net/xilinx_emaclite.c                   |  7 +------
>  drivers/pci/pcie_imx.c                          | 12 ++---------
>  drivers/power/axp809.c                          |  8 +------
>  drivers/rtc/i2c_rtc_emul.c                      | 13 ++----------
>  drivers/usb/host/ehci-atmel.c                   |  8 +------
>  drivers/usb/host/ehci-fsl.c                     |  8 +------
>  drivers/usb/host/ehci-marvell.c                 |  8 +------
>  drivers/usb/host/ehci-mx6.c                     |  8 +------
>  drivers/usb/host/ehci-pci.c                     |  8 +------
>  drivers/usb/host/ehci-zynq.c                    |  8 +------
>  drivers/usb/host/xhci-fsl.c                     |  7 +------
>  drivers/usb/ulpi/ulpi.c                         |  6 +-----
>  drivers/video/bridge/ptn3460.c                  |  8 +------
>  drivers/video/rockchip/rk_edp.c                 |  6 +-----
>  drivers/video/simple_panel.c                    |  7 +------
>  drivers/video/tegra124/display.c                |  8 +------
>  drivers/video/vidconsole-uclass.c               |  7 +------
>  fs/ubifs/budget.c                               |  7 ++-----
>  fs/ubifs/gc.c                                   |  5 +----
>  fs/ubifs/lpt_commit.c                           |  5 +----
>  fs/ubifs/ubifs.c                                |  6 +-----
>  lib/libfdt/fdt_rw.c                             |  6 +-----
>  lib/rsa/rsa-checksum.c                          |  6 +-----
>  lib/tpm.c                                       |  7 +------
>  tools/mxsimage.c                                |  6 +-----
>  76 files changed, 107 insertions(+), 509 deletions(-)
> 

Nothing against, but it looks to me just a different and allowed coding
style - where is the advantages of this ?

Regards,
Stefano

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


More information about the U-Boot mailing list