public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/7] Clean-up: squash lines for immediate return
@ 2016-09-05 13:38 Masahiro Yamada
  2016-09-05 13:38 ` [U-Boot] [PATCH v2 1/7] mmc: " Masahiro Yamada
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Masahiro Yamada @ 2016-09-05 13:38 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-09-06  2:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-05 13:38 [U-Boot] [PATCH v2 0/7] Clean-up: squash lines for immediate return Masahiro Yamada
2016-09-05 13:38 ` [U-Boot] [PATCH v2 1/7] mmc: " Masahiro Yamada
2016-09-05 13:38 ` [U-Boot] [PATCH v2 2/7] video: " Masahiro Yamada
2016-09-05 17:12   ` Anatolij Gustschin
2016-09-06  1:09     ` Masahiro Yamada
2016-09-05 13:38 ` [U-Boot] [PATCH v2 3/7] usb: " Masahiro Yamada
2016-09-05 13:38 ` [U-Boot] [PATCH v2 4/7] x86: " Masahiro Yamada
2016-09-06  1:40   ` Bin Meng
2016-09-06  2:03   ` Simon Glass
2016-09-05 13:38 ` [U-Boot] [PATCH v2 5/7] samsung: " Masahiro Yamada
2016-09-05 13:38 ` [U-Boot] [PATCH v2 6/7] power: " Masahiro Yamada
2016-09-05 13:38 ` [U-Boot] [PATCH v2 7/7] libfdt: simplify fdt_del_mem_rsv() Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox