From: boris.brezillon@bootlin.com (Boris Brezillon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] drm/atmel-hlcdc: check stride values in the first plane
Date: Sun, 17 Jun 2018 14:45:52 +0200 [thread overview]
Message-ID: <20180617144552.129ce2a0@bbrezillon> (raw)
In-Reply-To: <20180617084826.31885-1-stefan@agner.ch>
On Sun, 17 Jun 2018 10:48:22 +0200
Stefan Agner <stefan@agner.ch> 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 <stefan@agner.ch>
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,
prev parent reply other threads:[~2018-06-17 12:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-17 8:48 [PATCH v2] drm/atmel-hlcdc: check stride values in the first plane Stefan Agner
2018-06-17 9:12 ` Boris Brezillon
2018-06-17 12:45 ` Boris Brezillon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180617144552.129ce2a0@bbrezillon \
--to=boris.brezillon@bootlin.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).