2018-09-28 10:31:07

by Yue Haibing

[permalink] [raw]
Subject: [PATCH -next] drm/stm: ltdc: remove set but not used variable 'src_h'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/stm/ltdc.c: In function 'ltdc_plane_atomic_check':
drivers/gpu/drm/stm/ltdc.c:694:13: warning:
variable 'src_y' set but not used [-Wunused-but-set-variable]
u32 src_x, src_y, src_w, src_h;
^
^
drivers/gpu/drm/stm/ltdc.c:694:6: warning:
variable 'src_x' set but not used [-Wunused-but-set-variable]
u32 src_x, src_y, src_w, src_h;
^

Signed-off-by: YueHaibing <[email protected]>
---
drivers/gpu/drm/stm/ltdc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 61dd661..a91e041 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -691,7 +691,7 @@ static int ltdc_plane_atomic_check(struct drm_plane *plane,
struct drm_plane_state *state)
{
struct drm_framebuffer *fb = state->fb;
- u32 src_x, src_y, src_w, src_h;
+ u32 src_w, src_h;

DRM_DEBUG_DRIVER("\n");

@@ -699,8 +699,6 @@ static int ltdc_plane_atomic_check(struct drm_plane *plane,
return 0;

/* convert src_ from 16:16 format */
- src_x = state->src_x >> 16;
- src_y = state->src_y >> 16;
src_w = state->src_w >> 16;
src_h = state->src_h >> 16;






2019-01-21 08:23:38

by Yue Haibing

[permalink] [raw]
Subject: [PATCH -next] drm/stm: ltdc: remove set but not used variable 'src_h'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/stm/ltdc.c: In function 'ltdc_plane_atomic_check':
drivers/gpu/drm/stm/ltdc.c:694:13: warning:
variable 'src_y' set but not used [-Wunused-but-set-variable]
u32 src_x, src_y, src_w, src_h;
^
^
drivers/gpu/drm/stm/ltdc.c:694:6: warning:
variable 'src_x' set but not used [-Wunused-but-set-variable]
u32 src_x, src_y, src_w, src_h;
^

Signed-off-by: YueHaibing <[email protected]>
---
drivers/gpu/drm/stm/ltdc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 61dd661..a91e041 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -691,7 +691,7 @@ static int ltdc_plane_atomic_check(struct drm_plane *plane,
struct drm_plane_state *state)
{
struct drm_framebuffer *fb = state->fb;
- u32 src_x, src_y, src_w, src_h;
+ u32 src_w, src_h;

DRM_DEBUG_DRIVER("\n");

@@ -699,8 +699,6 @@ static int ltdc_plane_atomic_check(struct drm_plane *plane,
return 0;

/* convert src_ from 16:16 format */
- src_x = state->src_x >> 16;
- src_y = state->src_y >> 16;
src_w = state->src_w >> 16;
src_h = state->src_h >> 16;







2019-01-21 09:13:08

by Benjamin Gaignard

[permalink] [raw]
Subject: Re: [PATCH -next] drm/stm: ltdc: remove set but not used variable 'src_h'

Le lun. 21 janv. 2019 à 09:21, YueHaibing <[email protected]> a écrit :
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/stm/ltdc.c: In function 'ltdc_plane_atomic_check':
> drivers/gpu/drm/stm/ltdc.c:694:13: warning:
> variable 'src_y' set but not used [-Wunused-but-set-variable]
> u32 src_x, src_y, src_w, src_h;
> ^
> ^
> drivers/gpu/drm/stm/ltdc.c:694:6: warning:
> variable 'src_x' set but not used [-Wunused-but-set-variable]
> u32 src_x, src_y, src_w, src_h;
> ^
>
> Signed-off-by: YueHaibing <[email protected]>

Applied on drm-misc-next,

Thanks,
Benjamin

> ---
> drivers/gpu/drm/stm/ltdc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index 61dd661..a91e041 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -691,7 +691,7 @@ static int ltdc_plane_atomic_check(struct drm_plane *plane,
> struct drm_plane_state *state)
> {
> struct drm_framebuffer *fb = state->fb;
> - u32 src_x, src_y, src_w, src_h;
> + u32 src_w, src_h;
>
> DRM_DEBUG_DRIVER("\n");
>
> @@ -699,8 +699,6 @@ static int ltdc_plane_atomic_check(struct drm_plane *plane,
> return 0;
>
> /* convert src_ from 16:16 format */
> - src_x = state->src_x >> 16;
> - src_y = state->src_y >> 16;
> src_w = state->src_w >> 16;
> src_h = state->src_h >> 16;
>
>
>
>
>
>