Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c24ca5be authored by Nicolas Pitre's avatar Nicolas Pitre
Browse files

drm/mgag200/mgag200_mode.c: fix wrong do_div() usage



do_div() is meant to be used with an unsigned dividend.

Signed-off-by: default avatarNicolas Pitre <nico@linaro.org>
parent 8d43b49e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1564,7 +1564,7 @@ static uint32_t mga_vga_calculate_mode_bandwidth(struct drm_display_mode *mode,
							int bits_per_pixel)
{
	uint32_t total_area, divisor;
	int64_t active_area, pixels_per_second, bandwidth;
	uint64_t active_area, pixels_per_second, bandwidth;
	uint64_t bytes_per_pixel = (bits_per_pixel + 7) / 8;

	divisor = 1024;