Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Minghao Chi and committed by
Damien Le Moal
9c2fd3fb 0561e514

+1 -5
+1 -5
drivers/ata/pata_octeon_cf.c
··· 73 73 */ 74 74 static unsigned int ns_to_tim_reg(unsigned int tim_mult, unsigned int nsecs) 75 75 { 76 - unsigned int val; 77 - 78 76 /* 79 77 * Compute # of eclock periods to get desired duration in 80 78 * nanoseconds. 81 79 */ 82 - val = DIV_ROUND_UP(nsecs * (octeon_get_io_clock_rate() / 1000000), 80 + return DIV_ROUND_UP(nsecs * (octeon_get_io_clock_rate() / 1000000), 83 81 1000 * tim_mult); 84 - 85 - return val; 86 82 } 87 83 88 84 static void octeon_cf_set_boot_reg_cfg(int cs, unsigned int multiplier)