Re: [PATCH] media: v4l2-tpg: use __u16 instead of int for struct tpg_rbg_color16

2017-10-09 Thread Hans Verkuil
On 09/10/17 12:23, Mauro Carvalho Chehab wrote:
> Despite the struct says "color16", it was actually using 32 bits
> for each color. Fix it.
> 
> Suggested-by: Hans Verkuil 
> Signed-off-by: Mauro Carvalho Chehab 

Acked-by: Hans Verkuil 

Thanks!

Hans

> ---
> 
> Should come after this patch series:
> V4L2 kAPI cleanups and documentation improvements part 2
> 
> 
>  include/media/tpg/v4l2-tpg.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/media/tpg/v4l2-tpg.h b/include/media/tpg/v4l2-tpg.h
> index bc0b38440719..823fadede7bf 100644
> --- a/include/media/tpg/v4l2-tpg.h
> +++ b/include/media/tpg/v4l2-tpg.h
> @@ -32,7 +32,7 @@ struct tpg_rbg_color8 {
>  };
>  
>  struct tpg_rbg_color16 {
> - int r, g, b;
> + __u16 r, g, b;
>  };
>  
>  enum tpg_color {
> 



[PATCH] media: v4l2-tpg: use __u16 instead of int for struct tpg_rbg_color16

2017-10-09 Thread Mauro Carvalho Chehab
Despite the struct says "color16", it was actually using 32 bits
for each color. Fix it.

Suggested-by: Hans Verkuil 
Signed-off-by: Mauro Carvalho Chehab 
---

Should come after this patch series:
V4L2 kAPI cleanups and documentation improvements part 2


 include/media/tpg/v4l2-tpg.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/media/tpg/v4l2-tpg.h b/include/media/tpg/v4l2-tpg.h
index bc0b38440719..823fadede7bf 100644
--- a/include/media/tpg/v4l2-tpg.h
+++ b/include/media/tpg/v4l2-tpg.h
@@ -32,7 +32,7 @@ struct tpg_rbg_color8 {
 };
 
 struct tpg_rbg_color16 {
-   int r, g, b;
+   __u16 r, g, b;
 };
 
 enum tpg_color {
-- 
2.13.6