[COMMON] media: mfc: Resolved Prevent Issue
authorAyoung Sim <a.sim@samsung.com>
Tue, 23 Apr 2019 05:37:55 +0000 (14:37 +0900)
committerKim Gunho <gunho.kim@samsung.com>
Fri, 28 Jun 2019 14:45:47 +0000 (23:45 +0900)
Fixed errors in mfc_watchdog.c:
1. Unsigned comparison against 0
2. Invalid Assignement(variable size difference)

Change-Id: I0043d49ba651fe0f9e7992ce133d19cea6a65723
Signed-off-by: seungmin.ahn <seungmin.ahn@samsung.com>
drivers/media/platform/exynos/mfc/mfc_watchdog.c

index e539591501e1f5bbe21439bb45b6fc192415757b..3ead54ae9db68cf059aa946b290c434770f31003 100644 (file)
@@ -222,8 +222,7 @@ static void __mfc_save_logging_sfr(struct mfc_dev *dev)
                /* READ PAGE FAULT at AxID 0 ~ 3: PX */
                if ((dev->logging_data->cause & (1 << MFC_CAUSE_0READ_PAGE_FAULT)) ||
                                (dev->logging_data->cause & (1 << MFC_CAUSE_1READ_PAGE_FAULT))) {
-                       if (((dev->logging_data->fault_trans_info & 0xff) >= 0) &&
-                                       ((dev->logging_data->fault_trans_info & 0xff) <= 3)) {
+                       if ((dev->logging_data->fault_trans_info & 0xff) <= 3) {
                                px_fault = true;
                                for (i = 0; i < MFC_SFR_LOGGING_COUNT_SET2; i++)
                                        dev->logging_data->SFRs_set2[i] = MFC_READL(mfc_logging_sfr_set2[i]);
@@ -265,7 +264,7 @@ static void __mfc_save_logging_sfr(struct mfc_dev *dev)
        dev->logging_data->last_int_sec = dev->last_int_time.tv_sec;
        dev->logging_data->last_int_usec = dev->last_int_time.tv_usec;
        dev->logging_data->hwlock_dev = dev->hwlock.dev;
-       dev->logging_data->hwlock_ctx = dev->hwlock.bits;
+       dev->logging_data->hwlock_ctx = (u32)(dev->hwlock.bits);
        dev->logging_data->num_inst = dev->num_inst;
        dev->logging_data->num_drm_inst = dev->num_drm_inst;
        dev->logging_data->power_cnt = mfc_pm_get_pwr_ref_cnt(dev);