diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-09-06 22:17:39 +0900 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-09-23 17:53:54 -0400 |
commit | a4ca3799c2edf2b805f804a07d234a9e5eaae60f (patch) | |
tree | db22263ba5173bafedd9cca35307e1d99ef96df2 /drivers/ddr | |
parent | 63a7578e4e7dc906e75b0bec5a2f3fe41c3720f4 (diff) | |
download | u-boot-a4ca3799c2edf2b805f804a07d234a9e5eaae60f.tar.gz |
drivers: squash lines for immediate return
Remove unneeded variables and assignments.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'drivers/ddr')
-rw-r--r-- | drivers/ddr/fsl/ddr1_dimm_params.c | 12 | ||||
-rw-r--r-- | drivers/ddr/fsl/ddr2_dimm_params.c | 12 | ||||
-rw-r--r-- | drivers/ddr/marvell/a38x/ddr3_a38x.c | 6 |
3 files changed, 5 insertions, 25 deletions
diff --git a/drivers/ddr/fsl/ddr1_dimm_params.c b/drivers/ddr/fsl/ddr1_dimm_params.c index 00cdc22408..369b325ff2 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 59baf6b7a1..af752cc96c 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 f4699076e8..c082122f25 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) |