Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1671088 > unrolled thread

[PATCH] drm/arm: hdlcd: remove unused variables

Started byArnd Bergmann <arnd@arndb.de>
First post2017-06-20 22:40 +0200
Last post2017-06-21 10:50 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] drm/arm: hdlcd: remove unused variables Arnd Bergmann <arnd@arndb.de> - 2017-06-20 22:40 +0200
    Re: [PATCH] drm/arm: hdlcd: remove unused variables Liviu Dudau <liviu.dudau@arm.com> - 2017-06-21 10:20 +0200
      Re: [PATCH] drm/arm: hdlcd: remove unused variables Arnd Bergmann <arnd@arndb.de> - 2017-06-21 10:50 +0200

#1671088 — [PATCH] drm/arm: hdlcd: remove unused variables

FromArnd Bergmann <arnd@arndb.de>
Date2017-06-20 22:40 +0200
Subject[PATCH] drm/arm: hdlcd: remove unused variables
Message-ID<tUy6l-4Vv-7@gated-at.bofh.it>
The last rework left behind two unused variables:

drm/arm/hdlcd_crtc.c: In function 'hdlcd_plane_atomic_update':
drm/arm/hdlcd_crtc.c:264:13: warning: unused variable 'src_y' [-Wunused-variable]
drm/arm/hdlcd_crtc.c:264:6: warning: unused variable 'src_x' [-Wunused-variable]

This removes them.

Fixes: b2ae06ae9834 ("drm/arm: hdlcd: Use CMA helper for plane buffer address calculation")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpu/drm/arm/hdlcd_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/arm/hdlcd_crtc.c b/drivers/gpu/drm/arm/hdlcd_crtc.c
index 0128ebd318f5..d67b6f15e8b8 100644
--- a/drivers/gpu/drm/arm/hdlcd_crtc.c
+++ b/drivers/gpu/drm/arm/hdlcd_crtc.c
@@ -261,7 +261,7 @@ static void hdlcd_plane_atomic_update(struct drm_plane *plane,
 {
 	struct drm_framebuffer *fb = plane->state->fb;
 	struct hdlcd_drm_private *hdlcd;
-	u32 src_x, src_y, dest_h;
+	u32 dest_h;
 	dma_addr_t scanout_start;
 
 	if (!fb)
-- 
2.9.0

[toc] | [next] | [standalone]


#1671476

FromLiviu Dudau <liviu.dudau@arm.com>
Date2017-06-21 10:20 +0200
Message-ID<tUJ1M-3E2-5@gated-at.bofh.it>
In reply to#1671088
Hi Arnd,

On Tue, Jun 20, 2017 at 10:30:38PM +0200, Arnd Bergmann wrote:
> The last rework left behind two unused variables:
> 
> drm/arm/hdlcd_crtc.c: In function 'hdlcd_plane_atomic_update':
> drm/arm/hdlcd_crtc.c:264:13: warning: unused variable 'src_y' [-Wunused-variable]
> drm/arm/hdlcd_crtc.c:264:6: warning: unused variable 'src_x' [-Wunused-variable]
> 
> This removes them.

Thanks for the patch! Acked-by: Liviu Dudau <liviu.dudau@arm.com>

This is starting to get embarrassing :) I'm not sure why I didn't see the warnings when
I did my builds, but I would like to make changes so that in the future I can catch
situations like this. Do you change the flags of the default make multi_v7_defconfig?

I will apply the patch to the HLDCD tree and send Dave an updated pull request.

Best regards,
Liviu

> 
> Fixes: b2ae06ae9834 ("drm/arm: hdlcd: Use CMA helper for plane buffer address calculation")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/gpu/drm/arm/hdlcd_crtc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/arm/hdlcd_crtc.c b/drivers/gpu/drm/arm/hdlcd_crtc.c
> index 0128ebd318f5..d67b6f15e8b8 100644
> --- a/drivers/gpu/drm/arm/hdlcd_crtc.c
> +++ b/drivers/gpu/drm/arm/hdlcd_crtc.c
> @@ -261,7 +261,7 @@ static void hdlcd_plane_atomic_update(struct drm_plane *plane,
>  {
>  	struct drm_framebuffer *fb = plane->state->fb;
>  	struct hdlcd_drm_private *hdlcd;
> -	u32 src_x, src_y, dest_h;
> +	u32 dest_h;
>  	dma_addr_t scanout_start;
>  
>  	if (!fb)
> -- 
> 2.9.0
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

[toc] | [prev] | [next] | [standalone]


#1671504

FromArnd Bergmann <arnd@arndb.de>
Date2017-06-21 10:50 +0200
Message-ID<tUJuO-3Nw-17@gated-at.bofh.it>
In reply to#1671476
On Wed, Jun 21, 2017 at 10:16 AM, Liviu Dudau <liviu.dudau@arm.com> wrote:
> Hi Arnd,
>
> On Tue, Jun 20, 2017 at 10:30:38PM +0200, Arnd Bergmann wrote:
>> The last rework left behind two unused variables:
>>
>> drm/arm/hdlcd_crtc.c: In function 'hdlcd_plane_atomic_update':
>> drm/arm/hdlcd_crtc.c:264:13: warning: unused variable 'src_y' [-Wunused-variable]
>> drm/arm/hdlcd_crtc.c:264:6: warning: unused variable 'src_x' [-Wunused-variable]
>>
>> This removes them.
>
> Thanks for the patch! Acked-by: Liviu Dudau <liviu.dudau@arm.com>
>
> This is starting to get embarrassing :) I'm not sure why I didn't see the warnings when
> I did my builds, but I would like to make changes so that in the future I can catch
> situations like this. Do you change the flags of the default make multi_v7_defconfig?

I mainly do randconfig testing, which catches a lot of bugs that you don't
see in the defconfig build. My general recommendation is to build-test on
ARM allmodconfig and x86 allmodconfig, and to ensure that all new code
gets enabled with CONFIG_COMPILE_TEST in those builds.

> I will apply the patch to the HLDCD tree and send Dave an updated pull request.

Ok, thanks!

      Arnd

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web