瀏覽代碼

msm: camera: custom: Removing dead code

Some variables are never used after assignment,
so they are removed.

CRs-Fixed: 3394193
Change-Id: I3e475f96e6ff419aaa67ef0910c886dc707fc93b
Signed-off-by: Atiya Kailany <[email protected]>
Atiya Kailany 2 年之前
父節點
當前提交
cfa0b3800b
共有 1 個文件被更改,包括 2 次插入18 次删除
  1. 2 18
      drivers/cam_cust/cam_custom_hw_mgr/cam_custom_hw_mgr.c

+ 2 - 18
drivers/cam_cust/cam_custom_hw_mgr/cam_custom_hw_mgr.c

@@ -32,8 +32,6 @@ static int cam_custom_mgr_get_hw_caps(void *hw_mgr_priv, void *hw_caps_args)
 	struct cam_custom_hw_mgr          *hw_mgr = hw_mgr_priv;
 	struct cam_query_cap_cmd          *query = hw_caps_args;
 	struct cam_custom_query_cap_cmd    custom_hw_cap;
-	struct cam_hw_info                *cam_custom_hw;
-	struct cam_hw_soc_info            *soc_info_hw;
 
 	if (sizeof(struct cam_custom_query_cap_cmd) != query->size) {
 		CAM_ERR(CAM_CUSTOM,
@@ -41,12 +39,6 @@ static int cam_custom_mgr_get_hw_caps(void *hw_mgr_priv, void *hw_caps_args)
 			query->size, sizeof(struct cam_custom_query_cap_cmd));
 		return -EFAULT;
 	}
-
-	cam_custom_hw = (struct cam_hw_info *)
-		g_custom_hw_mgr.custom_hw[0]->hw_priv;
-	if (cam_custom_hw)
-		soc_info_hw = &cam_custom_hw->soc_info;
-
 	CAM_DBG(CAM_CUSTOM, "enter");
 
 	if (query->handle_type != CAM_HANDLE_USER_POINTER)
@@ -669,7 +661,6 @@ static int cam_custom_hw_mgr_acquire_cid_res(
 	struct cam_custom_hw_mgr_res         *cid_res_temp;
 	struct cam_csid_hw_reserve_resource_args  csid_acquire;
 	struct cam_isp_resource_node          *isp_rsrc_node;
-	struct cam_isp_out_port_generic_info *out_port = NULL;
 
 	custom_hw_mgr = custom_ctx->hw_mgr;
 	*cid_res = NULL;
@@ -689,9 +680,6 @@ static int cam_custom_hw_mgr_acquire_cid_res(
 	csid_acquire.node_res = NULL;
 	CAM_DBG(CAM_CUSTOM, "path_res_id %d", path_res_id);
 
-	if (in_port->num_out_res)
-		out_port = &(in_port->data[0]);
-
 	for (i = 0; i < CAM_CUSTOM_CSID_HW_MAX; i++) {
 		if (!custom_hw_mgr->csid_devices[i])
 			continue;
@@ -740,7 +728,6 @@ static int cam_custom_hw_mgr_acquire_csid_res(
 	struct cam_isp_in_port_generic_info *in_port_info)
 {
 	int rc = 0, i = 0;
-	struct cam_custom_hw_mgr                *custom_hw_mgr;
 	struct cam_isp_out_port_generic_info    *out_port;
 	struct cam_custom_hw_mgr_res            *custom_csid_res;
 	struct cam_custom_hw_mgr_res            *custom_cid_res;
@@ -750,8 +737,6 @@ static int cam_custom_hw_mgr_acquire_csid_res(
 	struct cam_isp_resource_node            *isp_rsrc_node;
 	struct cam_isp_resource_node            *cid_rsrc_node = NULL;
 
-	custom_hw_mgr = custom_ctx->hw_mgr;
-
 	for (i = 0; i < in_port_info->num_out_res; i++) {
 		out_port = &in_port_info->data[i];
 		path_res_id = cam_custom_hw_mgr_get_csid_res_type(
@@ -1475,7 +1460,6 @@ int cam_custom_hw_mgr_init(struct device_node *of_node,
 {
 	int rc = 0;
 	int i, j;
-	struct cam_custom_hw_mgr_ctx *ctx_pool;
 
 	memset(&g_custom_hw_mgr, 0, sizeof(g_custom_hw_mgr));
 	mutex_init(&g_custom_hw_mgr.ctx_mutex);
@@ -1485,12 +1469,14 @@ int cam_custom_hw_mgr_init(struct device_node *of_node,
 		/* Initialize sub modules */
 		rc = cam_custom_hw_sub_mod_init(
 				&g_custom_hw_mgr.custom_hw[i], i);
+		CAM_DBG(CAM_CUSTOM, "sub module initialized. rc:%d", rc);
 	}
 
 	for (i = 0; i < CAM_CUSTOM_CSID_HW_MAX; i++) {
 		/* Initialize csid custom modules */
 		rc = cam_custom_csid_hw_init(
 			&g_custom_hw_mgr.csid_devices[i], i);
+		CAM_DBG(CAM_CUSTOM, "csid custom module initialized. rc:%d", rc);
 	}
 
 	INIT_LIST_HEAD(&g_custom_hw_mgr.free_ctx_list);
@@ -1514,8 +1500,6 @@ int cam_custom_hw_mgr_init(struct device_node *of_node,
 			sizeof(g_custom_hw_mgr.ctx_pool[i]));
 		INIT_LIST_HEAD(&g_custom_hw_mgr.ctx_pool[i].list);
 
-		ctx_pool = &g_custom_hw_mgr.ctx_pool[i];
-
 		/* init context pool */
 		INIT_LIST_HEAD(&g_custom_hw_mgr.ctx_pool[i].free_res_list);
 		INIT_LIST_HEAD(