diff options
author | 2024-01-10 13:46:47 -0700 | |
---|---|---|
committer | 2024-01-15 18:35:07 -0500 | |
commit | d7643fe6fb76edb1f2f1497bf5e8b8f4774b5129 (patch) | |
tree | 70a3b626d7134562439c2446bdf7be3361a4bc9a /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | drm/amd/pm: Fix smuv13.0.6 current clock reporting (diff) | |
download | wireguard-linux-d7643fe6fb76edb1f2f1497bf5e8b8f4774b5129.tar.xz wireguard-linux-d7643fe6fb76edb1f2f1497bf5e8b8f4774b5129.zip |
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: 5f3bce13266e ("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>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions