Skip to content

Commit dc9a91d

Browse files
nathanchancethierryreding
authored andcommitted
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: 7b6f846 ("drm/tegra: Support sector layout on Tegra194") Link: ClangBuiltLinux#1351 Signed-off-by: Nathan Chancellor <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 5dea427 commit dc9a91d

File tree

1 file changed

+1
-1
lines changed
  • drivers/gpu/drm/tegra

1 file changed

+1
-1
lines changed

drivers/gpu/drm/tegra/hub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ static void tegra_shared_plane_atomic_update(struct drm_plane *plane,
510510
* dGPU sector layout.
511511
*/
512512
if (tegra_plane_state->tiling.sector_layout == TEGRA_BO_SECTOR_LAYOUT_GPU)
513-
base |= BIT(39);
513+
base |= BIT_ULL(39);
514514
#endif
515515

516516
tegra_plane_writel(p, tegra_plane_state->format, DC_WIN_COLOR_DEPTH);

0 commit comments

Comments
 (0)