Skip to contentSkip to conversation

media: vicodec: bugfix - replace '=' with '|='

PATCH Superseded Dafna Hirschfeld 2 participants 2 messages Dec 15, 2018 – Dec 16, 2018 Media (V4L/DVB)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: vicodec: bugfix - replace '=' with '|='

In the function fwht_encode_frame, 'encoding = encode_plane' should be replaced with 'encoding |= encode_plane' so existing flags won't be overwrriten.

---
 drivers/media/platform/vicodec/codec-fwht.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/vicodec/codec-fwht.c +1 -1
index 5630f1dc45e6..a678a716580c 100644
@@ -787,7 +787,7 @@ u32 fwht_encode_frame(struct fwht_raw_frame *frm,
 
 	if (frm->components_num == 4) {
 		rlco_max = rlco + size / 2 - 256;
-		encoding = encode_plane(frm->alpha, ref_frm->alpha, &rlco,
+		encoding |= encode_plane(frm->alpha, ref_frm->alpha, &rlco,
 					rlco_max, cf, frm->height, frm->width,
 					frm->luma_alpha_step,
 					is_intra, next_is_intra);
Signature · 1 line
2.17.1
#1 lore raw
Quoted 3 lines · Dafna Hirschfeld

In the function fwht_encode_frame, 'encoding = encode_plane' should be replaced with 'encoding |= encode_plane' so existing flags won't be overwrriten.

Good catch.

Hmm, it looks like you didn't update the alignment of the arguments. I expect checkpatch to complain about it. Can you post a v2 fixing that?

Regards,

Hans

Quoted 20 lines
---
 drivers/media/platform/vicodec/codec-fwht.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/vicodec/codec-fwht.c +1 -1
index 5630f1dc45e6..a678a716580c 100644
@@ -787,7 +787,7 @@ u32 fwht_encode_frame(struct fwht_raw_frame *frm,
 
 	if (frm->components_num == 4) {
 		rlco_max = rlco + size / 2 - 256;
-		encoding = encode_plane(frm->alpha, ref_frm->alpha, &rlco,
+		encoding |= encode_plane(frm->alpha, ref_frm->alpha, &rlco,
 					rlco_max, cf, frm->height, frm->width,
 					frm->luma_alpha_step,
 					is_intra, next_is_intra);