Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2699498imm; Sun, 17 Jun 2018 02:13:42 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJPG36kZK/7gRcZyLIdczRBuBYfubWXUTt7UUFpXiVVwWCdMzZgMqOKBV+wwzhpjFMSntzx X-Received: by 2002:a17:902:bc44:: with SMTP id t4-v6mr9315545plz.139.1529226822927; Sun, 17 Jun 2018 02:13:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529226822; cv=none; d=google.com; s=arc-20160816; b=Z5SPJ4qlreno9Wo6GLdSSNeJKRrd8GJ3sregV+czRaiEbaoqaFh1IDdHN5QLLwaVA0 gv47kPn+SAgUrq1BjnXd51BMPr0nkYlF0PyU8NjxyTl0wGKhtl7AOsYAtbA5TzA/xuEC q2pnmcHEKPEgxUasgh98ty9mTS6dTitOS6pUX5erj9Ew1DS8BEbdhnr12JO/At0fLlPB a0JL1PLmv0JMBodqH70ByzL1WclW7IiTDQJipSz9v4B0ffRSNLU/TS58o+HTn/U329Bh LBQkruRhIrKGBHQUzE2fOeW7YPHxfq8URvkhi0z8S9cFxpV7hXmRt6MR699PIFj071vn QyKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=xPA/2lHgdc88FJQSp8yyyk4FJmM99oM3DPbtzaaZpBA=; b=k8A2UsfCMT6pJaGd5F2KcVcP2jB+OfQsWOphCakbVj3JU6p57A50AlUe3s6o0x2OVM rDcXvcnTYhmh5EKKr4bchEROJOb8MTuJmlUiXm8qjlXj3ocJUsnd1fWwVZngra0M2ZwO GdRnG2ObugUIzNkVUyWzF+CKGAo1gZy2NbLucWaNb0ZCZTwrZhfJ/w2VtmaLMMIWmX0V 8zJ/ZZSgb77v10+I1puhzevvMI2hnpq8HEgLzDqtTgnhUlc63DZJ1Y3LtRrorrilifP4 QlP2Q0QbfXodxhLHmxYhjebTAvblDZeHHwN9y7BApQs8xSlSXYOgiVTwGE32BuYJYIpz 1ngw== 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 z16-v6si11849359pfj.337.2018.06.17.02.13.26; Sun, 17 Jun 2018 02:13:42 -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 S933042AbeFQJNC (ORCPT + 99 others); Sun, 17 Jun 2018 05:13:02 -0400 Received: from mail.bootlin.com ([62.4.15.54]:38692 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932672AbeFQJNB (ORCPT ); Sun, 17 Jun 2018 05:13:01 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 11398206D8; Sun, 17 Jun 2018 11:13:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (unknown [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id CB934203EB; Sun, 17 Jun 2018 11:12:59 +0200 (CEST) Date: Sun, 17 Jun 2018 11:12:59 +0200 From: Boris Brezillon To: Stefan Agner Cc: David Airlie , Nicolas Ferre , Alexandre Belloni , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] drm/atmel-hlcdc: check stride values in the first plane Message-ID: <20180617111259.556378e1@bbrezillon> In-Reply-To: <20180617084826.31885-1-stefan@agner.ch> References: <20180617084826.31885-1-stefan@agner.ch> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 17 Jun 2018 10:48:22 +0200 Stefan Agner wrote: > 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. > > Signed-off-by: Stefan Agner I'll add Fixes: 1a396789f65a ("drm: add Atmel HLCDC Display Controller support") Cc: stable@vger.kernel.org when applying. Thanks, Boris > --- > Changes in v2: > - Check for first value instead of dropping if statement > (subject was: drm/atmel-hlcdc: remove unnecessary if statement) > > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c > index 73c875db45f4..47e0992f3908 100644 > --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c > +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c > @@ -839,7 +839,7 @@ static int atmel_hlcdc_plane_init_properties(struct atmel_hlcdc_plane *plane) > return ret; > } > > - 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,