amlogic: amvecm: Fix if check warnings
authorStricted <info@stricted.net>
Sat, 19 Jun 2021 23:03:23 +0000 (23:03 +0000)
committerNolen Johnson <johnsonnolen@gmail.com>
Tue, 21 Dec 2021 18:35:24 +0000 (13:35 -0500)
Change-Id: If3696b4a33677f1a3d4db2fade1524a363d90fc7

drivers/amlogic/media/enhancement/amvecm/amcsc.c
drivers/amlogic/media/enhancement/amvecm/local_contrast.c
drivers/amlogic/media/enhancement/amvecm/vlock.c

index 6df29fc6df480afaceca2b8f0ce7546840f60c4e..84552bf7411ac18171c0492fd0a51d0eef3a9a1e 100644 (file)
@@ -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;
        }
index d93a4db2aab817891202f1766a0bb1c2e6a03f75..aa14f9ace204fcad1b1cf7002f223dccd9334e24 100644 (file)
@@ -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]);
index a7304b61bcdd34e2d5e9670684da7a3fefa81508..68f166b947fcd14770de63097507fb0f5847335c 100644 (file)
@@ -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;