mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-02 03:03:00 +09:00
drm/atmel-hlcdc: check stride values in the first plane
commit9fcf2b3c1cupstream. 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:1a396789f6("drm: add Atmel HLCDC Display Controller support") Cc: <stable@vger.kernel.org> Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180617084826.31885-1-stefan@agner.ch Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7d0ed747bc
commit
af597bb613
@@ -889,7 +889,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,
|
||||
|
||||
Reference in New Issue
Block a user