[v8,1/3] media: tpg: change char argument to const char
diff mbox series

Message ID 20200630195052.23880-2-kgupta@es.iitr.ac.in
State New
Headers show
Series
  • media: Add colors' order and other info over test image
Related show

Commit Message

Kaaira Gupta June 30, 2020, 7:50 p.m. UTC
Change the argument of type char * to const char * for function
tpg_gen_text().

Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
---
 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 10 +++++-----
 include/media/tpg/v4l2-tpg.h                  |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

Helen Koike June 30, 2020, 8:44 p.m. UTC | #1
On 6/30/20 4:50 PM, Kaaira Gupta wrote:
> Change the argument of type char * to const char * for function
> tpg_gen_text().

I don't think it is required for this version, but it would be nicer
if you could add an explanation regarding why you are doing this change :)

> 
> Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>

lgtm

Reviewed-by: Helen Koike <helen.koike@collabora.com>

Thanks
Helen

> ---
>  drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 10 +++++-----
>  include/media/tpg/v4l2-tpg.h                  |  2 +-
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
> index 50f1e0b28b25..dde22a4cbd6c 100644
> --- a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
> +++ b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
> @@ -1927,34 +1927,34 @@ typedef struct { u16 __; u8 _; } __packed x24;
>  
>  static noinline void tpg_print_str_2(const struct tpg_data *tpg, u8 *basep[TPG_MAX_PLANES][2],
>  			unsigned p, unsigned first, unsigned div, unsigned step,
> -			int y, int x, char *text, unsigned len)
> +			int y, int x, const char *text, unsigned len)
>  {
>  	PRINTSTR(u8);
>  }
>  
>  static noinline void tpg_print_str_4(const struct tpg_data *tpg, u8 *basep[TPG_MAX_PLANES][2],
>  			unsigned p, unsigned first, unsigned div, unsigned step,
> -			int y, int x, char *text, unsigned len)
> +			int y, int x, const char *text, unsigned len)
>  {
>  	PRINTSTR(u16);
>  }
>  
>  static noinline void tpg_print_str_6(const struct tpg_data *tpg, u8 *basep[TPG_MAX_PLANES][2],
>  			unsigned p, unsigned first, unsigned div, unsigned step,
> -			int y, int x, char *text, unsigned len)
> +			int y, int x, const char *text, unsigned len)
>  {
>  	PRINTSTR(x24);
>  }
>  
>  static noinline void tpg_print_str_8(const struct tpg_data *tpg, u8 *basep[TPG_MAX_PLANES][2],
>  			unsigned p, unsigned first, unsigned div, unsigned step,
> -			int y, int x, char *text, unsigned len)
> +			int y, int x, const char *text, unsigned len)
>  {
>  	PRINTSTR(u32);
>  }
>  
>  void tpg_gen_text(const struct tpg_data *tpg, u8 *basep[TPG_MAX_PLANES][2],
> -		  int y, int x, char *text)
> +		  int y, int x, const char *text)
>  {
>  	unsigned step = V4L2_FIELD_HAS_T_OR_B(tpg->field) ? 2 : 1;
>  	unsigned div = step;
> diff --git a/include/media/tpg/v4l2-tpg.h b/include/media/tpg/v4l2-tpg.h
> index eb191e85d363..9749ed409856 100644
> --- a/include/media/tpg/v4l2-tpg.h
> +++ b/include/media/tpg/v4l2-tpg.h
> @@ -241,7 +241,7 @@ void tpg_log_status(struct tpg_data *tpg);
>  
>  void tpg_set_font(const u8 *f);
>  void tpg_gen_text(const struct tpg_data *tpg,
> -		u8 *basep[TPG_MAX_PLANES][2], int y, int x, char *text);
> +		u8 *basep[TPG_MAX_PLANES][2], int y, int x, const char *text);
>  void tpg_calc_text_basep(struct tpg_data *tpg,
>  		u8 *basep[TPG_MAX_PLANES][2], unsigned p, u8 *vbuf);
>  unsigned tpg_g_interleaved_plane(const struct tpg_data *tpg, unsigned buf_line);
>

Patch
diff mbox series

diff --git a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
index 50f1e0b28b25..dde22a4cbd6c 100644
--- a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
+++ b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
@@ -1927,34 +1927,34 @@  typedef struct { u16 __; u8 _; } __packed x24;
 
 static noinline void tpg_print_str_2(const struct tpg_data *tpg, u8 *basep[TPG_MAX_PLANES][2],
 			unsigned p, unsigned first, unsigned div, unsigned step,
-			int y, int x, char *text, unsigned len)
+			int y, int x, const char *text, unsigned len)
 {
 	PRINTSTR(u8);
 }
 
 static noinline void tpg_print_str_4(const struct tpg_data *tpg, u8 *basep[TPG_MAX_PLANES][2],
 			unsigned p, unsigned first, unsigned div, unsigned step,
-			int y, int x, char *text, unsigned len)
+			int y, int x, const char *text, unsigned len)
 {
 	PRINTSTR(u16);
 }
 
 static noinline void tpg_print_str_6(const struct tpg_data *tpg, u8 *basep[TPG_MAX_PLANES][2],
 			unsigned p, unsigned first, unsigned div, unsigned step,
-			int y, int x, char *text, unsigned len)
+			int y, int x, const char *text, unsigned len)
 {
 	PRINTSTR(x24);
 }
 
 static noinline void tpg_print_str_8(const struct tpg_data *tpg, u8 *basep[TPG_MAX_PLANES][2],
 			unsigned p, unsigned first, unsigned div, unsigned step,
-			int y, int x, char *text, unsigned len)
+			int y, int x, const char *text, unsigned len)
 {
 	PRINTSTR(u32);
 }
 
 void tpg_gen_text(const struct tpg_data *tpg, u8 *basep[TPG_MAX_PLANES][2],
-		  int y, int x, char *text)
+		  int y, int x, const char *text)
 {
 	unsigned step = V4L2_FIELD_HAS_T_OR_B(tpg->field) ? 2 : 1;
 	unsigned div = step;
diff --git a/include/media/tpg/v4l2-tpg.h b/include/media/tpg/v4l2-tpg.h
index eb191e85d363..9749ed409856 100644
--- a/include/media/tpg/v4l2-tpg.h
+++ b/include/media/tpg/v4l2-tpg.h
@@ -241,7 +241,7 @@  void tpg_log_status(struct tpg_data *tpg);
 
 void tpg_set_font(const u8 *f);
 void tpg_gen_text(const struct tpg_data *tpg,
-		u8 *basep[TPG_MAX_PLANES][2], int y, int x, char *text);
+		u8 *basep[TPG_MAX_PLANES][2], int y, int x, const char *text);
 void tpg_calc_text_basep(struct tpg_data *tpg,
 		u8 *basep[TPG_MAX_PLANES][2], unsigned p, u8 *vbuf);
 unsigned tpg_g_interleaved_plane(const struct tpg_data *tpg, unsigned buf_line);