All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3 0/8] Clean-up: squash lines for immediate return
@ 2016-09-06 13:17 Masahiro Yamada
  2016-09-06 13:17 ` [U-Boot] [PATCH v3 1/8] mmc: " Masahiro Yamada
                   ` (7 more replies)
  0 siblings, 8 replies; 24+ messages in thread
From: Masahiro Yamada @ 2016-09-06 13:17 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 an updated series.

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
for easier review and Acked-by
(or NACK if reviewers found no good reason to change).



Masahiro Yamada (8):
  mmc: squash lines for immediate return
  video: squash lines for immediate return
  usb: replace ehci_*_remove() with usb_deregister()
  usb: squash lines for immediate return
  x86: squash lines for immediate return
  libfdt: simplify fdt_del_mem_rsv()
  arch,board: squash lines for immediate return
  drivers: squash lines for immediate return

 arch/arm/cpu/arm920t/imx/timer.c              |  6 +-----
 arch/arm/cpu/armv7/am33xx/sys_info.c          |  4 +---
 arch/arm/cpu/sa1100/timer.c                   |  5 +----
 arch/arm/mach-zynq/cpu.c                      |  8 ++------
 arch/blackfin/cpu/interrupts.c                |  5 +----
 arch/m68k/lib/time.c                          |  4 +---
 arch/powerpc/cpu/mpc512x/cpu.c                |  6 +-----
 arch/powerpc/cpu/mpc83xx/cpu.c                |  6 +-----
 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 +-------
 arch/xtensa/lib/time.c                        |  5 +----
 board/amcc/bamboo/bamboo.c                    |  6 +-----
 board/amcc/bubinga/bubinga.c                  |  5 +----
 board/amcc/canyonlands/canyonlands.c          |  6 +-----
 board/corscience/tricorder/tricorder-eeprom.c | 20 +++++--------------
 board/freescale/common/zm7300.c               |  4 +---
 board/samsung/goni/goni.c                     |  8 +-------
 board/ti/omap5_uevm/evm.c                     |  5 +----
 common/usb.c                                  | 20 +++++++------------
 common/usb_kbd.c                              |  5 +----
 common/usb_storage.c                          |  9 +++------
 drivers/block/sym53c8xx.c                     |  5 ++---
 drivers/ddr/fsl/ddr1_dimm_params.c            | 12 ++----------
 drivers/ddr/fsl/ddr2_dimm_params.c            | 12 ++----------
 drivers/ddr/marvell/a38x/ddr3_a38x.c          |  6 +-----
 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/rtc/m48t35ax.c                        |  4 +---
 drivers/usb/host/ehci-atmel.c                 | 13 +------------
 drivers/usb/host/ehci-fsl.c                   | 13 +------------
 drivers/usb/host/ehci-generic.c               |  7 +------
 drivers/usb/host/ehci-marvell.c               | 13 +------------
 drivers/usb/host/ehci-mx6.c                   | 13 +------------
 drivers/usb/host/ehci-pci.c                   | 13 +------------
 drivers/usb/host/ehci-tegra.c                 | 13 +------------
 drivers/usb/host/ehci-zynq.c                  | 13 +------------
 drivers/usb/host/xhci-fsl.c                   |  7 +------
 drivers/video/bridge/ptn3460.c                |  7 +------
 drivers/video/broadwell_igd.c                 |  5 +----
 drivers/video/exynos/exynos_dp_lowlevel.c     |  6 +-----
 drivers/video/tegra124/display.c              |  8 +-------
 drivers/video/vidconsole-uclass.c             |  6 +-----
 lib/libfdt/fdt_rw.c                           |  6 +-----
 52 files changed, 75 insertions(+), 361 deletions(-)

-- 
1.9.1

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

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

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-06 13:17 [U-Boot] [PATCH v3 0/8] Clean-up: squash lines for immediate return Masahiro Yamada
2016-09-06 13:17 ` [U-Boot] [PATCH v3 1/8] mmc: " Masahiro Yamada
2016-09-08 13:46   ` Jaehoon Chung
2016-09-24  2:27   ` [U-Boot] [U-Boot, v3, " Tom Rini
2016-09-06 13:17 ` [U-Boot] [PATCH v3 2/8] video: " Masahiro Yamada
2016-09-06 14:23   ` Simon Glass
2016-09-06 17:25   ` Stephen Warren
2016-09-24  2:27   ` [U-Boot] [U-Boot, v3, " Tom Rini
2016-09-06 13:17 ` [U-Boot] [PATCH v3 3/8] usb: replace ehci_*_remove() with usb_deregister() Masahiro Yamada
2016-09-06 17:27   ` Stephen Warren
2016-09-24  2:27   ` [U-Boot] [U-Boot, v3, " Tom Rini
2016-09-06 13:17 ` [U-Boot] [PATCH v3 4/8] usb: squash lines for immediate return Masahiro Yamada
2016-09-24  2:27   ` [U-Boot] [U-Boot, v3, " Tom Rini
2016-09-06 13:17 ` [U-Boot] [PATCH v3 5/8] x86: " Masahiro Yamada
2016-09-24  2:28   ` [U-Boot] [U-Boot, v3, " Tom Rini
2016-09-06 13:17 ` [U-Boot] [PATCH v3 6/8] libfdt: simplify fdt_del_mem_rsv() Masahiro Yamada
2016-09-06 14:23   ` Simon Glass
2016-09-24  2:28   ` [U-Boot] [U-Boot,v3,6/8] " Tom Rini
2016-09-06 13:17 ` [U-Boot] [PATCH v3 7/8] arch, board: squash lines for immediate return Masahiro Yamada
2016-09-06 16:37   ` Minkyu Kang
2016-09-08 21:26   ` Angelo Dureghello
2016-09-24  2:28   ` [U-Boot] [U-Boot, v3, " Tom Rini
2016-09-06 13:17 ` [U-Boot] [PATCH v3 8/8] drivers: " Masahiro Yamada
2016-09-24  2:28   ` [U-Boot] [U-Boot, v3, " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.