[U-Boot] [PATCH v2 0/7] Clean-up: squash lines for immediate return

Masahiro Yamada yamada.masahiro at socionext.com
Mon Sep 5 15:38:36 CEST 2016


ret = [expression];
if (ret)
        return ret;

return 0;

...  is equivalent to:

return [expression];

First, I sent a tree-wide patch:
http://patchwork.ozlabs.org/patch/665199/

In the review of v1, Stephen suggested that
twee-wide conversion with something like Coccinelle
can break code uniformity.
I took a closer look once again, I found many hunks
we should not change.

So, here is v2.

I limited this refactoring to cases, I think, really
beneficial.
(Mostly, they well be simple wrappers with this series.)

I also split patches per-subsystem
so that custodians can easily review and issue Acked-by
(or NACK if they found no good reason to change).



Masahiro Yamada (7):
  mmc: squash lines for immediate return
  video: squash lines for immediate return
  usb: squash lines for immediate return
  x86: squash lines for immediate return
  samsung: squash lines for immediate return
  power: squash lines for immediate return
  libfdt: simplify fdt_del_mem_rsv()

 arch/x86/cpu/baytrail/valleyview.c |  8 +-------
 arch/x86/cpu/ivybridge/ivybridge.c |  8 +-------
 arch/x86/cpu/qemu/qemu.c           |  8 +-------
 arch/x86/cpu/queensbay/tnc.c       |  8 +-------
 board/samsung/goni/goni.c          |  8 +-------
 drivers/mmc/atmel_sdhci.c          |  7 +------
 drivers/mmc/exynos_dw_mmc.c        |  7 +------
 drivers/mmc/mmc_boot.c             | 28 ++++++++--------------------
 drivers/mmc/msm_sdhci.c            |  7 +------
 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/power/axp809.c             |  8 +-------
 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/video/bridge/ptn3460.c     |  7 +------
 drivers/video/tegra124/display.c   |  8 +-------
 drivers/video/vidconsole-uclass.c  |  6 +-----
 lib/libfdt/fdt_rw.c                |  6 +-----
 25 files changed, 32 insertions(+), 175 deletions(-)

-- 
1.9.1



More information about the U-Boot mailing list