Steven Price
3082f8705e
pwm: tegra: Fix 32 bit build
...
[ Upstream commit dd1f1da4ad ]
The value of NSEC_PER_SEC << PWM_DUTY_WIDTH doesn't fix within a 32 bit
integer causing a build warning/error (and the value truncated):
drivers/pwm/pwm-tegra.c: In function ‘tegra_pwm_config’:
drivers/pwm/pwm-tegra.c:148:53: error: result of ‘1000000000 << 8’ requires 39 bits to represent, but ‘long int’ only has 32 bits [-Werror=shift-overflow=]
148 | required_clk_rate = DIV_ROUND_UP_ULL(NSEC_PER_SEC << PWM_DUTY_WIDTH,
| ^~
Explicitly cast to a u64 to ensure the correct result.
Fixes: cfcb68817fb3 ("pwm: tegra: Improve required rate calculation")
Signed-off-by: Steven Price <steven.price@arm.com >
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Reviewed-by: Jon Hunter <jonathanh@nvidia.com >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2022-12-31 13:14:48 +01:00
..
2022-11-26 09:24:44 +01:00
2022-12-31 13:14:40 +01:00
2021-11-06 14:13:31 +01:00
2022-12-02 17:41:00 +01:00
2022-12-31 13:14:06 +01:00
2022-08-25 11:40:15 +02:00
2022-03-08 19:12:47 +01:00
2022-12-31 13:14:27 +01:00
2022-12-31 13:14:47 +01:00
2022-12-31 13:14:20 +01:00
2022-12-02 17:41:08 +01:00
2022-12-31 13:14:41 +01:00
2022-12-31 13:14:43 +01:00
2022-12-31 13:14:04 +01:00
2022-06-22 14:22:03 +02:00
2022-12-31 13:14:30 +01:00
2022-12-31 13:14:03 +01:00
2022-12-31 13:14:01 +01:00
2022-12-31 13:14:43 +01:00
2022-07-12 16:34:58 +02:00
2022-09-28 11:11:57 +02:00
2022-07-07 17:53:27 +02:00
2022-12-31 13:14:27 +01:00
2022-11-16 09:58:30 +01:00
2022-12-02 17:41:06 +01:00
2022-12-31 13:14:03 +01:00
2022-12-31 13:14:48 +01:00
2022-05-12 12:30:05 +02:00
2022-12-31 13:14:29 +01:00
2022-10-26 12:35:07 +02:00
2022-10-26 12:35:17 +02:00
2022-12-31 13:14:31 +01:00
2022-12-31 13:14:45 +01:00
2022-04-08 14:22:50 +02:00
2022-12-31 13:14:46 +01:00
2022-12-31 13:14:32 +01:00
2022-12-31 13:14:39 +01:00
2022-12-31 13:14:44 +01:00
2022-11-16 09:58:13 +01:00
2022-12-31 13:14:30 +01:00
2022-12-31 13:14:31 +01:00
2022-03-08 19:12:37 +01:00
2022-07-23 12:54:04 +02:00
2022-12-31 13:14:47 +01:00
2022-12-31 13:14:33 +01:00
2022-12-31 13:14:14 +01:00
2022-08-17 14:23:53 +02:00
2022-12-31 13:14:35 +01:00
2021-09-27 17:38:49 +02:00
2022-12-31 13:14:03 +01:00
2022-12-31 13:14:37 +01:00
2022-10-26 12:34:39 +02:00
2022-12-31 13:14:35 +01:00
2022-12-31 13:14:39 +01:00
2022-12-31 13:14:30 +01:00
2022-12-31 13:14:42 +01:00
2022-12-31 13:14:47 +01:00
2022-10-26 12:34:58 +02:00
2022-12-31 13:14:17 +01:00
2022-12-31 13:14:48 +01:00
2022-12-31 13:14:35 +01:00
2022-12-31 13:14:43 +01:00
2021-11-18 19:16:08 +01:00
2022-12-31 13:14:12 +01:00
2022-12-31 13:14:47 +01:00
2022-12-31 13:14:37 +01:00
2022-08-25 11:40:14 +02:00
2022-07-07 17:53:24 +02:00
2022-12-31 13:14:10 +01:00
2022-12-08 11:28:39 +01:00
2022-12-31 13:14:19 +01:00
2022-08-17 14:24:01 +02:00
2022-11-10 18:15:40 +01:00
2022-11-26 09:24:36 +01:00
2022-12-31 13:14:24 +01:00
2022-06-14 18:36:02 +02:00
2022-12-31 13:13:58 +01:00
2022-12-31 13:14:33 +01:00
2022-12-31 13:14:12 +01:00
2022-12-31 13:14:05 +01:00
2022-12-31 13:14:02 +01:00
2022-12-31 13:14:33 +01:00
2022-10-26 12:35:30 +02:00
2022-04-08 14:23:44 +02:00
2022-04-13 20:59:01 +02:00
2022-12-31 13:14:48 +01:00
2022-12-31 13:14:05 +01:00
2022-12-31 13:14:47 +01:00
2022-12-31 13:14:36 +01:00
2022-10-05 10:39:40 +02:00
2022-10-12 09:53:28 +02:00
2022-12-31 13:14:38 +01:00
2022-12-31 13:14:41 +01:00
2022-12-31 13:14:47 +01:00
2021-11-25 09:48:31 +01:00
2022-11-26 09:24:36 +01:00
2022-11-26 09:24:44 +01:00
2022-12-31 13:14:38 +01:00
2022-12-14 11:37:19 +01:00
2022-12-31 13:14:18 +01:00
2022-10-26 12:35:19 +02:00
2022-12-31 13:14:30 +01:00
2022-11-26 09:24:49 +01:00
2022-12-02 17:41:03 +01:00
2022-12-31 13:14:31 +01:00
2022-11-16 09:58:13 +01:00
2022-12-31 13:14:28 +01:00
2022-12-31 13:14:27 +01:00
2022-12-31 13:14:46 +01:00
2022-10-05 10:39:43 +02:00
2022-12-31 13:14:27 +01:00
2022-10-26 12:34:47 +02:00
2022-12-31 13:14:47 +01:00
2022-08-25 11:40:33 +02:00
2022-07-21 21:24:33 +02:00
2022-12-31 13:14:30 +01:00
2022-04-13 20:59:11 +02:00
2022-08-17 14:24:11 +02:00
2022-12-31 13:14:04 +01:00
2021-10-07 16:51:26 +02:00
2021-12-22 09:32:39 +01:00