From: Ulrich Hecht <uli@fpond.eu>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Ulrich Hecht <uli+renesas@fpond.eu>
Cc: linux-serial@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] serial: sh-sci: Simplify multiplication/shift logic
Date: Mon, 21 Feb 2022 17:50:42 +0100 (CET) [thread overview]
Message-ID: <312332855.472251.1645462242686@webmail.strato.com> (raw)
In-Reply-To: <118d62e167f6cf5e98bdf9a738634b4590ea8d09.1645460901.git.geert+renesas@glider.be>
> On 02/21/2022 5:29 PM Geert Uytterhoeven <geert+renesas@glider.be> wrote:
>
>
> "a * (1 << b)" == "a << b".
>
> No change in generated code.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> drivers/tty/serial/sh-sci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
> index 968967d722d494c2..77d76973858f7d7f 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:
> --
> 2.25.1
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
CU
Uli
next prev parent reply other threads:[~2022-02-21 16:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-21 16:29 [PATCH] serial: sh-sci: Simplify multiplication/shift logic Geert Uytterhoeven
2022-02-21 16:50 ` Ulrich Hecht [this message]
2022-03-01 14:50 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=312332855.472251.1645462242686@webmail.strato.com \
--to=uli@fpond.eu \
--cc=geert+renesas@glider.be \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=uli+renesas@fpond.eu \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox