Skip to contentSkip to conversation

FAILED: patch "[PATCH] drm/atmel-hlcdc: check stride values in the first plane" failed to apply to 4.4-stable tree

PATCH [email protected] 1 participant 1 message Jul 5, 2018

Subsystems (5)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From 9fcf2b3c1c0276650fea537c71b513d27d929b05 Mon Sep 17 00:00:00 2001

From: Stefan Agner <[email protected]>
Date: Sun, 17 Jun 2018 10:48:22 +0200
Subject: [PATCH] drm/atmel-hlcdc: check stride values in the first plane

The statement always evaluates to true since the struct fields are arrays. This has shown up as a warning when compiling with clang:
warning: address of array 'desc->layout.xstride' will always
evaluate to 'true' [-Wpointer-bool-conversion]

Check for values in the first plane instead.

Fixes 1a396789f65a ("drm: add Atmel HLCDC Display Controller support")
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +1 -1
index e18800ed7cd1..7b8191eae68a 100644
@@ -875,7 +875,7 @@ static int atmel_hlcdc_plane_init_properties(struct atmel_hlcdc_plane *plane,
 		drm_object_attach_property(&plane->base.base,
 					   props->alpha, 255);
 
-	if (desc->layout.xstride && desc->layout.pstride) {
+	if (desc->layout.xstride[0] && desc->layout.pstride[0]) {
 		int ret;
 
 		ret = drm_plane_create_rotation_property(&plane->base,