Nathan Chancellor
d7643fe6fb
drm/amd/display: Avoid enum conversion warning
...
Clang warns (or errors with CONFIG_WERROR=y) when performing arithmetic
with different enumerated types, which is usually a bug:
drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_dpia_bw.c:548:24: error: arithmetic between different enumeration types ('const enum dc_link_rate' and 'const enum dc_lane_count') [-Werror,-Wenum-enum-conversion]
548 | link_cap->link_rate * link_cap->lane_count * LINK_RATE_REF_FREQ_IN_KHZ * 8;
| ~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~
1 error generated.
In this case, there is not a problem because the enumerated types are
basically treated as '#define' values. Add an explicit cast to an
integral type to silence the warning.
Closes: https://github.com/ClangBuiltLinux/linux/issues/1976
Fixes: 5f3bce1326 ("drm/amd/display: Request usb4 bw for mst streams")
Signed-off-by: Nathan Chancellor <nathan@kernel.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-01-15 18:35:07 -05:00
..
2024-01-15 18:35:07 -05:00
2023-12-13 15:09:53 -05:00
2023-11-27 13:56:32 -06:00
2023-11-27 13:56:32 -06:00
2023-11-28 16:17:08 +01:00
2023-09-21 10:41:04 -07:00
2023-12-22 14:36:03 +10:00
2023-12-20 07:54:03 +10:00
2023-11-23 20:25:24 +01:00
2023-11-21 09:17:54 +01:00
2023-12-12 13:06:38 +09:00
2023-09-21 10:41:04 -07:00
2023-09-27 12:38:54 +02:00
2023-11-15 10:56:44 +01:00
2023-09-21 10:54:20 -07:00
2023-11-03 15:44:25 -10:00
2023-07-17 15:37:57 +02:00
2023-12-20 08:32:55 +10:00
2024-01-05 10:31:54 +10:00
2023-12-01 16:04:14 +01:00
2023-09-13 11:12:20 -07:00
2023-11-21 09:18:52 +01:00
2023-11-10 02:54:29 +01:00
2023-11-10 16:57:49 +01:00
2023-12-06 10:36:01 +01:00
2023-09-21 10:41:04 -07:00
2023-12-20 08:32:38 +10:00
2023-11-21 09:18:53 +01:00
2023-09-21 10:51:55 -07:00
2023-12-14 09:27:46 +02:00
2023-11-27 13:56:32 -06:00
2023-12-20 07:54:03 +10:00
2023-12-01 12:04:28 +02:00
2023-12-19 17:07:32 +10:00
2023-12-12 11:32:33 +10:00
2023-09-21 10:51:55 -07:00
2023-12-04 09:42:32 +01:00
2023-12-14 15:28:53 -05:00
2023-12-06 10:36:06 +01:00
2023-12-25 00:50:33 +01:00
2023-11-28 14:16:56 -05:00
2023-12-06 10:36:10 +01:00
2023-11-21 09:18:53 +01:00
2023-09-21 10:41:04 -07:00
2023-09-21 10:51:55 -07:00
2023-09-29 08:27:15 +10:00
2023-11-09 16:47:31 +02:00
2023-12-10 10:38:47 -08:00
2023-12-01 12:04:43 +02:00
2023-11-28 21:57:16 +02:00
2023-12-06 10:36:18 +01:00
2023-11-27 10:58:36 +01:00
2023-09-21 10:51:55 -07:00
2023-12-06 10:35:49 +01:00
2023-12-04 21:30:33 -01:00
2023-11-24 11:58:00 +01:00
2023-12-13 16:19:01 +01:00
2023-11-24 15:15:27 +01:00
2023-12-08 10:24:30 +01:00
2023-11-24 15:15:28 +01:00
2023-12-26 12:53:26 -05:00
2023-07-21 09:12:43 +02:00
2023-12-06 10:36:21 +01:00
2023-12-19 17:07:32 +10:00
2023-12-13 15:09:53 -05:00
2023-12-13 15:09:53 -05:00
2023-12-13 15:09:53 -05:00
2023-12-06 10:08:28 +01:00
2023-12-04 21:33:10 +02:00
2023-12-03 20:22:02 +02:00
2023-12-04 16:07:29 +02:00
2023-09-29 08:27:15 +10:00
2023-07-13 15:55:58 +02:00
2023-11-15 13:51:38 +01:00
2023-10-27 16:01:10 +02:00
2023-12-06 10:35:49 +01:00
2023-12-04 21:33:07 +02:00
2023-11-24 15:15:25 +01:00
2023-12-07 12:29:17 +02:00
2023-12-06 10:08:28 +01:00
2023-11-21 12:22:48 +02:00
2023-11-15 10:56:44 +01:00
2023-11-09 16:48:27 +02:00
2023-12-04 16:07:29 +02:00
2023-12-10 10:38:47 -08:00
2023-07-25 19:21:03 +02:00
2023-07-31 20:07:18 +02:00
2023-07-31 20:07:24 +02:00
2023-12-07 09:21:43 +02:00
2023-11-14 10:23:11 +01:00
2023-11-14 10:16:53 +01:00
2023-10-24 21:34:35 +02:00
2023-12-23 07:31:29 +02:00
2023-11-14 10:01:14 +01:00
2023-07-28 11:46:02 +02:00
2023-08-24 07:26:06 +10:00
2023-10-12 10:44:06 +02:00
2023-12-20 07:54:03 +10:00
2023-12-06 10:08:37 +01:00
2023-12-06 10:08:32 +01:00
2023-12-06 10:08:32 +01:00
2023-11-21 12:22:48 +02:00
2023-10-09 16:59:49 +10:00
2023-07-24 15:44:47 +02:00
2023-11-14 10:16:53 +01:00
2023-12-07 09:22:47 +02:00
2023-09-01 08:53:05 +02:00
2023-11-23 17:12:38 +01:00
2023-11-15 16:57:08 +01:00
2023-08-01 07:38:13 -07:00
2023-12-06 10:08:37 +01:00
2023-12-06 10:35:49 +01:00
2023-12-23 07:31:05 +02:00
2023-11-30 14:46:04 -05:00
2023-08-23 17:14:37 -04:00
2023-12-13 15:09:53 -05:00
2023-12-02 01:17:45 +02:00
2023-09-15 14:46:42 +03:00
2023-10-03 16:01:03 +03:00
2023-12-06 10:08:28 +01:00
2023-12-12 14:05:48 -05:00
2023-12-12 14:05:48 -05:00