Переглянути джерело

video: driver: fix some checker err

Fix some checker err

Change-Id: I357059999dd43b58d6c414868a8b4060b6b691da
Signed-off-by: Anshul Agarwal <[email protected]>
Anshul Agarwal 2 роки тому
батько
коміт
950306d1aa

+ 1 - 1
driver/variant/iris3/src/msm_vidc_bus_iris3.c

@@ -608,7 +608,7 @@ static int calculate_bandwidth_encoder_iris3(
 		(codec_input.codec == CODEC_H264_CAVLC)) {
 		frame_lcu_size = 16;
 		collocated_bytes_per_lcu = 16;
-	} if (codec_input.codec == CODEC_HEVC) {
+	} else if (codec_input.codec == CODEC_HEVC) {
 		frame_lcu_size = 32;
 		collocated_bytes_per_lcu = 64;
 	} else {

+ 1 - 1
driver/variant/iris33/src/msm_vidc_bus_iris33.c

@@ -608,7 +608,7 @@ static int calculate_bandwidth_encoder_iris33(
 		(codec_input.codec == CODEC_H264_CAVLC)) {
 		frame_lcu_size = 16;
 		collocated_bytes_per_lcu = 16;
-	} if (codec_input.codec == CODEC_HEVC) {
+	} else if (codec_input.codec == CODEC_HEVC) {
 		frame_lcu_size = 32;
 		collocated_bytes_per_lcu = 64;
 	} else {

+ 2 - 4
driver/variant/iris33/src/msm_vidc_iris33.c

@@ -38,8 +38,7 @@
 
 #define HFI_CTRL_INIT_IRIS33                          VCODEC_VPU_CPU_CS_SCIACMD_IRIS33
 #define HFI_CTRL_STATUS_IRIS33                        VCODEC_VPU_CPU_CS_SCIACMDARG0_IRIS33
-typedef enum
-{
+typedef enum {
     HFI_CTRL_NOT_INIT                   = 0x0,
     HFI_CTRL_READY                      = 0x1,
     HFI_CTRL_ERROR_FATAL                = 0x2,
@@ -50,8 +49,7 @@ typedef enum
 } hfi_ctrl_status_type;
 
 #define HFI_QTBL_INFO_IRIS33                          VCODEC_VPU_CPU_CS_SCIACMDARG1_IRIS33
-typedef enum
-{
+typedef enum {
     HFI_QTBL_DISABLED    = 0x00,
     HFI_QTBL_ENABLED     = 0x01,
 } hfi_qtbl_status_type;

+ 2 - 2
driver/vidc/inc/venus_hfi_queue.h

@@ -63,8 +63,8 @@ struct hfi_queue_header {
 	VIDC_IFACEQ_MAX_BUF_COUNT * VIDC_IFACE_MAX_PARALLEL_CLNTS)
 
 #define VIDC_IFACEQ_GET_QHDR_START_ADDR(ptr, i)     \
-	(void *)((ptr + sizeof(struct hfi_queue_table_header)) + \
-		(i * sizeof(struct hfi_queue_header)))
+	((void *)((ptr + sizeof(struct hfi_queue_table_header)) + \
+		(i * sizeof(struct hfi_queue_header))))
 
 #define QDSS_SIZE	4096
 #define SFR_SIZE	4096

+ 2 - 3
driver/vidc/src/msm_vidc_debug.c

@@ -25,7 +25,7 @@ unsigned int msm_vidc_debug = DRV_LOG;
 unsigned int msm_fw_debug = FW_LOG;
 
 /* disabled synx fence by default temporarily */
-bool msm_vidc_synx_fence_enable = false;
+bool msm_vidc_synx_fence_enable;
 
 static int debug_level_set_drv(const char *val,
 	const struct kernel_param *kp)
@@ -405,8 +405,7 @@ static ssize_t trigger_ssr_write(struct file *filp, const char __user *buf,
 	if (rc) {
 		d_vpr_e("returning error err %d\n", rc);
 		rc = -EINVAL;
-	}
-	else {
+	} else {
 		msm_vidc_trigger_ssr(core, ssr_trigger_val);
 		rc = count;
 	}

+ 4 - 4
driver/vidc/src/msm_vidc_driver.c

@@ -999,7 +999,7 @@ bool is_hevc_10bit_decode_session(struct msm_vidc_inst *inst)
 
 	/* in case of decoder session return false */
 	if (!is_decode_session(inst))
-              return false;
+		return false;
 
 	colorformat = v4l2_colorformat_to_driver(inst,
 		inst->fmts[OUTPUT_PORT].fmt.pix_mp.pixelformat, __func__);
@@ -4934,8 +4934,8 @@ static int msm_vidc_get_inst_load(struct msm_vidc_inst *inst)
 	return mbpf * fps;
 }
 
-static bool msm_vidc_ignore_session_load(struct msm_vidc_inst *inst) {
-
+static bool msm_vidc_ignore_session_load(struct msm_vidc_inst *inst)
+{
 	if (!is_realtime_session(inst) || is_thumbnail_session(inst) ||
 		is_image_session(inst) || is_session_error(inst))
 		return true;
@@ -5010,7 +5010,7 @@ int msm_vidc_check_core_mbps(struct msm_vidc_inst *inst)
 			}
 			core_unlock(core, __func__);
 		}
-	} else if (is_decode_session(inst)){
+	} else if (is_decode_session(inst)) {
 		/*
 		 * if total_mbps is greater than max_mbps then allow this
 		 * decoder by reducing its piority (moving it to NRT)

+ 1 - 1
driver/vidc/src/resources.c

@@ -1265,7 +1265,7 @@ static int update_residency_stats(
 	int rc = 0;
 
 	/* skip update if high or stats logs not enabled */
-	if(!(msm_vidc_debug & (VIDC_HIGH | VIDC_STAT)))
+	if (!(msm_vidc_debug & (VIDC_HIGH | VIDC_STAT)))
 		return 0;
 
 	if (!core || !cl) {

+ 1 - 1
driver/vidc/src/resources_ext.c

@@ -338,7 +338,7 @@ static int update_residency_stats(
 	int rc = 0;
 
 	/* skip update if high or stats logs not enabled */
-	if(!(msm_vidc_debug & (VIDC_HIGH | VIDC_STAT)))
+	if (!(msm_vidc_debug & (VIDC_HIGH | VIDC_STAT)))
 		return 0;
 
 	if (!core || !cl) {