]> www.infradead.org Git - users/jedix/linux-maple.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>
Thu, 15 Apr 2021 15:47:04 +0000 (17:47 +0200)
commitc79184a9c029dbbc0b37279c9cb7a6ac57461654
tree5d99e129589acdca893dc6b910fc0f55fe31328f
parent0265531f0897f890da3f9c2958707af099c7d974
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: 7b6f846785f4 ("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