]> git.baikalelectronics.ru Git - kernel.git/commit
drm/tegra: Fix shift overflow in tegra_shared_plane_atomic_update
authorNathan Chancellor <nathan@kernel.org>
Thu, 15 Apr 2021 15:29:14 +0000 (08:29 -0700)
committerThierry Reding <treding@nvidia.com>
Mon, 17 May 2021 10:31:05 +0000 (12:31 +0200)
commitfb01e087940b5ca861211a29e59349478fe43948
tree3540f33295a13adec5a3cb99ba12e95dcff27ba4
parent169acab0b2cb7c10b2146d4d0be197c7d749de2a
drm/tegra: Fix shift overflow in tegra_shared_plane_atomic_update

Clang warns:

drivers/gpu/drm/tegra/hub.c:513:11: warning: shift count >= width of
type [-Wshift-count-overflow]
                base |= BIT(39);
                        ^~~~~~~

BIT is unsigned long, which is 32-bit on ARCH=arm, hence the overflow
warning. Switch to BIT_ULL, which is 64-bit and will not overflow.

Fixes: a78de6424f5e ("drm/tegra: Support sector layout on Tegra194")
Link: https://github.com/ClangBuiltLinux/linux/issues/1351
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/hub.c