serial: sh-sci: Simplify multiplication/shift logic
"a * (1 << b)" == "a << b". No change in generated code. Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/118d62e167f6cf5e98bdf9a738634b4590ea8d09.1645460901.git.geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
aab68e959b
commit
81ddb200f6
@@ -2293,7 +2293,7 @@ static int sci_scbrr_calc(struct sci_port *s, unsigned int bps,
|
|||||||
for_each_sr(sr, s) {
|
for_each_sr(sr, s) {
|
||||||
for (c = 0; c <= 3; c++) {
|
for (c = 0; c <= 3; c++) {
|
||||||
/* integerized formulas from HSCIF documentation */
|
/* integerized formulas from HSCIF documentation */
|
||||||
prediv = sr * (1 << (2 * c + 1));
|
prediv = sr << (2 * c + 1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We need to calculate:
|
* We need to calculate:
|
||||||
|
|||||||
Reference in New Issue
Block a user