Re: [PATCH 19/19] bdisp: move the V/H filter spec to bdisp-hw.c

2016-06-27 Thread Fabien DESSENNE


On 06/24/2016 05:32 PM, Mauro Carvalho Chehab wrote:
> Those structs are used only at bdisp-hw, so they shouldn't be
> there in a header file that it is used elsewhere.
>
> This fixes the following Gcc 6.1 warnings:
>
> In file included from drivers/media/platform/sti/bdisp/bdisp-debug.c:11:0:
> drivers/media/platform/sti/bdisp/bdisp-filter.h:207:65: warning: 
> ‘bdisp_v_spec’ defined but not used [-Wunused-const-variable=]
>   static const struct __maybe_unused bdisp_filter_v_spec bdisp_v_spec[] = {
>   ^
> In file included from drivers/media/platform/sti/bdisp/bdisp-debug.c:11:0:
> drivers/media/platform/sti/bdisp/bdisp-filter.h:23:65: warning: 
> ‘bdisp_h_spec’ defined but not used [-Wunused-const-variable=]
>   static const struct __maybe_unused bdisp_filter_h_spec bdisp_h_spec[] = {
>   ^
>
> Signed-off-by: Mauro Carvalho Chehab 

Acked-by: Fabien Dessenne 

> ---
>   drivers/media/platform/sti/bdisp/bdisp-filter.h | 304 
> ---
>   drivers/media/platform/sti/bdisp/bdisp-hw.c | 305 
> 
>   2 files changed, 305 insertions(+), 304 deletions(-)
>
> diff --git a/drivers/media/platform/sti/bdisp/bdisp-filter.h 
> b/drivers/media/platform/sti/bdisp/bdisp-filter.h
> index fc8c54f725ad..53e52fb4127f 100644
> --- a/drivers/media/platform/sti/bdisp/bdisp-filter.h
> +++ b/drivers/media/platform/sti/bdisp/bdisp-filter.h
> @@ -19,178 +19,6 @@ struct bdisp_filter_h_spec {
>  const u16 max;
>  const u8 coef[BDISP_HF_NB];
>   };
> -
> -static const struct bdisp_filter_h_spec bdisp_h_spec[] = {
> -   {
> -   .min = 0,
> -   .max = 921,
> -   .coef = {
> -   0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
> -   0x00, 0x00, 0xff, 0x07, 0x3d, 0xfc, 0x01, 0x00,
> -   0x00, 0x01, 0xfd, 0x11, 0x36, 0xf9, 0x02, 0x00,
> -   0x00, 0x01, 0xfb, 0x1b, 0x2e, 0xf9, 0x02, 0x00,
> -   0x00, 0x01, 0xf9, 0x26, 0x26, 0xf9, 0x01, 0x00,
> -   0x00, 0x02, 0xf9, 0x30, 0x19, 0xfb, 0x01, 0x00,
> -   0x00, 0x02, 0xf9, 0x39, 0x0e, 0xfd, 0x01, 0x00,
> -   0x00, 0x01, 0xfc, 0x3e, 0x06, 0xff, 0x00, 0x00
> -   }
> -   },
> -   {
> -   .min = 921,
> -   .max = 1024,
> -   .coef = {
> -   0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
> -   0xff, 0x03, 0xfd, 0x08, 0x3e, 0xf9, 0x04, 0xfe,
> -   0xfd, 0x06, 0xf8, 0x13, 0x3b, 0xf4, 0x07, 0xfc,
> -   0xfb, 0x08, 0xf5, 0x1f, 0x34, 0xf1, 0x09, 0xfb,
> -   0xfb, 0x09, 0xf2, 0x2b, 0x2a, 0xf1, 0x09, 0xfb,
> -   0xfb, 0x09, 0xf2, 0x35, 0x1e, 0xf4, 0x08, 0xfb,
> -   0xfc, 0x07, 0xf5, 0x3c, 0x12, 0xf7, 0x06, 0xfd,
> -   0xfe, 0x04, 0xfa, 0x3f, 0x07, 0xfc, 0x03, 0xff
> -   }
> -   },
> -   {
> -   .min = 1024,
> -   .max = 1126,
> -   .coef = {
> -   0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
> -   0xff, 0x03, 0xfd, 0x08, 0x3e, 0xf9, 0x04, 0xfe,
> -   0xfd, 0x06, 0xf8, 0x13, 0x3b, 0xf4, 0x07, 0xfc,
> -   0xfb, 0x08, 0xf5, 0x1f, 0x34, 0xf1, 0x09, 0xfb,
> -   0xfb, 0x09, 0xf2, 0x2b, 0x2a, 0xf1, 0x09, 0xfb,
> -   0xfb, 0x09, 0xf2, 0x35, 0x1e, 0xf4, 0x08, 0xfb,
> -   0xfc, 0x07, 0xf5, 0x3c, 0x12, 0xf7, 0x06, 0xfd,
> -   0xfe, 0x04, 0xfa, 0x3f, 0x07, 0xfc, 0x03, 0xff
> -   }
> -   },
> -   {
> -   .min = 1126,
> -   .max = 1228,
> -   .coef = {
> -   0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
> -   0xff, 0x03, 0xfd, 0x08, 0x3e, 0xf9, 0x04, 0xfe,
> -   0xfd, 0x06, 0xf8, 0x13, 0x3b, 0xf4, 0x07, 0xfc,
> -   0xfb, 0x08, 0xf5, 0x1f, 0x34, 0xf1, 0x09, 0xfb,
> -   0xfb, 0x09, 0xf2, 0x2b, 0x2a, 0xf1, 0x09, 0xfb,
> -   0xfb, 0x09, 0xf2, 0x35, 0x1e, 0xf4, 0x08, 0xfb,
> -   0xfc, 0x07, 0xf5, 0x3c, 0x12, 0xf7, 0x06, 0xfd,
> -   0xfe, 0x04, 0xfa, 0x3f, 0x07, 0xfc, 0x03, 0xff
> -   }
> -   },
> -   {
> -   .min = 1228,
> -   .max = 1331,
> -   .coef = {
> -   0xfd, 0x04, 0xfc, 0x05, 0x39, 0x05, 0xfc, 0x04,
> -   0xfc, 0x06, 0xf9, 0x0c, 0x39, 0xfe, 0x00, 0x02,
> -   0xfb, 0x08, 0xf6, 0x17, 0x35, 0xf9, 0x02, 0x00,
> -  

[PATCH 19/19] bdisp: move the V/H filter spec to bdisp-hw.c

2016-06-24 Thread Mauro Carvalho Chehab
Those structs are used only at bdisp-hw, so they shouldn't be
there in a header file that it is used elsewhere.

This fixes the following Gcc 6.1 warnings:

In file included from drivers/media/platform/sti/bdisp/bdisp-debug.c:11:0:
drivers/media/platform/sti/bdisp/bdisp-filter.h:207:65: warning: ‘bdisp_v_spec’ 
defined but not used [-Wunused-const-variable=]
 static const struct __maybe_unused bdisp_filter_v_spec bdisp_v_spec[] = {
 ^
In file included from drivers/media/platform/sti/bdisp/bdisp-debug.c:11:0:
drivers/media/platform/sti/bdisp/bdisp-filter.h:23:65: warning: ‘bdisp_h_spec’ 
defined but not used [-Wunused-const-variable=]
 static const struct __maybe_unused bdisp_filter_h_spec bdisp_h_spec[] = {
 ^

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/sti/bdisp/bdisp-filter.h | 304 ---
 drivers/media/platform/sti/bdisp/bdisp-hw.c | 305 
 2 files changed, 305 insertions(+), 304 deletions(-)

diff --git a/drivers/media/platform/sti/bdisp/bdisp-filter.h 
b/drivers/media/platform/sti/bdisp/bdisp-filter.h
index fc8c54f725ad..53e52fb4127f 100644
--- a/drivers/media/platform/sti/bdisp/bdisp-filter.h
+++ b/drivers/media/platform/sti/bdisp/bdisp-filter.h
@@ -19,178 +19,6 @@ struct bdisp_filter_h_spec {
const u16 max;
const u8 coef[BDISP_HF_NB];
 };
-
-static const struct bdisp_filter_h_spec bdisp_h_spec[] = {
-   {
-   .min = 0,
-   .max = 921,
-   .coef = {
-   0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0xff, 0x07, 0x3d, 0xfc, 0x01, 0x00,
-   0x00, 0x01, 0xfd, 0x11, 0x36, 0xf9, 0x02, 0x00,
-   0x00, 0x01, 0xfb, 0x1b, 0x2e, 0xf9, 0x02, 0x00,
-   0x00, 0x01, 0xf9, 0x26, 0x26, 0xf9, 0x01, 0x00,
-   0x00, 0x02, 0xf9, 0x30, 0x19, 0xfb, 0x01, 0x00,
-   0x00, 0x02, 0xf9, 0x39, 0x0e, 0xfd, 0x01, 0x00,
-   0x00, 0x01, 0xfc, 0x3e, 0x06, 0xff, 0x00, 0x00
-   }
-   },
-   {
-   .min = 921,
-   .max = 1024,
-   .coef = {
-   0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
-   0xff, 0x03, 0xfd, 0x08, 0x3e, 0xf9, 0x04, 0xfe,
-   0xfd, 0x06, 0xf8, 0x13, 0x3b, 0xf4, 0x07, 0xfc,
-   0xfb, 0x08, 0xf5, 0x1f, 0x34, 0xf1, 0x09, 0xfb,
-   0xfb, 0x09, 0xf2, 0x2b, 0x2a, 0xf1, 0x09, 0xfb,
-   0xfb, 0x09, 0xf2, 0x35, 0x1e, 0xf4, 0x08, 0xfb,
-   0xfc, 0x07, 0xf5, 0x3c, 0x12, 0xf7, 0x06, 0xfd,
-   0xfe, 0x04, 0xfa, 0x3f, 0x07, 0xfc, 0x03, 0xff
-   }
-   },
-   {
-   .min = 1024,
-   .max = 1126,
-   .coef = {
-   0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
-   0xff, 0x03, 0xfd, 0x08, 0x3e, 0xf9, 0x04, 0xfe,
-   0xfd, 0x06, 0xf8, 0x13, 0x3b, 0xf4, 0x07, 0xfc,
-   0xfb, 0x08, 0xf5, 0x1f, 0x34, 0xf1, 0x09, 0xfb,
-   0xfb, 0x09, 0xf2, 0x2b, 0x2a, 0xf1, 0x09, 0xfb,
-   0xfb, 0x09, 0xf2, 0x35, 0x1e, 0xf4, 0x08, 0xfb,
-   0xfc, 0x07, 0xf5, 0x3c, 0x12, 0xf7, 0x06, 0xfd,
-   0xfe, 0x04, 0xfa, 0x3f, 0x07, 0xfc, 0x03, 0xff
-   }
-   },
-   {
-   .min = 1126,
-   .max = 1228,
-   .coef = {
-   0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
-   0xff, 0x03, 0xfd, 0x08, 0x3e, 0xf9, 0x04, 0xfe,
-   0xfd, 0x06, 0xf8, 0x13, 0x3b, 0xf4, 0x07, 0xfc,
-   0xfb, 0x08, 0xf5, 0x1f, 0x34, 0xf1, 0x09, 0xfb,
-   0xfb, 0x09, 0xf2, 0x2b, 0x2a, 0xf1, 0x09, 0xfb,
-   0xfb, 0x09, 0xf2, 0x35, 0x1e, 0xf4, 0x08, 0xfb,
-   0xfc, 0x07, 0xf5, 0x3c, 0x12, 0xf7, 0x06, 0xfd,
-   0xfe, 0x04, 0xfa, 0x3f, 0x07, 0xfc, 0x03, 0xff
-   }
-   },
-   {
-   .min = 1228,
-   .max = 1331,
-   .coef = {
-   0xfd, 0x04, 0xfc, 0x05, 0x39, 0x05, 0xfc, 0x04,
-   0xfc, 0x06, 0xf9, 0x0c, 0x39, 0xfe, 0x00, 0x02,
-   0xfb, 0x08, 0xf6, 0x17, 0x35, 0xf9, 0x02, 0x00,
-   0xfc, 0x08, 0xf4, 0x20, 0x30, 0xf4, 0x05, 0xff,
-   0xfd, 0x07, 0xf4, 0x29, 0x28, 0xf3, 0x07, 0xfd,
-   0xff, 0x05, 0xf5, 0x31, 0x1f, 0xf3, 0x08, 0xfc,
-   0x00, 0x02, 0xf9, 0x38, 0x14, 0xf6, 0x08, 0xfb,
-   0x02,