From: Stricted Date: Sat, 19 Jun 2021 23:03:23 +0000 (+0000) Subject: amlogic: amvecm: Fix if check warnings X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6c61419ee392ff59680d9012b86044d69d9cad1f;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git amlogic: amvecm: Fix if check warnings Change-Id: If3696b4a33677f1a3d4db2fade1524a363d90fc7 --- diff --git a/drivers/amlogic/media/enhancement/amvecm/amcsc.c b/drivers/amlogic/media/enhancement/amvecm/amcsc.c index 6df29fc6df48..84552bf7411a 100644 --- a/drivers/amlogic/media/enhancement/amvecm/amcsc.c +++ b/drivers/amlogic/media/enhancement/amvecm/amcsc.c @@ -3671,7 +3671,7 @@ static void print_primaries_info(struct vframe_master_display_colour_s *p) { int i, j; - if (!p->present_flag & 1) { + if (!(p->present_flag & 1)) { pr_csc(1, "\tmaster display color not available"); return; } diff --git a/drivers/amlogic/media/enhancement/amvecm/local_contrast.c b/drivers/amlogic/media/enhancement/amvecm/local_contrast.c index d93a4db2aab8..aa14f9ace204 100644 --- a/drivers/amlogic/media/enhancement/amvecm/local_contrast.c +++ b/drivers/amlogic/media/enhancement/amvecm/local_contrast.c @@ -1351,7 +1351,7 @@ int global_scene_change(int *curve_nodes_cur, frm_dif[N - 1] = frm_dif[N - 1] - frm_dif_osd; valid_blk_num[N-1] = (blk_vnum - vnum_osd) * blk_hnum; /*debug*/ - if ((amlc_debug == 0x4)) { + if (amlc_debug == 0x4) { pr_info("#vnum_osd = %d;\n", vnum_osd); pr_info("#valid_blk_num[%d] = %d\n", N-1, valid_blk_num[N-1]); diff --git a/drivers/amlogic/media/enhancement/amvecm/vlock.c b/drivers/amlogic/media/enhancement/amvecm/vlock.c index a7304b61bcdd..68f166b947fc 100644 --- a/drivers/amlogic/media/enhancement/amvecm/vlock.c +++ b/drivers/amlogic/media/enhancement/amvecm/vlock.c @@ -1256,9 +1256,7 @@ static void vlock_enable_step3_soft_enc(void) err = oa - ia; - if ((err < margin) && (err > -margin)) - err = err; - else + if ((err > margin) && (err < -margin)) err = 0; vdif_err = err_accum + err;