* [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
* [U-Boot] [PATCH v3 1/8] mmc: squash lines for immediate return
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 ` 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
` (6 subsequent siblings)
7 siblings, 2 replies; 24+ messages in thread
From: Masahiro Yamada @ 2016-09-06 13:17 UTC (permalink / raw)
To: u-boot
These functions can be much simpler by squashing lines for immediate
return.
For *_bind() callbacks, they will be a simple wrapper function of an
upper-level bind API.
For mmc_set_{boot_bus_width,part_conf}, they will be a wrapper of
mmc_switch().
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
Changes in v3: None
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 +------
8 files changed, 15 insertions(+), 62 deletions(-)
diff --git a/drivers/mmc/atmel_sdhci.c b/drivers/mmc/atmel_sdhci.c
index dd6bd33..d8f8087 100644
--- a/drivers/mmc/atmel_sdhci.c
+++ b/drivers/mmc/atmel_sdhci.c
@@ -136,13 +136,8 @@ static int atmel_sdhci_probe(struct udevice *dev)
static int atmel_sdhci_bind(struct udevice *dev)
{
struct atmel_sdhci_plat *plat = dev_get_platdata(dev);
- int ret;
- ret = sdhci_bind(dev, &plat->mmc, &plat->cfg);
- if (ret)
- return ret;
-
- return 0;
+ return sdhci_bind(dev, &plat->mmc, &plat->cfg);
}
static const struct udevice_id atmel_sdhci_ids[] = {
diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
index 57271f1..568fed7 100644
--- a/drivers/mmc/exynos_dw_mmc.c
+++ b/drivers/mmc/exynos_dw_mmc.c
@@ -284,13 +284,8 @@ static int exynos_dwmmc_probe(struct udevice *dev)
static int exynos_dwmmc_bind(struct udevice *dev)
{
struct exynos_mmc_plat *plat = dev_get_platdata(dev);
- int ret;
- ret = dwmci_bind(dev, &plat->mmc, &plat->cfg);
- if (ret)
- return ret;
-
- return 0;
+ return dwmci_bind(dev, &plat->mmc, &plat->cfg);
}
static const struct udevice_id exynos_dwmmc_ids[] = {
diff --git a/drivers/mmc/mmc_boot.c b/drivers/mmc/mmc_boot.c
index 756a982..ac6f56f 100644
--- a/drivers/mmc/mmc_boot.c
+++ b/drivers/mmc/mmc_boot.c
@@ -85,16 +85,10 @@ int mmc_boot_partition_size_change(struct mmc *mmc, unsigned long bootsize,
*/
int mmc_set_boot_bus_width(struct mmc *mmc, u8 width, u8 reset, u8 mode)
{
- int err;
-
- err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BOOT_BUS_WIDTH,
- EXT_CSD_BOOT_BUS_WIDTH_MODE(mode) |
- EXT_CSD_BOOT_BUS_WIDTH_RESET(reset) |
- EXT_CSD_BOOT_BUS_WIDTH_WIDTH(width));
-
- if (err)
- return err;
- return 0;
+ return mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BOOT_BUS_WIDTH,
+ EXT_CSD_BOOT_BUS_WIDTH_MODE(mode) |
+ EXT_CSD_BOOT_BUS_WIDTH_RESET(reset) |
+ EXT_CSD_BOOT_BUS_WIDTH_WIDTH(width));
}
/*
@@ -106,16 +100,10 @@ int mmc_set_boot_bus_width(struct mmc *mmc, u8 width, u8 reset, u8 mode)
*/
int mmc_set_part_conf(struct mmc *mmc, u8 ack, u8 part_num, u8 access)
{
- int err;
-
- err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_PART_CONF,
- EXT_CSD_BOOT_ACK(ack) |
- EXT_CSD_BOOT_PART_NUM(part_num) |
- EXT_CSD_PARTITION_ACCESS(access));
-
- if (err)
- return err;
- return 0;
+ return mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_PART_CONF,
+ EXT_CSD_BOOT_ACK(ack) |
+ EXT_CSD_BOOT_PART_NUM(part_num) |
+ EXT_CSD_PARTITION_ACCESS(access));
}
/*
diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c
index 8d4399e..1b82991 100644
--- a/drivers/mmc/msm_sdhci.c
+++ b/drivers/mmc/msm_sdhci.c
@@ -190,13 +190,8 @@ static int msm_ofdata_to_platdata(struct udevice *dev)
static int msm_sdc_bind(struct udevice *dev)
{
struct msm_sdhc_plat *plat = dev_get_platdata(dev);
- int ret;
- ret = sdhci_bind(dev, &plat->mmc, &plat->cfg);
- if (ret)
- return ret;
-
- return 0;
+ return sdhci_bind(dev, &plat->mmc, &plat->cfg);
}
static const struct udevice_id msm_mmc_ids[] = {
diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c
index 020a59b..859760b 100644
--- a/drivers/mmc/rockchip_dw_mmc.c
+++ b/drivers/mmc/rockchip_dw_mmc.c
@@ -142,13 +142,8 @@ static int rockchip_dwmmc_probe(struct udevice *dev)
static int rockchip_dwmmc_bind(struct udevice *dev)
{
struct rockchip_mmc_plat *plat = dev_get_platdata(dev);
- int ret;
- ret = dwmci_bind(dev, &plat->mmc, &plat->cfg);
- if (ret)
- return ret;
-
- return 0;
+ return dwmci_bind(dev, &plat->mmc, &plat->cfg);
}
static const struct udevice_id rockchip_dwmmc_ids[] = {
diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c
index 624029b..c56e1a3 100644
--- a/drivers/mmc/rockchip_sdhci.c
+++ b/drivers/mmc/rockchip_sdhci.c
@@ -62,13 +62,8 @@ static int arasan_sdhci_ofdata_to_platdata(struct udevice *dev)
static int rockchip_sdhci_bind(struct udevice *dev)
{
struct rockchip_sdhc_plat *plat = dev_get_platdata(dev);
- int ret;
- ret = sdhci_bind(dev, &plat->mmc, &plat->cfg);
- if (ret)
- return ret;
-
- return 0;
+ return sdhci_bind(dev, &plat->mmc, &plat->cfg);
}
static const struct udevice_id arasan_sdhci_ids[] = {
diff --git a/drivers/mmc/sandbox_mmc.c b/drivers/mmc/sandbox_mmc.c
index 5f1333b..fdb29a5 100644
--- a/drivers/mmc/sandbox_mmc.c
+++ b/drivers/mmc/sandbox_mmc.c
@@ -112,7 +112,6 @@ int sandbox_mmc_bind(struct udevice *dev)
{
struct sandbox_mmc_plat *plat = dev_get_platdata(dev);
struct mmc_config *cfg = &plat->cfg;
- int ret;
cfg->name = dev->name;
cfg->host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_8BIT;
@@ -121,11 +120,7 @@ int sandbox_mmc_bind(struct udevice *dev)
cfg->f_max = 52000000;
cfg->b_max = U32_MAX;
- ret = mmc_bind(dev, &plat->mmc, cfg);
- if (ret)
- return ret;
-
- return 0;
+ return mmc_bind(dev, &plat->mmc, cfg);
}
int sandbox_mmc_unbind(struct udevice *dev)
diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
index 3815b94..b991102 100644
--- a/drivers/mmc/zynq_sdhci.c
+++ b/drivers/mmc/zynq_sdhci.c
@@ -63,13 +63,8 @@ static int arasan_sdhci_ofdata_to_platdata(struct udevice *dev)
static int arasan_sdhci_bind(struct udevice *dev)
{
struct arasan_sdhci_plat *plat = dev_get_platdata(dev);
- int ret;
- ret = sdhci_bind(dev, &plat->mmc, &plat->cfg);
- if (ret)
- return ret;
-
- return 0;
+ return sdhci_bind(dev, &plat->mmc, &plat->cfg);
}
static const struct udevice_id arasan_sdhci_ids[] = {
--
1.9.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [U-Boot] [PATCH v3 2/8] video: squash lines for immediate return
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-06 13:17 ` Masahiro Yamada
2016-09-06 14:23 ` Simon Glass
` (2 more replies)
2016-09-06 13:17 ` [U-Boot] [PATCH v3 3/8] usb: replace ehci_*_remove() with usb_deregister() Masahiro Yamada
` (5 subsequent siblings)
7 siblings, 3 replies; 24+ messages in thread
From: Masahiro Yamada @ 2016-09-06 13:17 UTC (permalink / raw)
To: u-boot
For vidconsole_post_probe(), it is common coding style to let a
probe method return the value of a register function.
The others will become simple wrapper functions.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
---
Changes in v3:
- Two more fixes
- s/resister/register/
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 +-----
5 files changed, 5 insertions(+), 27 deletions(-)
diff --git a/drivers/video/bridge/ptn3460.c b/drivers/video/bridge/ptn3460.c
index 2e2ae7c..f9d3720 100644
--- a/drivers/video/bridge/ptn3460.c
+++ b/drivers/video/bridge/ptn3460.c
@@ -11,14 +11,9 @@
static int ptn3460_attach(struct udevice *dev)
{
- int ret;
-
debug("%s: %s\n", __func__, dev->name);
- ret = video_bridge_set_active(dev, true);
- if (ret)
- return ret;
- return 0;
+ return video_bridge_set_active(dev, true);
}
struct video_bridge_ops ptn3460_ops = {
diff --git a/drivers/video/broadwell_igd.c b/drivers/video/broadwell_igd.c
index ce4f296..4286fd0 100644
--- a/drivers/video/broadwell_igd.c
+++ b/drivers/video/broadwell_igd.c
@@ -323,10 +323,7 @@ err:
static unsigned long gtt_read(struct broadwell_igd_priv *priv,
unsigned long reg)
{
- u32 val;
-
- val = readl(priv->regs + reg);
- return val;
+ return readl(priv->regs + reg);
}
static void gtt_write(struct broadwell_igd_priv *priv, unsigned long reg,
diff --git a/drivers/video/exynos/exynos_dp_lowlevel.c b/drivers/video/exynos/exynos_dp_lowlevel.c
index f978473..aae78a8 100644
--- a/drivers/video/exynos/exynos_dp_lowlevel.c
+++ b/drivers/video/exynos/exynos_dp_lowlevel.c
@@ -881,11 +881,7 @@ void exynos_dp_set_lane_count(struct exynos_dp *dp_regs, unsigned char count)
unsigned int exynos_dp_get_lane_count(struct exynos_dp *dp_regs)
{
- unsigned int reg;
-
- reg = readl(&dp_regs->lane_count_set);
-
- return reg;
+ return readl(&dp_regs->lane_count_set);
}
unsigned char exynos_dp_get_lanex_pre_emphasis(struct exynos_dp *dp_regs,
diff --git a/drivers/video/tegra124/display.c b/drivers/video/tegra124/display.c
index 2f1f0df..d8999c3 100644
--- a/drivers/video/tegra124/display.c
+++ b/drivers/video/tegra124/display.c
@@ -326,13 +326,7 @@ static int display_update_config_from_edid(struct udevice *dp_dev,
int *panel_bppp,
struct display_timing *timing)
{
- int ret;
-
- ret = display_read_timing(dp_dev, timing);
- if (ret)
- return ret;
-
- return 0;
+ return display_read_timing(dp_dev, timing);
}
static int display_init(struct udevice *dev, void *lcdbase,
diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
index c8cc05e..e9a90b1 100644
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -190,7 +190,6 @@ static int vidconsole_post_probe(struct udevice *dev)
{
struct vidconsole_priv *priv = dev_get_uclass_priv(dev);
struct stdio_dev *sdev = &priv->sdev;
- int ret;
if (!priv->tab_width_frac)
priv->tab_width_frac = VID_TO_POS(priv->x_charsize) * 8;
@@ -206,11 +205,8 @@ static int vidconsole_post_probe(struct udevice *dev)
sdev->putc = vidconsole_putc;
sdev->puts = vidconsole_puts;
sdev->priv = dev;
- ret = stdio_register(sdev);
- if (ret)
- return ret;
- return 0;
+ return stdio_register(sdev);
}
UCLASS_DRIVER(vidconsole) = {
--
1.9.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [U-Boot] [PATCH v3 3/8] usb: replace ehci_*_remove() with usb_deregister()
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-06 13:17 ` [U-Boot] [PATCH v3 2/8] video: " Masahiro Yamada
@ 2016-09-06 13:17 ` 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
` (4 subsequent siblings)
7 siblings, 2 replies; 24+ messages in thread
From: Masahiro Yamada @ 2016-09-06 13:17 UTC (permalink / raw)
To: u-boot
The remove callbacks of EHCI drivers are often just a wrapper of
ehci_deregister.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
Changes in v3:
- added
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 +------------
8 files changed, 8 insertions(+), 90 deletions(-)
diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index d65bbe9..2b138c5 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -128,17 +128,6 @@ static int ehci_atmel_probe(struct udevice *dev)
return ehci_register(dev, hccr, hcor, NULL, 0, USB_INIT_HOST);
}
-static int ehci_atmel_remove(struct udevice *dev)
-{
- int ret;
-
- ret = ehci_deregister(dev);
- if (ret)
- return ret;
-
- return 0;
-}
-
static const struct udevice_id ehci_usb_ids[] = {
{ .compatible = "atmel,at91sam9g45-ehci", },
{ }
@@ -149,7 +138,7 @@ U_BOOT_DRIVER(ehci_atmel) = {
.id = UCLASS_USB,
.of_match = ehci_usb_ids,
.probe = ehci_atmel_probe,
- .remove = ehci_atmel_remove,
+ .remove = ehci_deregister,
.ops = &ehci_usb_ops,
.platdata_auto_alloc_size = sizeof(struct usb_platdata),
.priv_auto_alloc_size = sizeof(struct ehci_atmel_priv),
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index f5e3ae7..9c32921 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -118,17 +118,6 @@ static int ehci_fsl_probe(struct udevice *dev)
return ehci_register(dev, hccr, hcor, &fsl_ehci_ops, 0, USB_INIT_HOST);
}
-static int ehci_fsl_remove(struct udevice *dev)
-{
- int ret;
-
- ret = ehci_deregister(dev);
- if (ret)
- return ret;
-
- return 0;
-}
-
static const struct udevice_id ehci_usb_ids[] = {
{ .compatible = "fsl-usb2-mph", },
{ .compatible = "fsl-usb2-dr", },
@@ -141,7 +130,7 @@ U_BOOT_DRIVER(ehci_fsl) = {
.of_match = ehci_usb_ids,
.ofdata_to_platdata = ehci_fsl_ofdata_to_platdata,
.probe = ehci_fsl_probe,
- .remove = ehci_fsl_remove,
+ .remove = ehci_deregister,
.ops = &ehci_usb_ops,
.platdata_auto_alloc_size = sizeof(struct usb_platdata),
.priv_auto_alloc_size = sizeof(struct ehci_fsl_priv),
diff --git a/drivers/usb/host/ehci-generic.c b/drivers/usb/host/ehci-generic.c
index e0377ca..6291ed2 100644
--- a/drivers/usb/host/ehci-generic.c
+++ b/drivers/usb/host/ehci-generic.c
@@ -44,11 +44,6 @@ static int ehci_usb_probe(struct udevice *dev)
return ehci_register(dev, hccr, hcor, NULL, 0, USB_INIT_HOST);
}
-static int ehci_usb_remove(struct udevice *dev)
-{
- return ehci_deregister(dev);
-}
-
static const struct udevice_id ehci_usb_ids[] = {
{ .compatible = "generic-ehci" },
{ }
@@ -59,7 +54,7 @@ U_BOOT_DRIVER(ehci_generic) = {
.id = UCLASS_USB,
.of_match = ehci_usb_ids,
.probe = ehci_usb_probe,
- .remove = ehci_usb_remove,
+ .remove = ehci_deregister,
.ops = &ehci_usb_ops,
.priv_auto_alloc_size = sizeof(struct generic_ehci),
.flags = DM_FLAG_ALLOC_PRIV_DMA,
diff --git a/drivers/usb/host/ehci-marvell.c b/drivers/usb/host/ehci-marvell.c
index 5b0f46a..253fcb3 100644
--- a/drivers/usb/host/ehci-marvell.c
+++ b/drivers/usb/host/ehci-marvell.c
@@ -94,17 +94,6 @@ static int ehci_mvebu_probe(struct udevice *dev)
return ehci_register(dev, hccr, hcor, NULL, 0, USB_INIT_HOST);
}
-static int ehci_mvebu_remove(struct udevice *dev)
-{
- int ret;
-
- ret = ehci_deregister(dev);
- if (ret)
- return ret;
-
- return 0;
-}
-
static const struct udevice_id ehci_usb_ids[] = {
{ .compatible = "marvell,orion-ehci", },
{ }
@@ -115,7 +104,7 @@ U_BOOT_DRIVER(ehci_mvebu) = {
.id = UCLASS_USB,
.of_match = ehci_usb_ids,
.probe = ehci_mvebu_probe,
- .remove = ehci_mvebu_remove,
+ .remove = ehci_deregister,
.ops = &ehci_usb_ops,
.platdata_auto_alloc_size = sizeof(struct usb_platdata),
.priv_auto_alloc_size = sizeof(struct ehci_mvebu_priv),
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index 602fec5..48889c1 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -451,17 +451,6 @@ static int ehci_usb_probe(struct udevice *dev)
return ehci_register(dev, hccr, hcor, &mx6_ehci_ops, 0, priv->init_type);
}
-static int ehci_usb_remove(struct udevice *dev)
-{
- int ret;
-
- ret = ehci_deregister(dev);
- if (ret)
- return ret;
-
- return 0;
-}
-
static const struct udevice_id mx6_usb_ids[] = {
{ .compatible = "fsl,imx27-usb" },
{ }
@@ -472,7 +461,7 @@ U_BOOT_DRIVER(usb_mx6) = {
.id = UCLASS_USB,
.of_match = mx6_usb_ids,
.probe = ehci_usb_probe,
- .remove = ehci_usb_remove,
+ .remove = ehci_deregister,
.ops = &ehci_usb_ops,
.platdata_auto_alloc_size = sizeof(struct usb_platdata),
.priv_auto_alloc_size = sizeof(struct ehci_mx6_priv_data),
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index f21a1fa..6fc2479 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -126,17 +126,6 @@ static int ehci_pci_probe(struct udevice *dev)
return ehci_register(dev, hccr, hcor, NULL, 0, USB_INIT_HOST);
}
-static int ehci_pci_remove(struct udevice *dev)
-{
- int ret;
-
- ret = ehci_deregister(dev);
- if (ret)
- return ret;
-
- return 0;
-}
-
static const struct udevice_id ehci_pci_ids[] = {
{ .compatible = "ehci-pci" },
{ }
@@ -146,7 +135,7 @@ U_BOOT_DRIVER(ehci_pci) = {
.name = "ehci_pci",
.id = UCLASS_USB,
.probe = ehci_pci_probe,
- .remove = ehci_pci_remove,
+ .remove = ehci_deregister,
.of_match = ehci_pci_ids,
.ops = &ehci_usb_ops,
.platdata_auto_alloc_size = sizeof(struct usb_platdata),
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 31d54ab..d3acaae 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -846,17 +846,6 @@ static int ehci_usb_probe(struct udevice *dev)
plat->init_type);
}
-static int ehci_usb_remove(struct udevice *dev)
-{
- int ret;
-
- ret = ehci_deregister(dev);
- if (ret)
- return ret;
-
- return 0;
-}
-
static const struct udevice_id ehci_usb_ids[] = {
{ .compatible = "nvidia,tegra20-ehci", .data = USB_CTLR_T20 },
{ .compatible = "nvidia,tegra30-ehci", .data = USB_CTLR_T30 },
@@ -871,7 +860,7 @@ U_BOOT_DRIVER(usb_ehci) = {
.of_match = ehci_usb_ids,
.ofdata_to_platdata = ehci_usb_ofdata_to_platdata,
.probe = ehci_usb_probe,
- .remove = ehci_usb_remove,
+ .remove = ehci_deregister,
.ops = &ehci_usb_ops,
.platdata_auto_alloc_size = sizeof(struct usb_platdata),
.priv_auto_alloc_size = sizeof(struct fdt_usb),
diff --git a/drivers/usb/host/ehci-zynq.c b/drivers/usb/host/ehci-zynq.c
index 76642cd..1e3b800 100644
--- a/drivers/usb/host/ehci-zynq.c
+++ b/drivers/usb/host/ehci-zynq.c
@@ -73,17 +73,6 @@ static int ehci_zynq_probe(struct udevice *dev)
return ehci_register(dev, hccr, hcor, NULL, 0, plat->init_type);
}
-static int ehci_zynq_remove(struct udevice *dev)
-{
- int ret;
-
- ret = ehci_deregister(dev);
- if (ret)
- return ret;
-
- return 0;
-}
-
static const struct udevice_id ehci_zynq_ids[] = {
{ .compatible = "xlnx,zynq-usb-2.20a" },
{ }
@@ -95,7 +84,7 @@ U_BOOT_DRIVER(ehci_zynq) = {
.of_match = ehci_zynq_ids,
.ofdata_to_platdata = ehci_zynq_ofdata_to_platdata,
.probe = ehci_zynq_probe,
- .remove = ehci_zynq_remove,
+ .remove = ehci_deregister,
.ops = &ehci_usb_ops,
.platdata_auto_alloc_size = sizeof(struct usb_platdata),
.priv_auto_alloc_size = sizeof(struct zynq_ehci_priv),
--
1.9.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [U-Boot] [PATCH v3 4/8] usb: squash lines for immediate return
2016-09-06 13:17 [U-Boot] [PATCH v3 0/8] Clean-up: squash lines for immediate return Masahiro Yamada
` (2 preceding siblings ...)
2016-09-06 13:17 ` [U-Boot] [PATCH v3 3/8] usb: replace ehci_*_remove() with usb_deregister() Masahiro Yamada
@ 2016-09-06 13:17 ` 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
` (3 subsequent siblings)
7 siblings, 1 reply; 24+ messages in thread
From: Masahiro Yamada @ 2016-09-06 13:17 UTC (permalink / raw)
To: u-boot
This makes functions much simpler.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
Changes in v3: None
common/usb.c | 20 +++++++-------------
common/usb_kbd.c | 5 +----
common/usb_storage.c | 9 +++------
drivers/usb/host/xhci-fsl.c | 7 +------
4 files changed, 12 insertions(+), 29 deletions(-)
diff --git a/common/usb.c b/common/usb.c
index b3ba487..15e1e4c 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -557,12 +557,10 @@ int usb_clear_halt(struct usb_device *dev, int pipe)
static int usb_get_descriptor(struct usb_device *dev, unsigned char type,
unsigned char index, void *buf, int size)
{
- int res;
- res = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
- USB_REQ_GET_DESCRIPTOR, USB_DIR_IN,
- (type << 8) + index, 0,
- buf, size, USB_CNTL_TIMEOUT);
- return res;
+ return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
+ USB_REQ_GET_DESCRIPTOR, USB_DIR_IN,
+ (type << 8) + index, 0, buf, size,
+ USB_CNTL_TIMEOUT);
}
/**********************************************************************
@@ -612,14 +610,10 @@ int usb_get_configuration_no(struct usb_device *dev, int cfgno,
*/
static int usb_set_address(struct usb_device *dev)
{
- int res;
-
debug("set address %d\n", dev->devnum);
- res = usb_control_msg(dev, usb_snddefctrl(dev),
- USB_REQ_SET_ADDRESS, 0,
- (dev->devnum), 0,
- NULL, 0, USB_CNTL_TIMEOUT);
- return res;
+
+ return usb_control_msg(dev, usb_snddefctrl(dev), USB_REQ_SET_ADDRESS,
+ 0, (dev->devnum), 0, NULL, 0, USB_CNTL_TIMEOUT);
}
/********************************************************************
diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index 97f79f8..a9872a6 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -605,11 +605,8 @@ int usb_kbd_deregister(int force)
static int usb_kbd_probe(struct udevice *dev)
{
struct usb_device *udev = dev_get_parent_priv(dev);
- int ret;
-
- ret = probe_usb_keyboard(udev);
- return ret;
+ return probe_usb_keyboard(udev);
}
static int usb_kbd_remove(struct udevice *dev)
diff --git a/common/usb_storage.c b/common/usb_storage.c
index 7e6e52d..0345aa2 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -708,13 +708,10 @@ static int usb_stor_CBI_get_status(ccb *srb, struct us_data *us)
/* clear a stall on an endpoint - special for BBB devices */
static int usb_stor_BBB_clear_endpt_stall(struct us_data *us, __u8 endpt)
{
- int result;
-
/* ENDPOINT_HALT = 0, so set value to 0 */
- result = usb_control_msg(us->pusb_dev, usb_sndctrlpipe(us->pusb_dev, 0),
- USB_REQ_CLEAR_FEATURE, USB_RECIP_ENDPOINT,
- 0, endpt, NULL, 0, USB_CNTL_TIMEOUT * 5);
- return result;
+ return usb_control_msg(us->pusb_dev, usb_sndctrlpipe(us->pusb_dev, 0),
+ USB_REQ_CLEAR_FEATURE, USB_RECIP_ENDPOINT, 0,
+ endpt, NULL, 0, USB_CNTL_TIMEOUT * 5);
}
static int usb_stor_BBB_transport(ccb *srb, struct us_data *us)
diff --git a/drivers/usb/host/xhci-fsl.c b/drivers/usb/host/xhci-fsl.c
index bdcd4f1..6ff450c 100644
--- a/drivers/usb/host/xhci-fsl.c
+++ b/drivers/usb/host/xhci-fsl.c
@@ -129,15 +129,10 @@ static int xhci_fsl_probe(struct udevice *dev)
static int xhci_fsl_remove(struct udevice *dev)
{
struct xhci_fsl_priv *priv = dev_get_priv(dev);
- int ret;
fsl_xhci_core_exit(&priv->ctx);
- ret = xhci_deregister(dev);
- if (ret)
- return ret;
-
- return 0;
+ return xhci_deregister(dev);
}
static const struct udevice_id xhci_usb_ids[] = {
--
1.9.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [U-Boot] [PATCH v3 5/8] x86: squash lines for immediate return
2016-09-06 13:17 [U-Boot] [PATCH v3 0/8] Clean-up: squash lines for immediate return Masahiro Yamada
` (3 preceding siblings ...)
2016-09-06 13:17 ` [U-Boot] [PATCH v3 4/8] usb: squash lines for immediate return Masahiro Yamada
@ 2016-09-06 13:17 ` 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
` (2 subsequent siblings)
7 siblings, 1 reply; 24+ messages in thread
From: Masahiro Yamada @ 2016-09-06 13:17 UTC (permalink / raw)
To: u-boot
arch_cpu_init() can be simpler by this refactoring.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
Changes in v3: None
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 +-------
4 files changed, 4 insertions(+), 28 deletions(-)
diff --git a/arch/x86/cpu/baytrail/valleyview.c b/arch/x86/cpu/baytrail/valleyview.c
index b31f24e..b312d9f 100644
--- a/arch/x86/cpu/baytrail/valleyview.c
+++ b/arch/x86/cpu/baytrail/valleyview.c
@@ -25,15 +25,9 @@ int cpu_mmc_init(bd_t *bis)
#ifndef CONFIG_EFI_APP
int arch_cpu_init(void)
{
- int ret;
-
post_code(POST_CPU_INIT);
- ret = x86_cpu_init_f();
- if (ret)
- return ret;
-
- return 0;
+ return x86_cpu_init_f();
}
int arch_misc_init(void)
diff --git a/arch/x86/cpu/ivybridge/ivybridge.c b/arch/x86/cpu/ivybridge/ivybridge.c
index c770b53..e817eb9 100644
--- a/arch/x86/cpu/ivybridge/ivybridge.c
+++ b/arch/x86/cpu/ivybridge/ivybridge.c
@@ -10,13 +10,7 @@
int arch_cpu_init(void)
{
- int ret;
-
post_code(POST_CPU_INIT);
- ret = x86_cpu_init_f();
- if (ret)
- return ret;
-
- return 0;
+ return x86_cpu_init_f();
}
diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c
index 680e558..c3092f2 100644
--- a/arch/x86/cpu/qemu/qemu.c
+++ b/arch/x86/cpu/qemu/qemu.c
@@ -139,15 +139,9 @@ static void qemu_chipset_init(void)
int arch_cpu_init(void)
{
- int ret;
-
post_code(POST_CPU_INIT);
- ret = x86_cpu_init_f();
- if (ret)
- return ret;
-
- return 0;
+ return x86_cpu_init_f();
}
#ifndef CONFIG_EFI_STUB
diff --git a/arch/x86/cpu/queensbay/tnc.c b/arch/x86/cpu/queensbay/tnc.c
index b226e4c..f307c62 100644
--- a/arch/x86/cpu/queensbay/tnc.c
+++ b/arch/x86/cpu/queensbay/tnc.c
@@ -94,15 +94,9 @@ static int __maybe_unused disable_igd(void)
int arch_cpu_init(void)
{
- int ret;
-
post_code(POST_CPU_INIT);
- ret = x86_cpu_init_f();
- if (ret)
- return ret;
-
- return 0;
+ return x86_cpu_init_f();
}
int arch_early_init_r(void)
--
1.9.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [U-Boot] [PATCH v3 6/8] libfdt: simplify fdt_del_mem_rsv()
2016-09-06 13:17 [U-Boot] [PATCH v3 0/8] Clean-up: squash lines for immediate return Masahiro Yamada
` (4 preceding siblings ...)
2016-09-06 13:17 ` [U-Boot] [PATCH v3 5/8] x86: " Masahiro Yamada
@ 2016-09-06 13:17 ` 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 13:17 ` [U-Boot] [PATCH v3 8/8] drivers: " Masahiro Yamada
7 siblings, 2 replies; 24+ messages in thread
From: Masahiro Yamada @ 2016-09-06 13:17 UTC (permalink / raw)
To: u-boot
The variable "err" is unneeded.
[ Device Tree Compiler commit: 36fd7331fb11276c09a6affc0d8cd4977f2fe100 ]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
Changes in v3: None
lib/libfdt/fdt_rw.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/lib/libfdt/fdt_rw.c b/lib/libfdt/fdt_rw.c
index e7321cc..47447b2 100644
--- a/lib/libfdt/fdt_rw.c
+++ b/lib/libfdt/fdt_rw.c
@@ -148,17 +148,13 @@ int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size)
int fdt_del_mem_rsv(void *fdt, int n)
{
struct fdt_reserve_entry *re = _fdt_mem_rsv_w(fdt, n);
- int err;
FDT_RW_CHECK_HEADER(fdt);
if (n >= fdt_num_mem_rsv(fdt))
return -FDT_ERR_NOTFOUND;
- err = _fdt_splice_mem_rsv(fdt, re, 1, 0);
- if (err)
- return err;
- return 0;
+ return _fdt_splice_mem_rsv(fdt, re, 1, 0);
}
static int _fdt_resize_property(void *fdt, int nodeoffset, const char *name,
--
1.9.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [U-Boot] [PATCH v3 7/8] arch, board: squash lines for immediate return
2016-09-06 13:17 [U-Boot] [PATCH v3 0/8] Clean-up: squash lines for immediate return Masahiro Yamada
` (5 preceding siblings ...)
2016-09-06 13:17 ` [U-Boot] [PATCH v3 6/8] libfdt: simplify fdt_del_mem_rsv() Masahiro Yamada
@ 2016-09-06 13:17 ` Masahiro Yamada
2016-09-06 16:37 ` Minkyu Kang
` (2 more replies)
2016-09-06 13:17 ` [U-Boot] [PATCH v3 8/8] drivers: " Masahiro Yamada
7 siblings, 3 replies; 24+ messages in thread
From: Masahiro Yamada @ 2016-09-06 13:17 UTC (permalink / raw)
To: u-boot
Remove unneeded variables and assignments.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
Changes in v3:
- More fixes
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/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 +----
16 files changed, 21 insertions(+), 82 deletions(-)
diff --git a/arch/arm/cpu/arm920t/imx/timer.c b/arch/arm/cpu/arm920t/imx/timer.c
index b62558f..178422a 100644
--- a/arch/arm/cpu/arm920t/imx/timer.c
+++ b/arch/arm/cpu/arm920t/imx/timer.c
@@ -78,11 +78,7 @@ unsigned long long get_ticks(void)
*/
ulong get_tbclk (void)
{
- ulong tbclk;
-
- tbclk = CONFIG_SYS_HZ;
-
- return tbclk;
+ return CONFIG_SYS_HZ;
}
/*
diff --git a/arch/arm/cpu/armv7/am33xx/sys_info.c b/arch/arm/cpu/armv7/am33xx/sys_info.c
index 52a6824..f42eee1 100644
--- a/arch/arm/cpu/armv7/am33xx/sys_info.c
+++ b/arch/arm/cpu/armv7/am33xx/sys_info.c
@@ -65,9 +65,7 @@ u32 get_device_type(void)
*/
u32 get_sysboot_value(void)
{
- int mode;
- mode = readl(&cstat->statusreg) & (SYSBOOT_MASK);
- return mode;
+ return readl(&cstat->statusreg) & SYSBOOT_MASK;
}
#ifdef CONFIG_DISPLAY_CPUINFO
diff --git a/arch/arm/cpu/sa1100/timer.c b/arch/arm/cpu/sa1100/timer.c
index 0a0006b..90e2128 100644
--- a/arch/arm/cpu/sa1100/timer.c
+++ b/arch/arm/cpu/sa1100/timer.c
@@ -66,8 +66,5 @@ unsigned long long get_ticks(void)
*/
ulong get_tbclk (void)
{
- ulong tbclk;
-
- tbclk = CONFIG_SYS_HZ;
- return tbclk;
+ return CONFIG_SYS_HZ;
}
diff --git a/arch/arm/mach-zynq/cpu.c b/arch/arm/mach-zynq/cpu.c
index 914b1fe..ba9171e 100644
--- a/arch/arm/mach-zynq/cpu.c
+++ b/arch/arm/mach-zynq/cpu.c
@@ -43,12 +43,8 @@ int arch_cpu_init(void)
unsigned int zynq_get_silicon_version(void)
{
- unsigned int ver;
-
- ver = (readl(&devcfg_base->mctrl) &
- ZYNQ_SILICON_VER_MASK) >> ZYNQ_SILICON_VER_SHIFT;
-
- return ver;
+ return (readl(&devcfg_base->mctrl) & ZYNQ_SILICON_VER_MASK)
+ >> ZYNQ_SILICON_VER_SHIFT;
}
void reset_cpu(ulong addr)
diff --git a/arch/blackfin/cpu/interrupts.c b/arch/blackfin/cpu/interrupts.c
index 45c92c3..abb7dc1 100644
--- a/arch/blackfin/cpu/interrupts.c
+++ b/arch/blackfin/cpu/interrupts.c
@@ -47,10 +47,7 @@ unsigned long long get_ticks(void)
*/
ulong get_tbclk(void)
{
- ulong tbclk;
-
- tbclk = CONFIG_SYS_HZ;
- return tbclk;
+ return CONFIG_SYS_HZ;
}
void enable_interrupts(void)
diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c
index 3163354..cb90c83 100644
--- a/arch/m68k/lib/time.c
+++ b/arch/m68k/lib/time.c
@@ -192,7 +192,5 @@ unsigned long usec2ticks(unsigned long usec)
*/
ulong get_tbclk(void)
{
- ulong tbclk;
- tbclk = CONFIG_SYS_HZ;
- return tbclk;
+ return CONFIG_SYS_HZ;
}
diff --git a/arch/powerpc/cpu/mpc512x/cpu.c b/arch/powerpc/cpu/mpc512x/cpu.c
index 8508e8d..4ee91e1 100644
--- a/arch/powerpc/cpu/mpc512x/cpu.c
+++ b/arch/powerpc/cpu/mpc512x/cpu.c
@@ -95,11 +95,7 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
*/
unsigned long get_tbclk (void)
{
- ulong tbclk;
-
- tbclk = (gd->bus_clk + 3L) / 4L;
-
- return tbclk;
+ return (gd->bus_clk + 3L) / 4L;
}
diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c
index 3809309..c87f0fd 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu.c
@@ -173,11 +173,7 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
unsigned long get_tbclk(void)
{
- ulong tbclk;
-
- tbclk = (gd->bus_clk + 3L) / 4L;
-
- return tbclk;
+ return (gd->bus_clk + 3L) / 4L;
}
diff --git a/arch/xtensa/lib/time.c b/arch/xtensa/lib/time.c
index 1332072..915eb51 100644
--- a/arch/xtensa/lib/time.c
+++ b/arch/xtensa/lib/time.c
@@ -104,10 +104,7 @@ unsigned long long get_ticks(void)
*/
ulong get_tbclk(void)
{
- ulong tbclk;
-
- tbclk = CONFIG_SYS_HZ;
- return tbclk;
+ return CONFIG_SYS_HZ;
}
#if XCHAL_HAVE_CCOUNT
diff --git a/board/amcc/bamboo/bamboo.c b/board/amcc/bamboo/bamboo.c
index c8d0963..2838f9a 100644
--- a/board/amcc/bamboo/bamboo.c
+++ b/board/amcc/bamboo/bamboo.c
@@ -438,11 +438,7 @@ int checkboard(void)
phys_size_t initdram (int board_type)
{
- long dram_size;
-
- dram_size = spd_sdram();
-
- return dram_size;
+ return spd_sdram();
}
/*----------------------------------------------------------------------------+
diff --git a/board/amcc/bubinga/bubinga.c b/board/amcc/bubinga/bubinga.c
index 5c1e071..9043de6 100644
--- a/board/amcc/bubinga/bubinga.c
+++ b/board/amcc/bubinga/bubinga.c
@@ -57,8 +57,5 @@ int checkboard(void)
------------------------------------------------------------------------- */
phys_size_t initdram(int board_type)
{
- long int ret;
-
- ret = spd_sdram();
- return ret;
+ return spd_sdram();
}
diff --git a/board/amcc/canyonlands/canyonlands.c b/board/amcc/canyonlands/canyonlands.c
index dc2e3ba..80b7739 100644
--- a/board/amcc/canyonlands/canyonlands.c
+++ b/board/amcc/canyonlands/canyonlands.c
@@ -63,11 +63,7 @@ u32 ddr_clktr(u32 default_val) {
*/
static inline int board_fpga_read(int offset)
{
- int data;
-
- data = in_8((void *)(CONFIG_SYS_FPGA_BASE + offset));
-
- return data;
+ return in_8((void *)(CONFIG_SYS_FPGA_BASE + offset));
}
static inline void board_fpga_write(int offset, int data)
diff --git a/board/corscience/tricorder/tricorder-eeprom.c b/board/corscience/tricorder/tricorder-eeprom.c
index 340a009..aeacd6a 100644
--- a/board/corscience/tricorder/tricorder-eeprom.c
+++ b/board/corscience/tricorder/tricorder-eeprom.c
@@ -190,13 +190,8 @@ int do_tricorder_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (argc == 3) {
ulong dev_addr = simple_strtoul(argv[2], NULL, 16);
- if (strcmp(argv[1], "read") == 0) {
- int rcode;
-
- rcode = tricorder_eeprom_read(dev_addr);
-
- return rcode;
- }
+ if (strcmp(argv[1], "read") == 0)
+ return tricorder_eeprom_read(dev_addr);
} else if (argc == 6 || argc == 7) {
ulong dev_addr = simple_strtoul(argv[2], NULL, 16);
char *name = argv[3];
@@ -207,14 +202,9 @@ int do_tricorder_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (argc == 7)
interface = argv[6];
- if (strcmp(argv[1], "write") == 0) {
- int rcode;
-
- rcode = tricorder_eeprom_write(dev_addr, name, version,
- serial, interface);
-
- return rcode;
- }
+ if (strcmp(argv[1], "write") == 0)
+ return tricorder_eeprom_write(dev_addr, name, version,
+ serial, interface);
}
return CMD_RET_USAGE;
diff --git a/board/freescale/common/zm7300.c b/board/freescale/common/zm7300.c
index be5953a..a6c3e69 100644
--- a/board/freescale/common/zm7300.c
+++ b/board/freescale/common/zm7300.c
@@ -140,9 +140,7 @@ int dpm_wrp(u8 r, u8 d)
/* Uses the DPM command RRP */
u8 zm_read(uchar reg)
{
- u8 d;
- d = dpm_rrp(reg);
- return d;
+ return dpm_rrp(reg);
}
/* ZM_write --
diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c
index 1600568..e8329bb 100644
--- a/board/samsung/goni/goni.c
+++ b/board/samsung/goni/goni.c
@@ -45,17 +45,11 @@ void i2c_init_board(void)
int power_init_board(void)
{
- int ret;
-
/*
* For PMIC the I2C bus is named as I2C5, but it is connected
* to logical I2C adapter 0
*/
- ret = pmic_init(I2C_0);
- if (ret)
- return ret;
-
- return 0;
+ return pmic_init(I2C_0);
}
int dram_init(void)
diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c
index 50da410..b5d5ba9 100644
--- a/board/ti/omap5_uevm/evm.c
+++ b/board/ti/omap5_uevm/evm.c
@@ -245,10 +245,7 @@ int ehci_hcd_init(int index, enum usb_init_type init,
int ehci_hcd_stop(void)
{
- int ret;
-
- ret = omap_ehci_hcd_stop();
- return ret;
+ return omap_ehci_hcd_stop();
}
void usb_hub_reset_devices(int port)
--
1.9.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [U-Boot] [PATCH v3 8/8] drivers: squash lines for immediate return
2016-09-06 13:17 [U-Boot] [PATCH v3 0/8] Clean-up: squash lines for immediate return Masahiro Yamada
` (6 preceding siblings ...)
2016-09-06 13:17 ` [U-Boot] [PATCH v3 7/8] arch, board: squash lines for immediate return Masahiro Yamada
@ 2016-09-06 13:17 ` Masahiro Yamada
2016-09-24 2:28 ` [U-Boot] [U-Boot, v3, " Tom Rini
7 siblings, 1 reply; 24+ messages in thread
From: Masahiro Yamada @ 2016-09-06 13:17 UTC (permalink / raw)
To: u-boot
Remove unneeded variables and assignments.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
Changes in v3:
- more changes
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/power/axp809.c | 8 +-------
drivers/rtc/m48t35ax.c | 4 +---
6 files changed, 9 insertions(+), 38 deletions(-)
diff --git a/drivers/block/sym53c8xx.c b/drivers/block/sym53c8xx.c
index 5daede7..50043e6 100644
--- a/drivers/block/sym53c8xx.c
+++ b/drivers/block/sym53c8xx.c
@@ -284,9 +284,8 @@ void scsi_low_level_init(int busdevfunc)
*/
unsigned long swap_script(unsigned long val)
{
- unsigned long tmp;
- tmp = ((val>>24)&0xff) | ((val>>8)&0xff00) | ((val<<8)&0xff0000) | ((val<<24)&0xff000000);
- return tmp;
+ return ((val >> 24) & 0xff) | ((val >> 8) & 0xff00) |
+ ((val << 8) & 0xff0000) | ((val << 24) & 0xff000000);
}
diff --git a/drivers/ddr/fsl/ddr1_dimm_params.c b/drivers/ddr/fsl/ddr1_dimm_params.c
index 00cdc22..369b325 100644
--- a/drivers/ddr/fsl/ddr1_dimm_params.c
+++ b/drivers/ddr/fsl/ddr1_dimm_params.c
@@ -108,22 +108,14 @@ static unsigned int byte40_table_ps[8] = {
static unsigned int
compute_trfc_ps_from_spd(unsigned char trctrfc_ext, unsigned char trfc)
{
- unsigned int trfc_ps;
-
- trfc_ps = (((trctrfc_ext & 0x1) * 256) + trfc) * 1000
+ return ((trctrfc_ext & 0x1) * 256 + trfc) * 1000
+ byte40_table_ps[(trctrfc_ext >> 1) & 0x7];
-
- return trfc_ps;
}
static unsigned int
compute_trc_ps_from_spd(unsigned char trctrfc_ext, unsigned char trc)
{
- unsigned int trc_ps;
-
- trc_ps = trc * 1000 + byte40_table_ps[(trctrfc_ext >> 4) & 0x7];
-
- return trc_ps;
+ return trc * 1000 + byte40_table_ps[(trctrfc_ext >> 4) & 0x7];
}
/*
diff --git a/drivers/ddr/fsl/ddr2_dimm_params.c b/drivers/ddr/fsl/ddr2_dimm_params.c
index 59baf6b..af752cc 100644
--- a/drivers/ddr/fsl/ddr2_dimm_params.c
+++ b/drivers/ddr/fsl/ddr2_dimm_params.c
@@ -107,22 +107,14 @@ static unsigned int byte40_table_ps[8] = {
static unsigned int
compute_trfc_ps_from_spd(unsigned char trctrfc_ext, unsigned char trfc)
{
- unsigned int trfc_ps;
-
- trfc_ps = (((trctrfc_ext & 0x1) * 256) + trfc) * 1000
+ return (((trctrfc_ext & 0x1) * 256) + trfc) * 1000
+ byte40_table_ps[(trctrfc_ext >> 1) & 0x7];
-
- return trfc_ps;
}
static unsigned int
compute_trc_ps_from_spd(unsigned char trctrfc_ext, unsigned char trc)
{
- unsigned int trc_ps;
-
- trc_ps = trc * 1000 + byte40_table_ps[(trctrfc_ext >> 4) & 0x7];
-
- return trc_ps;
+ return trc * 1000 + byte40_table_ps[(trctrfc_ext >> 4) & 0x7];
}
/*
diff --git a/drivers/ddr/marvell/a38x/ddr3_a38x.c b/drivers/ddr/marvell/a38x/ddr3_a38x.c
index f469907..c082122 100644
--- a/drivers/ddr/marvell/a38x/ddr3_a38x.c
+++ b/drivers/ddr/marvell/a38x/ddr3_a38x.c
@@ -706,11 +706,7 @@ int ddr3_tip_ext_write(u32 dev_num, u32 if_id, u32 reg_addr,
int ddr3_silicon_pre_init(void)
{
- int result;
-
- result = ddr3_silicon_init();
-
- return result;
+ return ddr3_silicon_init();
}
int ddr3_post_run_alg(void)
diff --git a/drivers/power/axp809.c b/drivers/power/axp809.c
index c8b76cf..c5b608d 100644
--- a/drivers/power/axp809.c
+++ b/drivers/power/axp809.c
@@ -217,13 +217,7 @@ int axp_set_sw(bool on)
int axp_init(void)
{
- int ret;
-
- ret = pmic_bus_init();
- if (ret)
- return ret;
-
- return 0;
+ return pmic_bus_init();
}
int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
diff --git a/drivers/rtc/m48t35ax.c b/drivers/rtc/m48t35ax.c
index 021b91f..36011a5 100644
--- a/drivers/rtc/m48t35ax.c
+++ b/drivers/rtc/m48t35ax.c
@@ -127,10 +127,8 @@ void rtc_reset (void)
static uchar rtc_read (uchar reg)
{
- uchar val;
- val = *(unsigned char *)
+ return *(unsigned char *)
((CONFIG_SYS_NVRAM_BASE_ADDR + CONFIG_SYS_NVRAM_SIZE - 8) + reg);
- return val;
}
static void rtc_write (uchar reg, uchar val)
--
1.9.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [U-Boot] [PATCH v3 6/8] libfdt: simplify fdt_del_mem_rsv()
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
1 sibling, 0 replies; 24+ messages in thread
From: Simon Glass @ 2016-09-06 14:23 UTC (permalink / raw)
To: u-boot
On 6 September 2016 at 07:17, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> The variable "err" is unneeded.
>
> [ Device Tree Compiler commit: 36fd7331fb11276c09a6affc0d8cd4977f2fe100 ]
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
>
> Changes in v3: None
>
> lib/libfdt/fdt_rw.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
Acked-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [U-Boot] [PATCH v3 2/8] video: squash lines for immediate return
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
2 siblings, 0 replies; 24+ messages in thread
From: Simon Glass @ 2016-09-06 14:23 UTC (permalink / raw)
To: u-boot
On 6 September 2016 at 07:17, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> For vidconsole_post_probe(), it is common coding style to let a
> probe method return the value of a register function.
>
> The others will become simple wrapper functions.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Acked-by: Anatolij Gustschin <agust@denx.de>
> ---
>
> Changes in v3:
> - Two more fixes
> - s/resister/register/
>
> 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 +-----
> 5 files changed, 5 insertions(+), 27 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [U-Boot] [PATCH v3 7/8] arch, board: squash lines for immediate return
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
2 siblings, 0 replies; 24+ messages in thread
From: Minkyu Kang @ 2016-09-06 16:37 UTC (permalink / raw)
To: u-boot
On 6 September 2016 at 22:17, Masahiro Yamada <yamada.masahiro@socionext.com
> wrote:
> Remove unneeded variables and assignments.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> Changes in v3:
> - More fixes
>
> 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/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 +----
> 16 files changed, 21 insertions(+), 82 deletions(-)
>
> diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c
> index 1600568..e8329bb 100644
> --- a/board/samsung/goni/goni.c
> +++ b/board/samsung/goni/goni.c
> @@ -45,17 +45,11 @@ void i2c_init_board(void)
>
> int power_init_board(void)
> {
> - int ret;
> -
> /*
> * For PMIC the I2C bus is named as I2C5, but it is connected
> * to logical I2C adapter 0
> */
> - ret = pmic_init(I2C_0);
> - if (ret)
> - return ret;
> -
> - return 0;
> + return pmic_init(I2C_0);
> }
>
> int dram_init(void)
>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
Thanks,
Minkyu Kang.
--
from. prom.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [U-Boot] [PATCH v3 2/8] video: squash lines for immediate return
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
2 siblings, 0 replies; 24+ messages in thread
From: Stephen Warren @ 2016-09-06 17:25 UTC (permalink / raw)
To: u-boot
On 09/06/2016 07:17 AM, Masahiro Yamada wrote:
> For vidconsole_post_probe(), it is common coding style to let a
> probe method return the value of a register function.
>
> The others will become simple wrapper functions.
drivers/video/tegra124/display.c:
Acked-by: Stephen Warren <swarren@nvidia.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [U-Boot] [PATCH v3 3/8] usb: replace ehci_*_remove() with usb_deregister()
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
1 sibling, 0 replies; 24+ messages in thread
From: Stephen Warren @ 2016-09-06 17:27 UTC (permalink / raw)
To: u-boot
On 09/06/2016 07:17 AM, Masahiro Yamada wrote:
> The remove callbacks of EHCI drivers are often just a wrapper of
> ehci_deregister.
Acked-by: Stephen Warren <swarren@nvidia.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [U-Boot] [PATCH v3 1/8] mmc: squash lines for immediate return
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
1 sibling, 0 replies; 24+ messages in thread
From: Jaehoon Chung @ 2016-09-08 13:46 UTC (permalink / raw)
To: u-boot
On 09/06/2016 10:17 PM, Masahiro Yamada wrote:
> These functions can be much simpler by squashing lines for immediate
> return.
>
> For *_bind() callbacks, they will be a simple wrapper function of an
> upper-level bind API.
>
> For mmc_set_{boot_bus_width,part_conf}, they will be a wrapper of
> mmc_switch().
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Best Regards,
Jaehoon Chung
> ---
>
> Changes in v3: None
>
> 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 +------
> 8 files changed, 15 insertions(+), 62 deletions(-)
>
> diff --git a/drivers/mmc/atmel_sdhci.c b/drivers/mmc/atmel_sdhci.c
> index dd6bd33..d8f8087 100644
> --- a/drivers/mmc/atmel_sdhci.c
> +++ b/drivers/mmc/atmel_sdhci.c
> @@ -136,13 +136,8 @@ static int atmel_sdhci_probe(struct udevice *dev)
> static int atmel_sdhci_bind(struct udevice *dev)
> {
> struct atmel_sdhci_plat *plat = dev_get_platdata(dev);
> - int ret;
>
> - ret = sdhci_bind(dev, &plat->mmc, &plat->cfg);
> - if (ret)
> - return ret;
> -
> - return 0;
> + return sdhci_bind(dev, &plat->mmc, &plat->cfg);
> }
>
> static const struct udevice_id atmel_sdhci_ids[] = {
> diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
> index 57271f1..568fed7 100644
> --- a/drivers/mmc/exynos_dw_mmc.c
> +++ b/drivers/mmc/exynos_dw_mmc.c
> @@ -284,13 +284,8 @@ static int exynos_dwmmc_probe(struct udevice *dev)
> static int exynos_dwmmc_bind(struct udevice *dev)
> {
> struct exynos_mmc_plat *plat = dev_get_platdata(dev);
> - int ret;
>
> - ret = dwmci_bind(dev, &plat->mmc, &plat->cfg);
> - if (ret)
> - return ret;
> -
> - return 0;
> + return dwmci_bind(dev, &plat->mmc, &plat->cfg);
> }
>
> static const struct udevice_id exynos_dwmmc_ids[] = {
> diff --git a/drivers/mmc/mmc_boot.c b/drivers/mmc/mmc_boot.c
> index 756a982..ac6f56f 100644
> --- a/drivers/mmc/mmc_boot.c
> +++ b/drivers/mmc/mmc_boot.c
> @@ -85,16 +85,10 @@ int mmc_boot_partition_size_change(struct mmc *mmc, unsigned long bootsize,
> */
> int mmc_set_boot_bus_width(struct mmc *mmc, u8 width, u8 reset, u8 mode)
> {
> - int err;
> -
> - err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BOOT_BUS_WIDTH,
> - EXT_CSD_BOOT_BUS_WIDTH_MODE(mode) |
> - EXT_CSD_BOOT_BUS_WIDTH_RESET(reset) |
> - EXT_CSD_BOOT_BUS_WIDTH_WIDTH(width));
> -
> - if (err)
> - return err;
> - return 0;
> + return mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BOOT_BUS_WIDTH,
> + EXT_CSD_BOOT_BUS_WIDTH_MODE(mode) |
> + EXT_CSD_BOOT_BUS_WIDTH_RESET(reset) |
> + EXT_CSD_BOOT_BUS_WIDTH_WIDTH(width));
> }
>
> /*
> @@ -106,16 +100,10 @@ int mmc_set_boot_bus_width(struct mmc *mmc, u8 width, u8 reset, u8 mode)
> */
> int mmc_set_part_conf(struct mmc *mmc, u8 ack, u8 part_num, u8 access)
> {
> - int err;
> -
> - err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_PART_CONF,
> - EXT_CSD_BOOT_ACK(ack) |
> - EXT_CSD_BOOT_PART_NUM(part_num) |
> - EXT_CSD_PARTITION_ACCESS(access));
> -
> - if (err)
> - return err;
> - return 0;
> + return mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_PART_CONF,
> + EXT_CSD_BOOT_ACK(ack) |
> + EXT_CSD_BOOT_PART_NUM(part_num) |
> + EXT_CSD_PARTITION_ACCESS(access));
> }
>
> /*
> diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c
> index 8d4399e..1b82991 100644
> --- a/drivers/mmc/msm_sdhci.c
> +++ b/drivers/mmc/msm_sdhci.c
> @@ -190,13 +190,8 @@ static int msm_ofdata_to_platdata(struct udevice *dev)
> static int msm_sdc_bind(struct udevice *dev)
> {
> struct msm_sdhc_plat *plat = dev_get_platdata(dev);
> - int ret;
>
> - ret = sdhci_bind(dev, &plat->mmc, &plat->cfg);
> - if (ret)
> - return ret;
> -
> - return 0;
> + return sdhci_bind(dev, &plat->mmc, &plat->cfg);
> }
>
> static const struct udevice_id msm_mmc_ids[] = {
> diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c
> index 020a59b..859760b 100644
> --- a/drivers/mmc/rockchip_dw_mmc.c
> +++ b/drivers/mmc/rockchip_dw_mmc.c
> @@ -142,13 +142,8 @@ static int rockchip_dwmmc_probe(struct udevice *dev)
> static int rockchip_dwmmc_bind(struct udevice *dev)
> {
> struct rockchip_mmc_plat *plat = dev_get_platdata(dev);
> - int ret;
>
> - ret = dwmci_bind(dev, &plat->mmc, &plat->cfg);
> - if (ret)
> - return ret;
> -
> - return 0;
> + return dwmci_bind(dev, &plat->mmc, &plat->cfg);
> }
>
> static const struct udevice_id rockchip_dwmmc_ids[] = {
> diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c
> index 624029b..c56e1a3 100644
> --- a/drivers/mmc/rockchip_sdhci.c
> +++ b/drivers/mmc/rockchip_sdhci.c
> @@ -62,13 +62,8 @@ static int arasan_sdhci_ofdata_to_platdata(struct udevice *dev)
> static int rockchip_sdhci_bind(struct udevice *dev)
> {
> struct rockchip_sdhc_plat *plat = dev_get_platdata(dev);
> - int ret;
>
> - ret = sdhci_bind(dev, &plat->mmc, &plat->cfg);
> - if (ret)
> - return ret;
> -
> - return 0;
> + return sdhci_bind(dev, &plat->mmc, &plat->cfg);
> }
>
> static const struct udevice_id arasan_sdhci_ids[] = {
> diff --git a/drivers/mmc/sandbox_mmc.c b/drivers/mmc/sandbox_mmc.c
> index 5f1333b..fdb29a5 100644
> --- a/drivers/mmc/sandbox_mmc.c
> +++ b/drivers/mmc/sandbox_mmc.c
> @@ -112,7 +112,6 @@ int sandbox_mmc_bind(struct udevice *dev)
> {
> struct sandbox_mmc_plat *plat = dev_get_platdata(dev);
> struct mmc_config *cfg = &plat->cfg;
> - int ret;
>
> cfg->name = dev->name;
> cfg->host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_8BIT;
> @@ -121,11 +120,7 @@ int sandbox_mmc_bind(struct udevice *dev)
> cfg->f_max = 52000000;
> cfg->b_max = U32_MAX;
>
> - ret = mmc_bind(dev, &plat->mmc, cfg);
> - if (ret)
> - return ret;
> -
> - return 0;
> + return mmc_bind(dev, &plat->mmc, cfg);
> }
>
> int sandbox_mmc_unbind(struct udevice *dev)
> diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
> index 3815b94..b991102 100644
> --- a/drivers/mmc/zynq_sdhci.c
> +++ b/drivers/mmc/zynq_sdhci.c
> @@ -63,13 +63,8 @@ static int arasan_sdhci_ofdata_to_platdata(struct udevice *dev)
> static int arasan_sdhci_bind(struct udevice *dev)
> {
> struct arasan_sdhci_plat *plat = dev_get_platdata(dev);
> - int ret;
>
> - ret = sdhci_bind(dev, &plat->mmc, &plat->cfg);
> - if (ret)
> - return ret;
> -
> - return 0;
> + return sdhci_bind(dev, &plat->mmc, &plat->cfg);
> }
>
> static const struct udevice_id arasan_sdhci_ids[] = {
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [U-Boot] [PATCH v3 7/8] arch, board: squash lines for immediate return
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
2 siblings, 0 replies; 24+ messages in thread
From: Angelo Dureghello @ 2016-09-08 21:26 UTC (permalink / raw)
To: u-boot
On 06/09/2016 15:17, Masahiro Yamada wrote:
> Remove unneeded variables and assignments.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> Changes in v3:
> - More fixes
>
> 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/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 +----
> 16 files changed, 21 insertions(+), 82 deletions(-)
>
> diff --git a/arch/arm/cpu/arm920t/imx/timer.c b/arch/arm/cpu/arm920t/imx/timer.c
> index b62558f..178422a 100644
> --- a/arch/arm/cpu/arm920t/imx/timer.c
> +++ b/arch/arm/cpu/arm920t/imx/timer.c
> @@ -78,11 +78,7 @@ unsigned long long get_ticks(void)
> */
> ulong get_tbclk (void)
> {
> - ulong tbclk;
> -
> - tbclk = CONFIG_SYS_HZ;
> -
> - return tbclk;
> + return CONFIG_SYS_HZ;
> }
>
> /*
> diff --git a/arch/arm/cpu/armv7/am33xx/sys_info.c b/arch/arm/cpu/armv7/am33xx/sys_info.c
> index 52a6824..f42eee1 100644
> --- a/arch/arm/cpu/armv7/am33xx/sys_info.c
> +++ b/arch/arm/cpu/armv7/am33xx/sys_info.c
> @@ -65,9 +65,7 @@ u32 get_device_type(void)
> */
> u32 get_sysboot_value(void)
> {
> - int mode;
> - mode = readl(&cstat->statusreg) & (SYSBOOT_MASK);
> - return mode;
> + return readl(&cstat->statusreg) & SYSBOOT_MASK;
> }
>
> #ifdef CONFIG_DISPLAY_CPUINFO
> diff --git a/arch/arm/cpu/sa1100/timer.c b/arch/arm/cpu/sa1100/timer.c
> index 0a0006b..90e2128 100644
> --- a/arch/arm/cpu/sa1100/timer.c
> +++ b/arch/arm/cpu/sa1100/timer.c
> @@ -66,8 +66,5 @@ unsigned long long get_ticks(void)
> */
> ulong get_tbclk (void)
> {
> - ulong tbclk;
> -
> - tbclk = CONFIG_SYS_HZ;
> - return tbclk;
> + return CONFIG_SYS_HZ;
> }
> diff --git a/arch/arm/mach-zynq/cpu.c b/arch/arm/mach-zynq/cpu.c
> index 914b1fe..ba9171e 100644
> --- a/arch/arm/mach-zynq/cpu.c
> +++ b/arch/arm/mach-zynq/cpu.c
> @@ -43,12 +43,8 @@ int arch_cpu_init(void)
>
> unsigned int zynq_get_silicon_version(void)
> {
> - unsigned int ver;
> -
> - ver = (readl(&devcfg_base->mctrl) &
> - ZYNQ_SILICON_VER_MASK) >> ZYNQ_SILICON_VER_SHIFT;
> -
> - return ver;
> + return (readl(&devcfg_base->mctrl) & ZYNQ_SILICON_VER_MASK)
> + >> ZYNQ_SILICON_VER_SHIFT;
> }
>
> void reset_cpu(ulong addr)
> diff --git a/arch/blackfin/cpu/interrupts.c b/arch/blackfin/cpu/interrupts.c
> index 45c92c3..abb7dc1 100644
> --- a/arch/blackfin/cpu/interrupts.c
> +++ b/arch/blackfin/cpu/interrupts.c
> @@ -47,10 +47,7 @@ unsigned long long get_ticks(void)
> */
> ulong get_tbclk(void)
> {
> - ulong tbclk;
> -
> - tbclk = CONFIG_SYS_HZ;
> - return tbclk;
> + return CONFIG_SYS_HZ;
> }
>
> void enable_interrupts(void)
> diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c
> index 3163354..cb90c83 100644
> --- a/arch/m68k/lib/time.c
> +++ b/arch/m68k/lib/time.c
> @@ -192,7 +192,5 @@ unsigned long usec2ticks(unsigned long usec)
> */
> ulong get_tbclk(void)
> {
> - ulong tbclk;
> - tbclk = CONFIG_SYS_HZ;
> - return tbclk;
> + return CONFIG_SYS_HZ;
> }
> diff --git a/arch/powerpc/cpu/mpc512x/cpu.c b/arch/powerpc/cpu/mpc512x/cpu.c
> index 8508e8d..4ee91e1 100644
> --- a/arch/powerpc/cpu/mpc512x/cpu.c
> +++ b/arch/powerpc/cpu/mpc512x/cpu.c
> @@ -95,11 +95,7 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
> */
> unsigned long get_tbclk (void)
> {
> - ulong tbclk;
> -
> - tbclk = (gd->bus_clk + 3L) / 4L;
> -
> - return tbclk;
> + return (gd->bus_clk + 3L) / 4L;
> }
>
>
> diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c
> index 3809309..c87f0fd 100644
> --- a/arch/powerpc/cpu/mpc83xx/cpu.c
> +++ b/arch/powerpc/cpu/mpc83xx/cpu.c
> @@ -173,11 +173,7 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
>
> unsigned long get_tbclk(void)
> {
> - ulong tbclk;
> -
> - tbclk = (gd->bus_clk + 3L) / 4L;
> -
> - return tbclk;
> + return (gd->bus_clk + 3L) / 4L;
> }
>
>
> diff --git a/arch/xtensa/lib/time.c b/arch/xtensa/lib/time.c
> index 1332072..915eb51 100644
> --- a/arch/xtensa/lib/time.c
> +++ b/arch/xtensa/lib/time.c
> @@ -104,10 +104,7 @@ unsigned long long get_ticks(void)
> */
> ulong get_tbclk(void)
> {
> - ulong tbclk;
> -
> - tbclk = CONFIG_SYS_HZ;
> - return tbclk;
> + return CONFIG_SYS_HZ;
> }
>
> #if XCHAL_HAVE_CCOUNT
> diff --git a/board/amcc/bamboo/bamboo.c b/board/amcc/bamboo/bamboo.c
> index c8d0963..2838f9a 100644
> --- a/board/amcc/bamboo/bamboo.c
> +++ b/board/amcc/bamboo/bamboo.c
> @@ -438,11 +438,7 @@ int checkboard(void)
>
> phys_size_t initdram (int board_type)
> {
> - long dram_size;
> -
> - dram_size = spd_sdram();
> -
> - return dram_size;
> + return spd_sdram();
> }
>
> /*----------------------------------------------------------------------------+
> diff --git a/board/amcc/bubinga/bubinga.c b/board/amcc/bubinga/bubinga.c
> index 5c1e071..9043de6 100644
> --- a/board/amcc/bubinga/bubinga.c
> +++ b/board/amcc/bubinga/bubinga.c
> @@ -57,8 +57,5 @@ int checkboard(void)
> ------------------------------------------------------------------------- */
> phys_size_t initdram(int board_type)
> {
> - long int ret;
> -
> - ret = spd_sdram();
> - return ret;
> + return spd_sdram();
> }
> diff --git a/board/amcc/canyonlands/canyonlands.c b/board/amcc/canyonlands/canyonlands.c
> index dc2e3ba..80b7739 100644
> --- a/board/amcc/canyonlands/canyonlands.c
> +++ b/board/amcc/canyonlands/canyonlands.c
> @@ -63,11 +63,7 @@ u32 ddr_clktr(u32 default_val) {
> */
> static inline int board_fpga_read(int offset)
> {
> - int data;
> -
> - data = in_8((void *)(CONFIG_SYS_FPGA_BASE + offset));
> -
> - return data;
> + return in_8((void *)(CONFIG_SYS_FPGA_BASE + offset));
> }
>
> static inline void board_fpga_write(int offset, int data)
> diff --git a/board/corscience/tricorder/tricorder-eeprom.c b/board/corscience/tricorder/tricorder-eeprom.c
> index 340a009..aeacd6a 100644
> --- a/board/corscience/tricorder/tricorder-eeprom.c
> +++ b/board/corscience/tricorder/tricorder-eeprom.c
> @@ -190,13 +190,8 @@ int do_tricorder_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
> if (argc == 3) {
> ulong dev_addr = simple_strtoul(argv[2], NULL, 16);
>
> - if (strcmp(argv[1], "read") == 0) {
> - int rcode;
> -
> - rcode = tricorder_eeprom_read(dev_addr);
> -
> - return rcode;
> - }
> + if (strcmp(argv[1], "read") == 0)
> + return tricorder_eeprom_read(dev_addr);
> } else if (argc == 6 || argc == 7) {
> ulong dev_addr = simple_strtoul(argv[2], NULL, 16);
> char *name = argv[3];
> @@ -207,14 +202,9 @@ int do_tricorder_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
> if (argc == 7)
> interface = argv[6];
>
> - if (strcmp(argv[1], "write") == 0) {
> - int rcode;
> -
> - rcode = tricorder_eeprom_write(dev_addr, name, version,
> - serial, interface);
> -
> - return rcode;
> - }
> + if (strcmp(argv[1], "write") == 0)
> + return tricorder_eeprom_write(dev_addr, name, version,
> + serial, interface);
> }
>
> return CMD_RET_USAGE;
> diff --git a/board/freescale/common/zm7300.c b/board/freescale/common/zm7300.c
> index be5953a..a6c3e69 100644
> --- a/board/freescale/common/zm7300.c
> +++ b/board/freescale/common/zm7300.c
> @@ -140,9 +140,7 @@ int dpm_wrp(u8 r, u8 d)
> /* Uses the DPM command RRP */
> u8 zm_read(uchar reg)
> {
> - u8 d;
> - d = dpm_rrp(reg);
> - return d;
> + return dpm_rrp(reg);
> }
>
> /* ZM_write --
> diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c
> index 1600568..e8329bb 100644
> --- a/board/samsung/goni/goni.c
> +++ b/board/samsung/goni/goni.c
> @@ -45,17 +45,11 @@ void i2c_init_board(void)
>
> int power_init_board(void)
> {
> - int ret;
> -
> /*
> * For PMIC the I2C bus is named as I2C5, but it is connected
> * to logical I2C adapter 0
> */
> - ret = pmic_init(I2C_0);
> - if (ret)
> - return ret;
> -
> - return 0;
> + return pmic_init(I2C_0);
> }
>
> int dram_init(void)
> diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c
> index 50da410..b5d5ba9 100644
> --- a/board/ti/omap5_uevm/evm.c
> +++ b/board/ti/omap5_uevm/evm.c
> @@ -245,10 +245,7 @@ int ehci_hcd_init(int index, enum usb_init_type init,
>
> int ehci_hcd_stop(void)
> {
> - int ret;
> -
> - ret = omap_ehci_hcd_stop();
> - return ret;
> + return omap_ehci_hcd_stop();
> }
>
> void usb_hub_reset_devices(int port)
>
Reviewed-by: Angelo Dureghello <angelo@sysam.it>
Many thanks,
Angelo Dureghello
^ permalink raw reply [flat|nested] 24+ messages in thread
* [U-Boot] [U-Boot, v3, 1/8] mmc: squash lines for immediate return
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 ` Tom Rini
1 sibling, 0 replies; 24+ messages in thread
From: Tom Rini @ 2016-09-24 2:27 UTC (permalink / raw)
To: u-boot
On Tue, Sep 06, 2016 at 10:17:32PM +0900, Masahiro Yamada wrote:
> These functions can be much simpler by squashing lines for immediate
> return.
>
> For *_bind() callbacks, they will be a simple wrapper function of an
> upper-level bind API.
>
> For mmc_set_{boot_bus_width,part_conf}, they will be a wrapper of
> mmc_switch().
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160923/8bdb2660/attachment-0001.sig>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [U-Boot] [U-Boot, v3, 2/8] video: squash lines for immediate return
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 ` Tom Rini
2 siblings, 0 replies; 24+ messages in thread
From: Tom Rini @ 2016-09-24 2:27 UTC (permalink / raw)
To: u-boot
On Tue, Sep 06, 2016 at 10:17:33PM +0900, Masahiro Yamada wrote:
> For vidconsole_post_probe(), it is common coding style to let a
> probe method return the value of a register function.
>
> The others will become simple wrapper functions.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Acked-by: Anatolij Gustschin <agust@denx.de>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Acked-by: Stephen Warren <swarren@nvidia.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160923/c5935594/attachment.sig>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [U-Boot] [U-Boot, v3, 3/8] usb: replace ehci_*_remove() with usb_deregister()
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 ` Tom Rini
1 sibling, 0 replies; 24+ messages in thread
From: Tom Rini @ 2016-09-24 2:27 UTC (permalink / raw)
To: u-boot
On Tue, Sep 06, 2016 at 10:17:34PM +0900, Masahiro Yamada wrote:
> The remove callbacks of EHCI drivers are often just a wrapper of
> ehci_deregister.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Acked-by: Stephen Warren <swarren@nvidia.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160923/444d75b6/attachment.sig>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [U-Boot] [U-Boot, v3, 4/8] usb: squash lines for immediate return
2016-09-06 13:17 ` [U-Boot] [PATCH v3 4/8] usb: squash lines for immediate return Masahiro Yamada
@ 2016-09-24 2:27 ` Tom Rini
0 siblings, 0 replies; 24+ messages in thread
From: Tom Rini @ 2016-09-24 2:27 UTC (permalink / raw)
To: u-boot
On Tue, Sep 06, 2016 at 10:17:35PM +0900, Masahiro Yamada wrote:
> This makes functions much simpler.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160923/6cc3f712/attachment.sig>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [U-Boot] [U-Boot, v3, 5/8] x86: squash lines for immediate return
2016-09-06 13:17 ` [U-Boot] [PATCH v3 5/8] x86: " Masahiro Yamada
@ 2016-09-24 2:28 ` Tom Rini
0 siblings, 0 replies; 24+ messages in thread
From: Tom Rini @ 2016-09-24 2:28 UTC (permalink / raw)
To: u-boot
On Tue, Sep 06, 2016 at 10:17:36PM +0900, Masahiro Yamada wrote:
> arch_cpu_init() can be simpler by this refactoring.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160923/17b30c54/attachment.sig>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [U-Boot] [U-Boot,v3,6/8] libfdt: simplify fdt_del_mem_rsv()
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 ` Tom Rini
1 sibling, 0 replies; 24+ messages in thread
From: Tom Rini @ 2016-09-24 2:28 UTC (permalink / raw)
To: u-boot
On Tue, Sep 06, 2016 at 10:17:37PM +0900, Masahiro Yamada wrote:
> The variable "err" is unneeded.
>
> [ Device Tree Compiler commit: 36fd7331fb11276c09a6affc0d8cd4977f2fe100 ]
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> Acked-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160923/ef22935b/attachment.sig>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [U-Boot] [U-Boot, v3, 7/8] arch, board: squash lines for immediate return
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 ` Tom Rini
2 siblings, 0 replies; 24+ messages in thread
From: Tom Rini @ 2016-09-24 2:28 UTC (permalink / raw)
To: u-boot
On Tue, Sep 06, 2016 at 10:17:38PM +0900, Masahiro Yamada wrote:
> Remove unneeded variables and assignments.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
> Reviewed-by: Angelo Dureghello <angelo@sysam.it>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160923/b0cf456c/attachment.sig>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [U-Boot] [U-Boot, v3, 8/8] drivers: squash lines for immediate return
2016-09-06 13:17 ` [U-Boot] [PATCH v3 8/8] drivers: " Masahiro Yamada
@ 2016-09-24 2:28 ` Tom Rini
0 siblings, 0 replies; 24+ messages in thread
From: Tom Rini @ 2016-09-24 2:28 UTC (permalink / raw)
To: u-boot
On Tue, Sep 06, 2016 at 10:17:39PM +0900, Masahiro Yamada wrote:
> Remove unneeded variables and assignments.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160923/9b3db6ed/attachment.sig>
^ 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.