All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] staging: media: meson: vdec: declare u32 as static const
@ 2021-04-13 14:11 ` Mitali Borkar
  0 siblings, 0 replies; 4+ messages in thread
From: Mitali Borkar @ 2021-04-13 14:11 UTC (permalink / raw)
  To: narmstrong, mchehab, gregkh, khilman, jbrunet, martin.blumenstingl
  Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel,
	linux-amlogic, mitali_s

Declared 32 bit unsigned int as static constant inside a function and
replaced u32[] {x,y} as canvas3, canvas4 in codec_h264.c
This indicates the value of canvas indexes will remain constant throughout execution.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
---
Changes from v2:- Rebased this patch and made changes against mainline code
Changes from v1:- Rectified mistake by declaring u32 as static const
properly as static const u32 canvas'x'[]

 drivers/staging/media/meson/vdec/codec_h264.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/meson/vdec/codec_h264.c b/drivers/staging/media/meson/vdec/codec_h264.c
index c61128fc4bb9..80141b89a9f6 100644
--- a/drivers/staging/media/meson/vdec/codec_h264.c
+++ b/drivers/staging/media/meson/vdec/codec_h264.c
@@ -287,10 +287,10 @@ static void codec_h264_resume(struct amvdec_session *sess)
 	struct amvdec_core *core = sess->core;
 	struct codec_h264 *h264 = sess->priv;
 	u32 mb_width, mb_height, mb_total;
+	static const u32 canvas3[] = { ANCO_CANVAS_ADDR, 0 };
+	static const u32 canvas4[] = { 24, 0 };
 
-	amvdec_set_canvases(sess,
-			    (u32[]){ ANC0_CANVAS_ADDR, 0 },
-			    (u32[]){ 24, 0 });
+	amvdec_set_canvases(sess, canvas3, canvas4);
 
 	dev_dbg(core->dev, "max_refs = %u; actual_dpb_size = %u\n",
 		h264->max_refs, sess->num_dst_bufs);
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v3] staging: media: meson: vdec: declare u32 as static const
@ 2021-04-13 14:11 ` Mitali Borkar
  0 siblings, 0 replies; 4+ messages in thread
From: Mitali Borkar @ 2021-04-13 14:11 UTC (permalink / raw)
  To: narmstrong, mchehab, gregkh, khilman, jbrunet, martin.blumenstingl
  Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel,
	linux-amlogic, mitali_s

Declared 32 bit unsigned int as static constant inside a function and
replaced u32[] {x,y} as canvas3, canvas4 in codec_h264.c
This indicates the value of canvas indexes will remain constant throughout execution.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
---
Changes from v2:- Rebased this patch and made changes against mainline code
Changes from v1:- Rectified mistake by declaring u32 as static const
properly as static const u32 canvas'x'[]

 drivers/staging/media/meson/vdec/codec_h264.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/meson/vdec/codec_h264.c b/drivers/staging/media/meson/vdec/codec_h264.c
index c61128fc4bb9..80141b89a9f6 100644
--- a/drivers/staging/media/meson/vdec/codec_h264.c
+++ b/drivers/staging/media/meson/vdec/codec_h264.c
@@ -287,10 +287,10 @@ static void codec_h264_resume(struct amvdec_session *sess)
 	struct amvdec_core *core = sess->core;
 	struct codec_h264 *h264 = sess->priv;
 	u32 mb_width, mb_height, mb_total;
+	static const u32 canvas3[] = { ANCO_CANVAS_ADDR, 0 };
+	static const u32 canvas4[] = { 24, 0 };
 
-	amvdec_set_canvases(sess,
-			    (u32[]){ ANC0_CANVAS_ADDR, 0 },
-			    (u32[]){ 24, 0 });
+	amvdec_set_canvases(sess, canvas3, canvas4);
 
 	dev_dbg(core->dev, "max_refs = %u; actual_dpb_size = %u\n",
 		h264->max_refs, sess->num_dst_bufs);
-- 
2.30.2


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] staging: media: meson: vdec: declare u32 as static const
  2021-04-13 14:11 ` Mitali Borkar
@ 2021-04-13 15:10   ` Hans Verkuil
  -1 siblings, 0 replies; 4+ messages in thread
From: Hans Verkuil @ 2021-04-13 15:10 UTC (permalink / raw)
  To: Mitali Borkar, narmstrong, mchehab, gregkh, khilman, jbrunet,
	martin.blumenstingl
  Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel,
	linux-amlogic, mitali_s

On 13/04/2021 16:11, Mitali Borkar wrote:
> Declared 32 bit unsigned int as static constant inside a function and
> replaced u32[] {x,y} as canvas3, canvas4 in codec_h264.c
> This indicates the value of canvas indexes will remain constant throughout execution.

checkpatch.pl output:

WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#9:
This indicates the value of canvas indexes will remain constant throughout execution.

Regards,

	Hans

> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
> ---
> Changes from v2:- Rebased this patch and made changes against mainline code
> Changes from v1:- Rectified mistake by declaring u32 as static const
> properly as static const u32 canvas'x'[]
> 
>  drivers/staging/media/meson/vdec/codec_h264.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/media/meson/vdec/codec_h264.c b/drivers/staging/media/meson/vdec/codec_h264.c
> index c61128fc4bb9..80141b89a9f6 100644
> --- a/drivers/staging/media/meson/vdec/codec_h264.c
> +++ b/drivers/staging/media/meson/vdec/codec_h264.c
> @@ -287,10 +287,10 @@ static void codec_h264_resume(struct amvdec_session *sess)
>  	struct amvdec_core *core = sess->core;
>  	struct codec_h264 *h264 = sess->priv;
>  	u32 mb_width, mb_height, mb_total;
> +	static const u32 canvas3[] = { ANCO_CANVAS_ADDR, 0 };
> +	static const u32 canvas4[] = { 24, 0 };
>  
> -	amvdec_set_canvases(sess,
> -			    (u32[]){ ANC0_CANVAS_ADDR, 0 },
> -			    (u32[]){ 24, 0 });
> +	amvdec_set_canvases(sess, canvas3, canvas4);
>  
>  	dev_dbg(core->dev, "max_refs = %u; actual_dpb_size = %u\n",
>  		h264->max_refs, sess->num_dst_bufs);
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] staging: media: meson: vdec: declare u32 as static const
@ 2021-04-13 15:10   ` Hans Verkuil
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Verkuil @ 2021-04-13 15:10 UTC (permalink / raw)
  To: Mitali Borkar, narmstrong, mchehab, gregkh, khilman, jbrunet,
	martin.blumenstingl
  Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel,
	linux-amlogic, mitali_s

On 13/04/2021 16:11, Mitali Borkar wrote:
> Declared 32 bit unsigned int as static constant inside a function and
> replaced u32[] {x,y} as canvas3, canvas4 in codec_h264.c
> This indicates the value of canvas indexes will remain constant throughout execution.

checkpatch.pl output:

WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#9:
This indicates the value of canvas indexes will remain constant throughout execution.

Regards,

	Hans

> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
> ---
> Changes from v2:- Rebased this patch and made changes against mainline code
> Changes from v1:- Rectified mistake by declaring u32 as static const
> properly as static const u32 canvas'x'[]
> 
>  drivers/staging/media/meson/vdec/codec_h264.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/media/meson/vdec/codec_h264.c b/drivers/staging/media/meson/vdec/codec_h264.c
> index c61128fc4bb9..80141b89a9f6 100644
> --- a/drivers/staging/media/meson/vdec/codec_h264.c
> +++ b/drivers/staging/media/meson/vdec/codec_h264.c
> @@ -287,10 +287,10 @@ static void codec_h264_resume(struct amvdec_session *sess)
>  	struct amvdec_core *core = sess->core;
>  	struct codec_h264 *h264 = sess->priv;
>  	u32 mb_width, mb_height, mb_total;
> +	static const u32 canvas3[] = { ANCO_CANVAS_ADDR, 0 };
> +	static const u32 canvas4[] = { 24, 0 };
>  
> -	amvdec_set_canvases(sess,
> -			    (u32[]){ ANC0_CANVAS_ADDR, 0 },
> -			    (u32[]){ 24, 0 });
> +	amvdec_set_canvases(sess, canvas3, canvas4);
>  
>  	dev_dbg(core->dev, "max_refs = %u; actual_dpb_size = %u\n",
>  		h264->max_refs, sess->num_dst_bufs);
> 


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-13 15:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 14:11 [PATCH v3] staging: media: meson: vdec: declare u32 as static const Mitali Borkar
2021-04-13 14:11 ` Mitali Borkar
2021-04-13 15:10 ` Hans Verkuil
2021-04-13 15:10   ` Hans Verkuil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.