]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pwm: rcar: Simplify multiplication/shift logic
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 21 Feb 2022 16:28:16 +0000 (17:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:43:58 +0000 (07:43 +0200)
commitdc12f37acbc36995cf51df2e07b1b0a647f9f34a
treefb76207f50f9b04f3cf0a5712fc79e66e148ca5c
parente3cf0c38d3ce754ad63005102fcfeb0b7ff3290b
pwm: rcar: Simplify multiplication/shift logic

[ Upstream commit ed14d36498c8d15be098df4af9ca324f96e9de74 ]

- Remove the superfluous cast; the multiplication will yield a 64-bit
    result due to the "100ULL" anyway,
  - "a * (1 << b)" == "a << b".

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Stable-dep-of: e7327c193014 ("pwm: rcar: Improve register calculation")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pwm/pwm-rcar.c