Просмотр исходного кода

msm: camera: common: Fix some compile errors

This change fix unannotated fall-through between switch labels error,
also fix unused label error.

CRs-Fixed: 3247171
Change-Id: Ida29c08eed0cebec05b36e0ebac3d55ce8c6a014
Signed-off-by: zhuo <[email protected]>
zhuo 3 лет назад
Родитель
Сommit
a0ca9a026c

+ 2 - 0
drivers/cam_icp/icp_hw/icp_proc/icp_v2_hw/cam_icp_v2_core.c

@@ -72,11 +72,13 @@ static bool cam_icp_v2_cpas_cb(uint32_t handle, void *user_data,
 			"IPE/BPS UBWC decode error status=0x%08x",
 			irq_data->u.dec_err.decerr_status.value);
 		ret = true;
+		break;
 	case CAM_CAMNOC_IRQ_IPE_BPS_UBWC_ENCODE_ERROR:
 		CAM_ERR_RATE_LIMIT(CAM_ICP,
 			"IPE/BPS UBWC encode error status=0x%08x",
 			irq_data->u.enc_err.encerr_status.value);
 		ret = true;
+		break;
 	default:
 		break;
 	}

+ 1 - 1
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

@@ -3518,7 +3518,7 @@ acquire_successful:
 	return rc;
 }
 
-static cam_ife_hw_mgr_is_need_csid_ipp(
+static bool cam_ife_hw_mgr_is_need_csid_ipp(
 	struct cam_ife_hw_mgr_ctx            *ife_ctx,
 	struct cam_isp_in_port_generic_info  *in_port)
 {

+ 2 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.c

@@ -2698,6 +2698,7 @@ static int cam_ife_csid_hw_ver2_config_rx(
 	case CAM_ISP_IFE_IN_RES_TPG:
 		csid_hw->rx_cfg.phy_sel = 0;
 		csid_hw->rx_cfg.tpg_mux_sel = 0;
+		fallthrough;
 	case CAM_ISP_IFE_IN_RES_CPHY_TPG_0:
 		csid_hw->rx_cfg.tpg_mux_sel = 1;
 		csid_hw->rx_cfg.tpg_num_sel = 1;
@@ -4944,6 +4945,7 @@ static int cam_ife_csid_ver2_top_cfg(
 
 	case CAM_IFE_CSID_INPUT_CORE_SFE:
 		csid_hw->top_cfg.out_ife_en = false;
+		fallthrough;
 	case CAM_IFE_CSID_INPUT_CORE_SFE_IFE:
 
 		if (top_args->core_idx == 0) {

+ 1 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/cam_sfe_core.c

@@ -435,6 +435,7 @@ int cam_sfe_process_cmd(void *hw_priv, uint32_t cmd_type,
 		core_info->sfe_top->hw_ops.process_cmd(
 			core_info->sfe_top->top_priv, cmd_type,
 			cmd_args, arg_size);
+		fallthrough;
 	case CAM_ISP_HW_CMD_GET_RES_FOR_MID:
 	case CAM_ISP_HW_CMD_DUMP_BUS_INFO:
 		/* propagate to SFE bus wr */

+ 3 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver2.c

@@ -936,6 +936,7 @@ static enum cam_vfe_bus_packer_format
 	case CAM_FORMAT_NV21:
 		if ((wm_index == 4) || (wm_index == 6) || (wm_index == 21))
 			return PACKER_FMT_PLAIN_8_LSB_MSB_10_ODD_EVEN;
+		fallthrough;
 	case CAM_FORMAT_NV12:
 	case CAM_FORMAT_UBWC_NV12:
 	case CAM_FORMAT_UBWC_NV12_4R:
@@ -976,6 +977,7 @@ static enum cam_vfe_bus_packer_format
 	default:
 		return PACKER_FMT_MAX;
 	}
+	return PACKER_FMT_MAX;
 }
 
 static int cam_vfe_bus_acquire_wm(
@@ -1096,6 +1098,7 @@ static int cam_vfe_bus_acquire_wm(
 		case CAM_FORMAT_UBWC_NV12:
 			rsrc_data->en_ubwc = 1;
 			/* Fall through for NV12 */
+		fallthrough;
 		case CAM_FORMAT_NV21:
 		case CAM_FORMAT_NV12:
 		case CAM_FORMAT_Y_ONLY:

+ 3 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver3.c

@@ -609,6 +609,7 @@ static enum cam_vfe_bus_ver3_packer_format
 	case CAM_FORMAT_NV21:
 		if ((wm_index == 1) || (wm_index == 3) || (wm_index == 5))
 			return PACKER_FMT_VER3_PLAIN_8_LSB_MSB_10_ODD_EVEN;
+		fallthrough;
 	case CAM_FORMAT_NV12:
 	case CAM_FORMAT_UBWC_NV12:
 	case CAM_FORMAT_UBWC_NV12_4R:
@@ -637,6 +638,7 @@ static enum cam_vfe_bus_ver3_packer_format
 	default:
 		return PACKER_FMT_VER3_MAX;
 	}
+	return PACKER_FMT_VER3_MAX;
 }
 
 static int cam_vfe_bus_ver3_handle_rup_top_half(uint32_t evt_id,
@@ -1112,6 +1114,7 @@ static int cam_vfe_bus_ver3_acquire_wm(
 			break;
 		case CAM_FORMAT_UBWC_NV12:
 			rsrc_data->en_ubwc = 1;
+			fallthrough;
 			/* Fall through for NV12 */
 		case CAM_FORMAT_NV21:
 		case CAM_FORMAT_NV12:

+ 1 - 0
drivers/cam_sensor_module/cam_tpg/tpg_hw/tpg_hw.c

@@ -362,6 +362,7 @@ int tpg_hw_dump_status(struct tpg_hw *hw)
 	case TPG_HW_VERSION_1_3:
 		if (hw->hw_info->ops->dump_status)
 			hw->hw_info->ops->dump_status(hw, NULL);
+		break;
 	default:
 		CAM_WARN(CAM_TPG, "Hw version doesn't support status dump");
 		break;

+ 2 - 0
drivers/cam_sync/cam_sync.c

@@ -1985,8 +1985,10 @@ static int cam_sync_component_bind(struct device *dev,
 	CAM_DBG(CAM_SYNC, "Component bound successfully");
 	return rc;
 
+#if IS_REACHABLE(CONFIG_MSM_GLOBAL_SYNX)
 dma_driver_deinit:
 	cam_dma_fence_driver_deinit();
+#endif
 workq_destroy:
 	destroy_workqueue(sync_dev->work_queue);
 v4l2_fail: