diff mbox series

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

Message ID 20181215115119.2732-1-dafna3@gmail.com (mailing list archive)
State New, archived
Headers show
Series media: vicodec: bugfix - replace '=' with '|=' | expand

Commit Message

Dafna Hirschfeld Dec. 15, 2018, 11:51 a.m. UTC
In the function fwht_encode_frame, 'encoding = encode_plane'
should be replaced with 'encoding |= encode_plane'
so existing flags won't be overwrriten.

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
---
 drivers/media/platform/vicodec/codec-fwht.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Hans Verkuil Dec. 16, 2018, 11:30 a.m. UTC | #1
On 12/15/18 12:51 PM, Dafna Hirschfeld wrote:
> 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

> 
> Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
> ---
>  drivers/media/platform/vicodec/codec-fwht.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/vicodec/codec-fwht.c b/drivers/media/platform/vicodec/codec-fwht.c
> index 5630f1dc45e6..a678a716580c 100644
> --- a/drivers/media/platform/vicodec/codec-fwht.c
> +++ b/drivers/media/platform/vicodec/codec-fwht.c
> @@ -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);
>
diff mbox series

Patch

diff --git a/drivers/media/platform/vicodec/codec-fwht.c b/drivers/media/platform/vicodec/codec-fwht.c
index 5630f1dc45e6..a678a716580c 100644
--- a/drivers/media/platform/vicodec/codec-fwht.c
+++ b/drivers/media/platform/vicodec/codec-fwht.c
@@ -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);