Skip to contentSkip to conversation

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

PATCH New Nicolas Pitre 1 participant 1 message Nov 4, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

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

drivers/gpu/drm/mgag200/mgag200_mode.c +1 -1
index c99d3fe128..1d4c480f5c 100644
@@ -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;

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel