Skip to content

Commit 9c2fd3f

Browse files
Minghao ChiDamien Le Moal
authored andcommitted
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 <[email protected]> Signed-off-by: Minghao Chi <[email protected]> Signed-off-by: CGEL ZTE <[email protected]> Signed-off-by: Damien Le Moal <[email protected]>
1 parent 0561e51 commit 9c2fd3f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/ata/pata_octeon_cf.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,12 @@ MODULE_PARM_DESC(enable_dma,
7373
*/
7474
static unsigned int ns_to_tim_reg(unsigned int tim_mult, unsigned int nsecs)
7575
{
76-
unsigned int val;
77-
7876
/*
7977
* Compute # of eclock periods to get desired duration in
8078
* nanoseconds.
8179
*/
82-
val = DIV_ROUND_UP(nsecs * (octeon_get_io_clock_rate() / 1000000),
80+
return DIV_ROUND_UP(nsecs * (octeon_get_io_clock_rate() / 1000000),
8381
1000 * tim_mult);
84-
85-
return val;
8682
}
8783

8884
static void octeon_cf_set_boot_reg_cfg(int cs, unsigned int multiplier)

0 commit comments

Comments
 (0)