* [PATCH v2] drm/atmel-hlcdc: check stride values in the first plane
@ 2018-06-17 8:48 ` Stefan Agner
0 siblings, 0 replies; 9+ messages in thread
From: Stefan Agner @ 2018-06-17 8:48 UTC (permalink / raw)
To: Boris Brezillon
Cc: Stefan Agner, David Airlie, Nicolas Ferre, Alexandre Belloni,
dri-devel, linux-arm-kernel, linux-kernel
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>
---
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,
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2] drm/atmel-hlcdc: check stride values in the first plane
@ 2018-06-17 8:48 ` Stefan Agner
0 siblings, 0 replies; 9+ messages in thread
From: Stefan Agner @ 2018-06-17 8:48 UTC (permalink / raw)
To: linux-arm-kernel
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>
---
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,
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2] drm/atmel-hlcdc: check stride values in the first plane
@ 2018-06-17 8:48 ` Stefan Agner
0 siblings, 0 replies; 9+ messages in thread
From: Stefan Agner @ 2018-06-17 8:48 UTC (permalink / raw)
To: Boris Brezillon
Cc: Alexandre Belloni, David Airlie, Nicolas Ferre, dri-devel,
linux-kernel, linux-arm-kernel
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>
---
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,
--
2.17.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2] drm/atmel-hlcdc: check stride values in the first plane
2018-06-17 8:48 ` Stefan Agner
(?)
@ 2018-06-17 9:12 ` Boris Brezillon
-1 siblings, 0 replies; 9+ messages in thread
From: Boris Brezillon @ 2018-06-17 9:12 UTC (permalink / raw)
To: Stefan Agner
Cc: David Airlie, Nicolas Ferre, Alexandre Belloni, dri-devel,
linux-arm-kernel, linux-kernel
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>
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,
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2] drm/atmel-hlcdc: check stride values in the first plane
@ 2018-06-17 9:12 ` Boris Brezillon
0 siblings, 0 replies; 9+ messages in thread
From: Boris Brezillon @ 2018-06-17 9:12 UTC (permalink / raw)
To: linux-arm-kernel
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>
I'll add
Fixes: 1a396789f65a ("drm: add Atmel HLCDC Display Controller support")
Cc: stable at 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,
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] drm/atmel-hlcdc: check stride values in the first plane
@ 2018-06-17 9:12 ` Boris Brezillon
0 siblings, 0 replies; 9+ messages in thread
From: Boris Brezillon @ 2018-06-17 9:12 UTC (permalink / raw)
To: Stefan Agner
Cc: Alexandre Belloni, David Airlie, linux-kernel, dri-devel,
Nicolas Ferre, linux-arm-kernel
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>
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,
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] drm/atmel-hlcdc: check stride values in the first plane
2018-06-17 8:48 ` Stefan Agner
(?)
@ 2018-06-17 12:45 ` Boris Brezillon
-1 siblings, 0 replies; 9+ messages in thread
From: Boris Brezillon @ 2018-06-17 12:45 UTC (permalink / raw)
To: Stefan Agner
Cc: David Airlie, Nicolas Ferre, Alexandre Belloni, dri-devel,
linux-arm-kernel, linux-kernel
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,
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2] drm/atmel-hlcdc: check stride values in the first plane
@ 2018-06-17 12:45 ` Boris Brezillon
0 siblings, 0 replies; 9+ messages in thread
From: Boris Brezillon @ 2018-06-17 12:45 UTC (permalink / raw)
To: linux-arm-kernel
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,
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] drm/atmel-hlcdc: check stride values in the first plane
@ 2018-06-17 12:45 ` Boris Brezillon
0 siblings, 0 replies; 9+ messages in thread
From: Boris Brezillon @ 2018-06-17 12:45 UTC (permalink / raw)
To: Stefan Agner
Cc: Alexandre Belloni, David Airlie, linux-kernel, dri-devel,
Nicolas Ferre, linux-arm-kernel
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,
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-06-17 12:46 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-17 8:48 [PATCH v2] drm/atmel-hlcdc: check stride values in the first plane Stefan Agner
2018-06-17 8:48 ` Stefan Agner
2018-06-17 8:48 ` Stefan Agner
2018-06-17 9:12 ` Boris Brezillon
2018-06-17 9:12 ` Boris Brezillon
2018-06-17 9:12 ` Boris Brezillon
2018-06-17 12:45 ` Boris Brezillon
2018-06-17 12:45 ` Boris Brezillon
2018-06-17 12:45 ` Boris Brezillon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.