From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Kaaira Gupta <kgupta@es.iitr.ac.in>,
Helen Koike <helen.koike@collabora.com>,
Shuah Khan <skhan@linuxfoundation.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
hverkuil@xs4all.nl
Subject: Re: [PATCH v9 1/3] media: tpg: change char argument to const char
Date: Thu, 2 Jul 2020 00:08:16 +0100 [thread overview]
Message-ID: <e7027fdf-de35-3c14-8e1a-9f0ba8a162ad@ideasonboard.com> (raw)
In-Reply-To: <20200701132940.21257-2-kgupta@es.iitr.ac.in>
Hi Kaaira,
On 01/07/2020 14:29, Kaaira Gupta wrote:
> Change the argument of type char * to const char * for function
> tpg_gen_text().
>
> This function should take in a const char pointer as opposed to a char
> * as there is no modification. This issue was found while passing the
> order of colors of tpg generated test image (which is a const char *)
> to this function.
>
> Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
> Reviewed-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
> 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);
>
--
Regards
--
Kieran
next prev parent reply other threads:[~2020-07-01 23:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-01 13:29 [PATCH v9 0/3] media: Add colors' order and other info over test image Kaaira Gupta
2020-07-01 13:29 ` [PATCH v9 1/3] media: tpg: change char argument to const char Kaaira Gupta
2020-07-01 23:08 ` Kieran Bingham [this message]
2020-07-01 13:29 ` [PATCH v9 2/3] media: tpg: Add function to return colors' order of test image Kaaira Gupta
2020-07-01 13:29 ` [PATCH v9 3/3] media: vimc: Add a control to display info on " Kaaira Gupta
2020-07-01 23:07 ` Kieran Bingham
2020-07-02 13:11 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e7027fdf-de35-3c14-8e1a-9f0ba8a162ad@ideasonboard.com \
--to=kieran.bingham@ideasonboard.com \
--cc=helen.koike@collabora.com \
--cc=hverkuil@xs4all.nl \
--cc=kgupta@es.iitr.ac.in \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®