Skip to contentSkip to conversation

Subject: [PATCH v2] staging: media: meson: vdec: declare u32 as static const appropriately

PATCH Mitali Borkar 4 participants 6 messages Apr 13, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Declared 32 bit unsigned int as static constant inside a function appropriately.

---

Changes from v1:- Rectified the mistake by declaring u32 as static const properly.

 drivers/staging/media/meson/vdec/codec_h264.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/meson/vdec/codec_h264.c +2 -2
index ea86e9e1c447..80141b89a9f6 100644
@@ -287,8 +287,8 @@ 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 };
+	static const u32 canvas3[] = { ANCO_CANVAS_ADDR, 0 };
+	static const u32 canvas4[] = { 24, 0 };
 
 	amvdec_set_canvases(sess, canvas3, canvas4);
 
Signature · 1 line
2.30.2
#1 lore raw
Quoted 2 lines · Mitali Borkar

Declared 32 bit unsigned int as static constant inside a function appropriately.

I don't think that the description matches what is done. Perhaps all the meaning is intended to be in the word "appropriately", but that is not very clear. The message makes it looks like static const is the new part, but it is already there.

julia

Quoted 34 lines

---

Changes from v1:- Rectified the mistake by declaring u32 as static const properly.

 drivers/staging/media/meson/vdec/codec_h264.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/meson/vdec/codec_h264.c +2 -3
index ea86e9e1c447..80141b89a9f6 100644
@@ -287,8 +287,8 @@ 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 };
+	static const u32 canvas3[] = { ANCO_CANVAS_ADDR, 0 };
+	static const u32 canvas4[] = { 24, 0 };
 
 	amvdec_set_canvases(sess, canvas3, canvas4);
 
--

2.30.2

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/YHU56OM%2BC2zY34VP%40kali.

#3 lore raw
In reply to Mitali Borkar
Quoted 18 lines · Mitali Borkar

Declared 32 bit unsigned int as static constant inside a function appropriately.

---

Changes from v1:- Rectified the mistake by declaring u32 as static const properly.

 drivers/staging/media/meson/vdec/codec_h264.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/meson/vdec/codec_h264.c +0 -0
index ea86e9e1c447..80141b89a9f6 100644

drivers/staging/media/meson/vdec/codec_h264.c static void codec_h264_resume(struct amvdec_session *sess) · line 291

Quoted 7 lines
drivers/staging/media/meson/vdec/codec_h264.c +2 -2
@@ -287,8 +287,8 @@ 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 };
+	static const u32 canvas3[] = { ANCO_CANVAS_ADDR, 0 };
+	static const u32 canvas4[] = { 24, 0 };

This is a patch on top of your previous (v1) patch. That won't work since the v1 is not merged, you need to make a patch against the current mainline code.

Regards,

Hans

Quoted 4 lines
drivers/staging/media/meson/vdec/codec_h264.c +0 -0
 	amvdec_set_canvases(sess, canvas3, canvas4);
 
 
#4 lore raw
Quoted 14 lines · Hans Verkuil
Quoted 13 lines · Mitali Borkar

Declared 32 bit unsigned int as static constant inside a function appropriately.

---

Changes from v1:- Rectified the mistake by declaring u32 as static const properly.

 drivers/staging/media/meson/vdec/codec_h264.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 17 lines

drivers/staging/media/meson/vdec/codec_h264.c static void codec_h264_resume(struct amvdec_session *sess) · line 291

Quoted 12 lines
drivers/staging/media/meson/vdec/codec_h264.c +2 -2
index ea86e9e1c447..80141b89a9f6 100644
@@ -287,8 +287,8 @@ 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 };
+	static const u32 canvas3[] = { ANCO_CANVAS_ADDR, 0 };
+	static const u32 canvas4[] = { 24, 0 };

This is a patch on top of your previous (v1) patch. That won't work since the v1 is not merged, you need to make a patch against the current mainline code.

But Sir, since I have made changes in the code, and committed them, now, if I open that file, it will contain those changes. Then should I rewrite the patch body more accurately?

Quoted 9 lines

Regards,

Hans

Quoted 4 lines
drivers/staging/media/meson/vdec/codec_h264.c +0 -0
 	amvdec_set_canvases(sess, canvas3, canvas4);
 
 
#5 lore raw
Quoted 32 lines · Mitali Borkar
Quoted 14 lines · Hans Verkuil
Quoted 13 lines · Mitali Borkar

Declared 32 bit unsigned int as static constant inside a function appropriately.

---

Changes from v1:- Rectified the mistake by declaring u32 as static const properly.

 drivers/staging/media/meson/vdec/codec_h264.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 17 lines

drivers/staging/media/meson/vdec/codec_h264.c static void codec_h264_resume(struct amvdec_session *sess) · line 291

Quoted 12 lines
drivers/staging/media/meson/vdec/codec_h264.c +2 -2
index ea86e9e1c447..80141b89a9f6 100644
@@ -287,8 +287,8 @@ 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 };
+	static const u32 canvas3[] = { ANCO_CANVAS_ADDR, 0 };
+	static const u32 canvas4[] = { 24, 0 };

This is a patch on top of your previous (v1) patch. That won't work since the v1 is not merged, you need to make a patch against the current mainline code.

Quoted 3 lines

But Sir, since I have made changes in the code, and committed them, now, if I open that file, it will contain those changes. Then should I rewrite the patch body more accurately?

You only committed the v1 change in your own repository, it's not in the upstream repository. And the patches you post must be against the upstream repository, not your own.

'git rebase -i' can be your friend here, it makes it easy to fold the second patch into the first, and then you only have to post the final version.

Regards,

Hans

Quoted 10 lines
Quoted 10 lines

Regards,

Hans

Quoted 4 lines
drivers/staging/media/meson/vdec/codec_h264.c +0 -0
 	amvdec_set_canvases(sess, canvas3, canvas4);