summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/sh-sci.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2022-02-21 17:29:25 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-21 19:48:01 +0100
commit81ddb200f63604a3df21ad82584c62dab8fb0300 (patch)
treec896c91121b9207b834e63a2a616a8d5c9551fef /drivers/tty/serial/sh-sci.c
parentaab68e959b37eddfe6b1640636457e960f66db2c (diff)
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>
Diffstat (limited to 'drivers/tty/serial/sh-sci.c')
-rw-r--r--drivers/tty/serial/sh-sci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 968967d722d4..77d76973858f 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2293,7 +2293,7 @@ static int sci_scbrr_calc(struct sci_port *s, unsigned int bps,
for_each_sr(sr, s) {
for (c = 0; c <= 3; c++) {
/* integerized formulas from HSCIF documentation */
- prediv = sr * (1 << (2 * c + 1));
+ prediv = sr << (2 * c + 1);
/*
* We need to calculate: