aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinghao Chi2022-01-04 11:25:45 +0000
committerDamien Le Moal2022-01-14 15:17:16 +0900
commit9c2fd3fb43bdf2641093fe287d1944ec3c88eeda (patch)
treeeecec7903e290c2bc64abc71973f3556d19b7039
parent0561e514c944da874ccdfbe2922f71b4c333c7e1 (diff)
ata: pata_octeon_cf: remove redundant val variable
Return value from DIV_ROUND_UP() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Signed-off-by: CGEL ZTE <cgel.zte@gmail.com> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
-rw-r--r--drivers/ata/pata_octeon_cf.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
index df62e22b49a6..0912846bc1b0 100644
--- a/drivers/ata/pata_octeon_cf.c
+++ b/drivers/ata/pata_octeon_cf.c
@@ -73,16 +73,12 @@ MODULE_PARM_DESC(enable_dma,
*/
static unsigned int ns_to_tim_reg(unsigned int tim_mult, unsigned int nsecs)
{
- unsigned int val;
-
/*
* Compute # of eclock periods to get desired duration in
* nanoseconds.
*/
- val = DIV_ROUND_UP(nsecs * (octeon_get_io_clock_rate() / 1000000),
+ return DIV_ROUND_UP(nsecs * (octeon_get_io_clock_rate() / 1000000),
1000 * tim_mult);
-
- return val;
}
static void octeon_cf_set_boot_reg_cfg(int cs, unsigned int multiplier)