Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2847515imm; Sun, 17 Jun 2018 05:46:50 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLuIck0B061NmO7VQDUzs58ec4XX7nN07TSRhimS6T8YAuLvIeJDqAE1ZcsRIv1paf84VGo X-Received: by 2002:a17:902:ac1:: with SMTP id 59-v6mr9770788plp.36.1529239610940; Sun, 17 Jun 2018 05:46:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529239610; cv=none; d=google.com; s=arc-20160816; b=W2/3F2R885o6VFvOypEUf4dk7ipdba5f58LZE9GV4RuI7NMg1izjAtoHe8HXx7YYqk i3ErGo9900ObEi0wNsqbaY0o1MiqZGLkER/4wdYiVh28Vwax9YKGBbKfU/TKNyOLl2qt m0rpulccoVpFBPOPd5oEVfGtdOkFcvZRITOIddLZsgFNoo7IJcy3JPQWHE6Kua6IyKAl itA9kD+UfzV0cq0u/NtSI8UOWBk5yITigQcvoSuHmjVhkwo8W33hEN70hzEHtL26yiwF 6CBNgG+LJHURed75riOY7pw2Qtvu46F/liwLPMAFO5ga8C7MvoD97ZtHib7J+swN3oTQ IzGQ== 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=mQF1Pno1/FJG9xhTQGbJV81f+T6vxt6lojPcXZWM+DU=; b=Lm5gslCh9at0oAQtV/prWydrjUYi5bS7gT9KE0aC5ABVqldw8U+TH+sZRrsmCCXUok Pbnq5EMtUHzz6NlbVCM2UbijIwAW3fN+ZhFciErXnzhgJLuC4y78nxK+07X9t0wUzZTk HodcgiALLffmKARr9ncIed9EgFlSRfCavazd/qKKpaT2mu/H0CM7f+4gAbjoWuwQPZLa tcGzmBUdqnIIoHM1ZwUgg4o2PRwjfM4haXIU3KlY/ebjt+GMve8jXK+yfTUZ37NkdjZF kNu8fEKIA4wk0WVzha5NqLJQGsUJuTdsU092qAx1DdAd55kwpCTlyidjV+1uhquOakBo IXaQ== 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 q62-v6si10433415pga.217.2018.06.17.05.46.35; Sun, 17 Jun 2018 05:46:50 -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 S933432AbeFQMqG (ORCPT + 99 others); Sun, 17 Jun 2018 08:46:06 -0400 Received: from mail.bootlin.com ([62.4.15.54]:40603 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933241AbeFQMqE (ORCPT ); Sun, 17 Jun 2018 08:46:04 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 5C8F2207A5; Sun, 17 Jun 2018 14:46:02 +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 (91-160-177-164.subs.proxad.net [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id 1360E20766; Sun, 17 Jun 2018 14:46:02 +0200 (CEST) Date: Sun, 17 Jun 2018 14:45:52 +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: <20180617144552.129ce2a0@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 Applied to drm-misc-fixes. 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,