Skip to contentSkip to conversation

drm/virtgpu: remove redundant assignments to width and height

PATCH In review Colin King 2 participants 2 messages Jul 1, 2020 – Aug 17, 2020

Subsystems (5)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 drm/virtgpu: remove redundant assignments to width and height

From: Colin Ian King <[email protected]>

Variables width and height are being assigned values that are never read. The assignments are redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 drivers/gpu/drm/virtio/virtgpu_display.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/virtio/virtgpu_display.c +0 -2
index f3ce49c5a34c..bf80d8c23da7 100644
@@ -165,8 +165,6 @@ static int virtio_gpu_conn_get_modes(struct drm_connector *connector)
 	count = drm_add_modes_noedid(connector, XRES_MAX, YRES_MAX);
 
 	if (width = 0 || height = 0) {
-		width = XRES_DEF;
-		height = YRES_DEF;
 		drm_set_preferred_mode(connector, XRES_DEF, YRES_DEF);
 	} else {
 		DRM_DEBUG("add mode: %dx%d\n", width, height);
Signature · 1 line
2.27.0