Commit 63a7578e4e7dc906e75b0bec5a2f3fe41c3720f4
Committed by
Tom Rini
1 parent
7dc0789579
Exists in
v2017.01-smarct4x
and in
25 other branches
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>
Showing 16 changed files with 21 additions and 82 deletions Side-by-side Diff
- arch/arm/cpu/arm920t/imx/timer.c
- arch/arm/cpu/armv7/am33xx/sys_info.c
- arch/arm/cpu/sa1100/timer.c
- arch/arm/mach-zynq/cpu.c
- arch/blackfin/cpu/interrupts.c
- arch/m68k/lib/time.c
- arch/powerpc/cpu/mpc512x/cpu.c
- arch/powerpc/cpu/mpc83xx/cpu.c
- arch/xtensa/lib/time.c
- board/amcc/bamboo/bamboo.c
- board/amcc/bubinga/bubinga.c
- board/amcc/canyonlands/canyonlands.c
- board/corscience/tricorder/tricorder-eeprom.c
- board/freescale/common/zm7300.c
- board/samsung/goni/goni.c
- board/ti/omap5_uevm/evm.c
arch/arm/cpu/arm920t/imx/timer.c
arch/arm/cpu/armv7/am33xx/sys_info.c
arch/arm/cpu/sa1100/timer.c
arch/arm/mach-zynq/cpu.c
... | ... | @@ -43,12 +43,8 @@ |
43 | 43 | |
44 | 44 | unsigned int zynq_get_silicon_version(void) |
45 | 45 | { |
46 | - unsigned int ver; | |
47 | - | |
48 | - ver = (readl(&devcfg_base->mctrl) & | |
49 | - ZYNQ_SILICON_VER_MASK) >> ZYNQ_SILICON_VER_SHIFT; | |
50 | - | |
51 | - return ver; | |
46 | + return (readl(&devcfg_base->mctrl) & ZYNQ_SILICON_VER_MASK) | |
47 | + >> ZYNQ_SILICON_VER_SHIFT; | |
52 | 48 | } |
53 | 49 | |
54 | 50 | void reset_cpu(ulong addr) |
arch/blackfin/cpu/interrupts.c
arch/m68k/lib/time.c
arch/powerpc/cpu/mpc512x/cpu.c
arch/powerpc/cpu/mpc83xx/cpu.c
arch/xtensa/lib/time.c
board/amcc/bamboo/bamboo.c
... | ... | @@ -438,11 +438,7 @@ |
438 | 438 | |
439 | 439 | phys_size_t initdram (int board_type) |
440 | 440 | { |
441 | - long dram_size; | |
442 | - | |
443 | - dram_size = spd_sdram(); | |
444 | - | |
445 | - return dram_size; | |
441 | + return spd_sdram(); | |
446 | 442 | } |
447 | 443 | |
448 | 444 | /*----------------------------------------------------------------------------+ |
board/amcc/bubinga/bubinga.c
board/amcc/canyonlands/canyonlands.c
... | ... | @@ -63,11 +63,7 @@ |
63 | 63 | */ |
64 | 64 | static inline int board_fpga_read(int offset) |
65 | 65 | { |
66 | - int data; | |
67 | - | |
68 | - data = in_8((void *)(CONFIG_SYS_FPGA_BASE + offset)); | |
69 | - | |
70 | - return data; | |
66 | + return in_8((void *)(CONFIG_SYS_FPGA_BASE + offset)); | |
71 | 67 | } |
72 | 68 | |
73 | 69 | static inline void board_fpga_write(int offset, int data) |
board/corscience/tricorder/tricorder-eeprom.c
... | ... | @@ -190,13 +190,8 @@ |
190 | 190 | if (argc == 3) { |
191 | 191 | ulong dev_addr = simple_strtoul(argv[2], NULL, 16); |
192 | 192 | |
193 | - if (strcmp(argv[1], "read") == 0) { | |
194 | - int rcode; | |
195 | - | |
196 | - rcode = tricorder_eeprom_read(dev_addr); | |
197 | - | |
198 | - return rcode; | |
199 | - } | |
193 | + if (strcmp(argv[1], "read") == 0) | |
194 | + return tricorder_eeprom_read(dev_addr); | |
200 | 195 | } else if (argc == 6 || argc == 7) { |
201 | 196 | ulong dev_addr = simple_strtoul(argv[2], NULL, 16); |
202 | 197 | char *name = argv[3]; |
... | ... | @@ -207,14 +202,9 @@ |
207 | 202 | if (argc == 7) |
208 | 203 | interface = argv[6]; |
209 | 204 | |
210 | - if (strcmp(argv[1], "write") == 0) { | |
211 | - int rcode; | |
212 | - | |
213 | - rcode = tricorder_eeprom_write(dev_addr, name, version, | |
214 | - serial, interface); | |
215 | - | |
216 | - return rcode; | |
217 | - } | |
205 | + if (strcmp(argv[1], "write") == 0) | |
206 | + return tricorder_eeprom_write(dev_addr, name, version, | |
207 | + serial, interface); | |
218 | 208 | } |
219 | 209 | |
220 | 210 | return CMD_RET_USAGE; |
board/freescale/common/zm7300.c
board/samsung/goni/goni.c
... | ... | @@ -45,17 +45,11 @@ |
45 | 45 | |
46 | 46 | int power_init_board(void) |
47 | 47 | { |
48 | - int ret; | |
49 | - | |
50 | 48 | /* |
51 | 49 | * For PMIC the I2C bus is named as I2C5, but it is connected |
52 | 50 | * to logical I2C adapter 0 |
53 | 51 | */ |
54 | - ret = pmic_init(I2C_0); | |
55 | - if (ret) | |
56 | - return ret; | |
57 | - | |
58 | - return 0; | |
52 | + return pmic_init(I2C_0); | |
59 | 53 | } |
60 | 54 | |
61 | 55 | int dram_init(void) |
board/ti/omap5_uevm/evm.c