arch, board: squash lines for immediate return

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>
master
Masahiro Yamada 8 years ago committed by Tom Rini
parent 7dc0789579
commit 63a7578e4e
  1. 6
      arch/arm/cpu/arm920t/imx/timer.c
  2. 4
      arch/arm/cpu/armv7/am33xx/sys_info.c
  3. 5
      arch/arm/cpu/sa1100/timer.c
  4. 8
      arch/arm/mach-zynq/cpu.c
  5. 5
      arch/blackfin/cpu/interrupts.c
  6. 4
      arch/m68k/lib/time.c
  7. 6
      arch/powerpc/cpu/mpc512x/cpu.c
  8. 6
      arch/powerpc/cpu/mpc83xx/cpu.c
  9. 5
      arch/xtensa/lib/time.c
  10. 6
      board/amcc/bamboo/bamboo.c
  11. 5
      board/amcc/bubinga/bubinga.c
  12. 6
      board/amcc/canyonlands/canyonlands.c
  13. 20
      board/corscience/tricorder/tricorder-eeprom.c
  14. 4
      board/freescale/common/zm7300.c
  15. 8
      board/samsung/goni/goni.c
  16. 5
      board/ti/omap5_uevm/evm.c

@ -78,11 +78,7 @@ unsigned long long get_ticks(void)
*/ */
ulong get_tbclk (void) ulong get_tbclk (void)
{ {
ulong tbclk; return CONFIG_SYS_HZ;
tbclk = CONFIG_SYS_HZ;
return tbclk;
} }
/* /*

@ -65,9 +65,7 @@ u32 get_device_type(void)
*/ */
u32 get_sysboot_value(void) u32 get_sysboot_value(void)
{ {
int mode; return readl(&cstat->statusreg) & SYSBOOT_MASK;
mode = readl(&cstat->statusreg) & (SYSBOOT_MASK);
return mode;
} }
#ifdef CONFIG_DISPLAY_CPUINFO #ifdef CONFIG_DISPLAY_CPUINFO

@ -66,8 +66,5 @@ unsigned long long get_ticks(void)
*/ */
ulong get_tbclk (void) ulong get_tbclk (void)
{ {
ulong tbclk; return CONFIG_SYS_HZ;
tbclk = CONFIG_SYS_HZ;
return tbclk;
} }

@ -43,12 +43,8 @@ int arch_cpu_init(void)
unsigned int zynq_get_silicon_version(void) unsigned int zynq_get_silicon_version(void)
{ {
unsigned int ver; return (readl(&devcfg_base->mctrl) & ZYNQ_SILICON_VER_MASK)
>> ZYNQ_SILICON_VER_SHIFT;
ver = (readl(&devcfg_base->mctrl) &
ZYNQ_SILICON_VER_MASK) >> ZYNQ_SILICON_VER_SHIFT;
return ver;
} }
void reset_cpu(ulong addr) void reset_cpu(ulong addr)

@ -47,10 +47,7 @@ unsigned long long get_ticks(void)
*/ */
ulong get_tbclk(void) ulong get_tbclk(void)
{ {
ulong tbclk; return CONFIG_SYS_HZ;
tbclk = CONFIG_SYS_HZ;
return tbclk;
} }
void enable_interrupts(void) void enable_interrupts(void)

@ -192,7 +192,5 @@ unsigned long usec2ticks(unsigned long usec)
*/ */
ulong get_tbclk(void) ulong get_tbclk(void)
{ {
ulong tbclk; return CONFIG_SYS_HZ;
tbclk = CONFIG_SYS_HZ;
return tbclk;
} }

@ -95,11 +95,7 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
*/ */
unsigned long get_tbclk (void) unsigned long get_tbclk (void)
{ {
ulong tbclk; return (gd->bus_clk + 3L) / 4L;
tbclk = (gd->bus_clk + 3L) / 4L;
return tbclk;
} }

@ -173,11 +173,7 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
unsigned long get_tbclk(void) unsigned long get_tbclk(void)
{ {
ulong tbclk; return (gd->bus_clk + 3L) / 4L;
tbclk = (gd->bus_clk + 3L) / 4L;
return tbclk;
} }

@ -104,10 +104,7 @@ unsigned long long get_ticks(void)
*/ */
ulong get_tbclk(void) ulong get_tbclk(void)
{ {
ulong tbclk; return CONFIG_SYS_HZ;
tbclk = CONFIG_SYS_HZ;
return tbclk;
} }
#if XCHAL_HAVE_CCOUNT #if XCHAL_HAVE_CCOUNT

@ -438,11 +438,7 @@ int checkboard(void)
phys_size_t initdram (int board_type) phys_size_t initdram (int board_type)
{ {
long dram_size; return spd_sdram();
dram_size = spd_sdram();
return dram_size;
} }
/*----------------------------------------------------------------------------+ /*----------------------------------------------------------------------------+

@ -57,8 +57,5 @@ int checkboard(void)
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
phys_size_t initdram(int board_type) phys_size_t initdram(int board_type)
{ {
long int ret; return spd_sdram();
ret = spd_sdram();
return ret;
} }

@ -63,11 +63,7 @@ u32 ddr_clktr(u32 default_val) {
*/ */
static inline int board_fpga_read(int offset) static inline int board_fpga_read(int offset)
{ {
int data; return in_8((void *)(CONFIG_SYS_FPGA_BASE + offset));
data = in_8((void *)(CONFIG_SYS_FPGA_BASE + offset));
return data;
} }
static inline void board_fpga_write(int offset, int data) static inline void board_fpga_write(int offset, int data)

@ -190,13 +190,8 @@ int do_tricorder_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (argc == 3) { if (argc == 3) {
ulong dev_addr = simple_strtoul(argv[2], NULL, 16); ulong dev_addr = simple_strtoul(argv[2], NULL, 16);
if (strcmp(argv[1], "read") == 0) { if (strcmp(argv[1], "read") == 0)
int rcode; return tricorder_eeprom_read(dev_addr);
rcode = tricorder_eeprom_read(dev_addr);
return rcode;
}
} else if (argc == 6 || argc == 7) { } else if (argc == 6 || argc == 7) {
ulong dev_addr = simple_strtoul(argv[2], NULL, 16); ulong dev_addr = simple_strtoul(argv[2], NULL, 16);
char *name = argv[3]; 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) if (argc == 7)
interface = argv[6]; interface = argv[6];
if (strcmp(argv[1], "write") == 0) { if (strcmp(argv[1], "write") == 0)
int rcode; return tricorder_eeprom_write(dev_addr, name, version,
serial, interface);
rcode = tricorder_eeprom_write(dev_addr, name, version,
serial, interface);
return rcode;
}
} }
return CMD_RET_USAGE; return CMD_RET_USAGE;

@ -140,9 +140,7 @@ int dpm_wrp(u8 r, u8 d)
/* Uses the DPM command RRP */ /* Uses the DPM command RRP */
u8 zm_read(uchar reg) u8 zm_read(uchar reg)
{ {
u8 d; return dpm_rrp(reg);
d = dpm_rrp(reg);
return d;
} }
/* ZM_write -- /* ZM_write --

@ -45,17 +45,11 @@ void i2c_init_board(void)
int power_init_board(void) int power_init_board(void)
{ {
int ret;
/* /*
* For PMIC the I2C bus is named as I2C5, but it is connected * For PMIC the I2C bus is named as I2C5, but it is connected
* to logical I2C adapter 0 * to logical I2C adapter 0
*/ */
ret = pmic_init(I2C_0); return pmic_init(I2C_0);
if (ret)
return ret;
return 0;
} }
int dram_init(void) int dram_init(void)

@ -245,10 +245,7 @@ int ehci_hcd_init(int index, enum usb_init_type init,
int ehci_hcd_stop(void) int ehci_hcd_stop(void)
{ {
int ret; return omap_ehci_hcd_stop();
ret = omap_ehci_hcd_stop();
return ret;
} }
void usb_hub_reset_devices(int port) void usb_hub_reset_devices(int port)

Loading…
Cancel
Save