Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7de6a8fa authored by Trishansh Bhardwaj's avatar Trishansh Bhardwaj Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: Fix compilation error with clang



Fix compilation errors in smmu, flash, ife and cdm.

Change-Id: If9c80f74c5b0b2c69ea8506d7f0b256f91c80bc0
Signed-off-by: default avatarTrishansh Bhardwaj <tbhardwa@codeaurora.org>
parent c11aa4e7
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -166,8 +166,7 @@ int cam_cdm_acquire(struct cam_cdm_acquire_data *data)
	struct cam_hw_intf *hw;
	uint32_t hw_index = 0;

	if ((!data) || (!data->identifier) || (!data->base_array) ||
		(!data->base_array_cnt))
	if (!data || !data->base_array_cnt)
		return -EINVAL;

	if (get_cdm_mgr_refcount()) {
+9 −5
Original line number Diff line number Diff line
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -715,7 +715,8 @@ static int cam_ife_hw_mgr_acquire_res_ife_out_rdi(
	ife_out_res->hw_res[0] = vfe_acquire.vfe_out.rsrc_node;
	ife_out_res->is_dual_vfe = 0;
	ife_out_res->res_id = vfe_out_res_id;
	ife_out_res->res_type = CAM_ISP_RESOURCE_VFE_OUT;
	ife_out_res->res_type = (enum cam_ife_hw_mgr_res_type)
		CAM_ISP_RESOURCE_VFE_OUT;
	ife_src_res->child[ife_src_res->num_children++] = ife_out_res;

	return 0;
@@ -805,7 +806,8 @@ static int cam_ife_hw_mgr_acquire_res_ife_out_pixel(
				ife_out_res->hw_res[j]->res_id);

		}
		ife_out_res->res_type = CAM_ISP_RESOURCE_VFE_OUT;
		ife_out_res->res_type = (enum cam_ife_hw_mgr_res_type)
			CAM_ISP_RESOURCE_VFE_OUT;
		ife_out_res->res_id = out_port->res_type;
		ife_out_res->parent = ife_src_res;
		ife_src_res->child[ife_src_res->num_children++] = ife_out_res;
@@ -918,7 +920,8 @@ static int cam_ife_hw_mgr_acquire_res_ife_src(
			CAM_ERR(CAM_ISP, "Wrong IFE CSID Resource Node");
			goto err;
		}
		ife_src_res->res_type = vfe_acquire.rsrc_type;
		ife_src_res->res_type = (enum cam_ife_hw_mgr_res_type)
			vfe_acquire.rsrc_type;
		ife_src_res->res_id = vfe_acquire.vfe_in.res_id;
		ife_src_res->is_dual_vfe = csid_res->is_dual_vfe;

@@ -1150,7 +1153,8 @@ static int cam_ife_hw_mgr_acquire_res_ife_csid_ipp(
		goto end;
	}

	csid_res->res_type = CAM_ISP_RESOURCE_PIX_PATH;
	csid_res->res_type = (enum cam_ife_hw_mgr_res_type)
		CAM_ISP_RESOURCE_PIX_PATH;
	csid_res->res_id = CAM_IFE_PIX_PATH_RES_IPP;

	if (in_port->usage_type)
+3 −3
Original line number Diff line number Diff line
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -438,7 +438,7 @@ static int cam_flash_ops(struct cam_flash_ctrl *flash_ctrl,
	if (flash_ctrl->switch_trigger)
		cam_res_mgr_led_trigger_event(
			flash_ctrl->switch_trigger,
			LED_SWITCH_ON);
			(enum led_brightness)LED_SWITCH_ON);

	return 0;
}
@@ -452,7 +452,7 @@ int cam_flash_off(struct cam_flash_ctrl *flash_ctrl)

	if (flash_ctrl->switch_trigger)
		cam_res_mgr_led_trigger_event(flash_ctrl->switch_trigger,
			LED_SWITCH_OFF);
			(enum led_brightness)LED_SWITCH_OFF);

	flash_ctrl->flash_state = CAM_FLASH_STATE_START;
	return 0;
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -3005,7 +3005,7 @@ int cam_smmu_destroy_handle(int handle)
		cam_smmu_clean_kernel_buffer_list(idx);
	}

	if (&iommu_cb_set.cb_info[idx].is_secure) {
	if (iommu_cb_set.cb_info[idx].is_secure) {
		if (iommu_cb_set.cb_info[idx].secure_count == 0) {
			mutex_unlock(&iommu_cb_set.cb_info[idx].lock);
			return -EPERM;