Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1418815imm; Thu, 5 Jul 2018 23:03:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpesZ8sfDhutJJf+iw7y7pYtHOXNNwGkkDZCCGpy51NuO97z7v3mt3yhUJVNEnDbQxfgPRzh X-Received: by 2002:a62:4308:: with SMTP id q8-v6mr9484004pfa.86.1530857014035; Thu, 05 Jul 2018 23:03:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530857014; cv=none; d=google.com; s=arc-20160816; b=ifQ9cL4qwdh8gORX+xttaO/klBtFpi2u3qwbdgkYeTx8x5NDxZdrTGTzK0WDw8FcUn XUKjQ+meNyhINUs3Nrwf/70VDsIaQ0AIjJDdVIICn00Ud8VPlGdVMFjBoNBjdLTHlfLr Uhwtye8ieJanEov6iinWrzKdDrAsBX9GV3UoZ7bzwHM7GpovPNZe8KV1QvhsGqCfAlFc OeQXi6WK0nuJ/kQbqRBHVA/eSVAxoMJBgu5ylWMpMbjWYrYBo3v9KDAd+hqe0TiTCSQe 2c7lW0cAQ1+3dwucihoa7ASa7999ebgqjj/lII7OnAqJg4+6HDpBJv7xk4XGUEdxaXn2 1zXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=xONzu2vDvsw9qQKzEl1uCvZFLG0AtXKh3MnPUO+Seqo=; b=YmINnJ6liarOWIWmcGT9N9KZgRbKSt025Q6YYogt88wvXj0KtOszYrBFSwdesThYGZ bbsjZnhsEVtXjgyl5qNUUfHjhkAWNszPkMzDOMdAzmyAqdJMFslFuySkzy6Te9Lud+6k yhsPHcCuvvU0inrwA5hbTWdYgV7xjY6NJP7akjjfxl+7J15TKSQn4D9BLEVKShDnymMO lbqlFDkXtk3ApHxEXS1BNVlnz4+fgV2dF7wXDVp5UzKX5M5e5YTyibEpQiHNhJCM81qh i6exPqU8jwdGw4n+nBJxi4uvhPkAQNMaTWSCBubkNsGzd6ETH5TYRD/FbvtexXEaCVNd mEzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g65-v6si7876936pfc.36.2018.07.05.23.03.19; Thu, 05 Jul 2018 23:03:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933879AbeGFFua (ORCPT + 99 others); Fri, 6 Jul 2018 01:50:30 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60516 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933849AbeGFFuU (ORCPT ); Fri, 6 Jul 2018 01:50:20 -0400 Received: from localhost (D57D388D.static.ziggozakelijk.nl [213.125.56.141]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7504FBA2; Fri, 6 Jul 2018 05:50:19 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Agner , Boris Brezillon Subject: [PATCH 4.14 19/61] drm/atmel-hlcdc: check stride values in the first plane Date: Fri, 6 Jul 2018 07:46:43 +0200 Message-Id: <20180706054713.080218768@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180706054712.332416244@linuxfoundation.org> References: <20180706054712.332416244@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Stefan Agner commit 9fcf2b3c1c0276650fea537c71b513d27d929b05 upstream. 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") Cc: Signed-off-by: Stefan Agner Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20180617084826.31885-1-stefan@agner.ch Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c @@ -889,7 +889,7 @@ static int atmel_hlcdc_plane_init_proper 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,