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

Commit 648817d7 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc_3x: Fix clang compilation warnings" into kernel.lnx.4.9.r27-rel

parents b2fc41c3 9c177312
Loading
Loading
Loading
Loading
+2 −6
Original line number Original line Diff line number Diff line
@@ -1825,12 +1825,8 @@ static int hfi_process_session_rel_buf_done(u32 device_id,
	cmd_done.size = sizeof(struct msm_vidc_cb_cmd_done);
	cmd_done.size = sizeof(struct msm_vidc_cb_cmd_done);
	cmd_done.session_id = (void *)(uintptr_t)pkt->session_id;
	cmd_done.session_id = (void *)(uintptr_t)pkt->session_id;
	cmd_done.status = hfi_map_err_status(pkt->error_type);
	cmd_done.status = hfi_map_err_status(pkt->error_type);
	if (pkt->rg_buffer_info) {
	cmd_done.data.buffer_info.buffer_addr = *pkt->rg_buffer_info;
	cmd_done.data.buffer_info.buffer_addr = *pkt->rg_buffer_info;
	cmd_done.size = sizeof(struct hal_buffer_info);
	cmd_done.size = sizeof(struct hal_buffer_info);
	} else {
		dprintk(VIDC_ERR, "invalid payload in rel_buff_done\n");
	}


	*info = (struct msm_vidc_cb_info) {
	*info = (struct msm_vidc_cb_info) {
		.response_type =  HAL_SESSION_RELEASE_BUFFER_DONE,
		.response_type =  HAL_SESSION_RELEASE_BUFFER_DONE,
+7 −7
Original line number Original line Diff line number Diff line
@@ -1381,9 +1381,7 @@ int msm_vidc_destroy(struct msm_vidc_inst *inst)
	return 0;
	return 0;
}
}


int msm_vidc_close(void *instance)
static void close_helper(struct kref *kref)
{
	void close_helper(struct kref *kref)
{
{
	struct msm_vidc_inst *inst = container_of(kref,
	struct msm_vidc_inst *inst = container_of(kref,
			struct msm_vidc_inst, kref);
			struct msm_vidc_inst, kref);
@@ -1391,6 +1389,8 @@ int msm_vidc_close(void *instance)
	msm_vidc_destroy(inst);
	msm_vidc_destroy(inst);
}
}


int msm_vidc_close(void *instance)
{
	struct msm_vidc_inst *inst = instance;
	struct msm_vidc_inst *inst = instance;
	struct buffer_info *bi, *dummy;
	struct buffer_info *bi, *dummy;
	int rc = 0;
	int rc = 0;
+7 −7
Original line number Original line Diff line number Diff line
@@ -727,15 +727,15 @@ static void handle_sys_init_done(enum hal_command_response cmd, void *data)


}
}


void put_inst(struct msm_vidc_inst *inst)
static void put_inst_helper(struct kref *kref)
{
	void put_inst_helper(struct kref *kref)
{
{
	struct msm_vidc_inst *inst = container_of(kref,
	struct msm_vidc_inst *inst = container_of(kref,
			struct msm_vidc_inst, kref);
			struct msm_vidc_inst, kref);
	msm_vidc_destroy(inst);
	msm_vidc_destroy(inst);
}
}


void put_inst(struct msm_vidc_inst *inst)
{
	if (!inst)
	if (!inst)
		return;
		return;


+14 −14
Original line number Original line Diff line number Diff line
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * 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
 * it under the terms of the GNU General Public License version 2 and
@@ -59,13 +59,13 @@ static size_t get_u32_array_num_elements(struct device_node *np,
	return 0;
	return 0;
}
}


static inline enum imem_type read_imem_type(struct platform_device *pdev)
static bool is_compatible(char *compat)
{
	bool is_compatible(char *compat)
{
{
	return !!of_find_compatible_node(NULL, NULL, compat);
	return !!of_find_compatible_node(NULL, NULL, compat);
}
}


static inline enum imem_type read_imem_type(struct platform_device *pdev)
{
	return is_compatible("qcom,msm-ocmem") ? IMEM_OCMEM :
	return is_compatible("qcom,msm-ocmem") ? IMEM_OCMEM :
		is_compatible("qcom,msm-vmem") ? IMEM_VMEM :
		is_compatible("qcom,msm-vmem") ? IMEM_VMEM :
						IMEM_NONE;
						IMEM_NONE;
@@ -624,20 +624,20 @@ static int msm_vidc_load_cycles_per_mb_table(
	return rc;
	return rc;
}
}


static int msm_vidc_load_freq_table(struct msm_vidc_platform_resources *res)
{
	int rc = 0;
	int num_elements = 0;
	struct platform_device *pdev = res->pdev;

/* A comparator to compare loads (needed later on) */
/* A comparator to compare loads (needed later on) */
	int cmp(const void *a, const void *b)
static int cmp(const void *a, const void *b)
{
{
	/* want to sort in reverse so flip the comparison */
	/* want to sort in reverse so flip the comparison */
	return ((struct load_freq_table *)b)->load -
	return ((struct load_freq_table *)b)->load -
		((struct load_freq_table *)a)->load;
		((struct load_freq_table *)a)->load;
}
}


static int msm_vidc_load_freq_table(struct msm_vidc_platform_resources *res)
{
	int rc = 0;
	int num_elements = 0;
	struct platform_device *pdev = res->pdev;

	if (!of_find_property(pdev->dev.of_node, "qcom,load-freq-tbl", NULL)) {
	if (!of_find_property(pdev->dev.of_node, "qcom,load-freq-tbl", NULL)) {
		/* qcom,load-freq-tbl is an optional property.  It likely won't
		/* qcom,load-freq-tbl is an optional property.  It likely won't
		 * be present on cores that we can't clock scale on.
		 * be present on cores that we can't clock scale on.