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

Commit a9bc920a authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drivers: Fix several C code warnings."

parents 6ff446f9 65464021
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1184,7 +1184,7 @@ static void dp_panel_dsc_prepare_pps_packet(struct dp_panel *dp_panel)
static void _dp_panel_dsc_get_num_extra_pclk(struct msm_display_dsc_info *dsc,
static void _dp_panel_dsc_get_num_extra_pclk(struct msm_display_dsc_info *dsc,
				enum msm_display_compression_ratio ratio)
				enum msm_display_compression_ratio ratio)
{
{
	unsigned int dto_n, dto_d, remainder;
	unsigned int dto_n = 0, dto_d = 0, remainder;
	int ack_required, last_few_ack_required, accum_ack;
	int ack_required, last_few_ack_required, accum_ack;
	int last_few_pclk, last_few_pclk_required;
	int last_few_pclk, last_few_pclk_required;
	int start, temp, line_width = dsc->pic_width/2;
	int start, temp, line_width = dsc->pic_width/2;
+3 −2
Original line number Original line Diff line number Diff line
@@ -1210,12 +1210,13 @@ int dsi_phy_dyn_refresh_cache_phy_timings(struct msm_dsi_phy *phy, u32 *dst,
	if (!phy || !dst || !size)
	if (!phy || !dst || !size)
		return -EINVAL;
		return -EINVAL;


	if (phy->hw.ops.dyn_refresh_ops.cache_phy_timings)
	if (phy->hw.ops.dyn_refresh_ops.cache_phy_timings) {
		rc = phy->hw.ops.dyn_refresh_ops.cache_phy_timings(
		rc = phy->hw.ops.dyn_refresh_ops.cache_phy_timings(
				&phy->cfg.timing, dst, size);
				&phy->cfg.timing, dst, size);


		if (rc)
		if (rc)
			pr_err("failed to cache phy timings %d\n", rc);
			pr_err("failed to cache phy timings %d\n", rc);
	}


	return rc;
	return rc;
}
}
+2 −2
Original line number Original line Diff line number Diff line
/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-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
@@ -89,7 +89,7 @@ static int remote_etm_enable(struct coresight_device *csdev,
	struct coresight_set_etm_req_msg_v01 req;
	struct coresight_set_etm_req_msg_v01 req;
	struct coresight_set_etm_resp_msg_v01 resp = { { 0, 0 } };
	struct coresight_set_etm_resp_msg_v01 resp = { { 0, 0 } };
	struct qmi_txn txn;
	struct qmi_txn txn;
	int ret;
	int ret = 0;


	mutex_lock(&drvdata->mutex);
	mutex_lock(&drvdata->mutex);


+9 −9
Original line number Original line Diff line number Diff line
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-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
@@ -48,7 +48,7 @@ static ssize_t gsi_dump_evt(struct file *file,
	if (sizeof(dbg_buff) < count + 1)
	if (sizeof(dbg_buff) < count + 1)
		return -EINVAL;
		return -EINVAL;


	missing = copy_from_user(dbg_buff, buf, count);
	missing = copy_from_user(dbg_buff, buf, min(sizeof(dbg_buff), count));
	if (missing)
	if (missing)
		return -EFAULT;
		return -EFAULT;


@@ -161,7 +161,7 @@ static ssize_t gsi_dump_ch(struct file *file,
	if (sizeof(dbg_buff) < count + 1)
	if (sizeof(dbg_buff) < count + 1)
		return -EINVAL;
		return -EINVAL;


	missing = copy_from_user(dbg_buff, buf, count);
	missing = copy_from_user(dbg_buff, buf, min(sizeof(dbg_buff), count));
	if (missing)
	if (missing)
		return -EFAULT;
		return -EFAULT;


@@ -302,7 +302,7 @@ static ssize_t gsi_dump_stats(struct file *file,
	if (sizeof(dbg_buff) < count + 1)
	if (sizeof(dbg_buff) < count + 1)
		goto error;
		goto error;


	if (copy_from_user(dbg_buff, buf, count))
	if (copy_from_user(dbg_buff, buf, min(sizeof(dbg_buff), count)))
		goto error;
		goto error;


	dbg_buff[count] = '\0';
	dbg_buff[count] = '\0';
@@ -361,7 +361,7 @@ static ssize_t gsi_enable_dp_stats(struct file *file,
	if (sizeof(dbg_buff) < count + 1)
	if (sizeof(dbg_buff) < count + 1)
		goto error;
		goto error;


	if (copy_from_user(dbg_buff, buf, count))
	if (copy_from_user(dbg_buff, buf, min(sizeof(dbg_buff), count)))
		goto error;
		goto error;


	dbg_buff[count] = '\0';
	dbg_buff[count] = '\0';
@@ -421,7 +421,7 @@ static ssize_t gsi_set_max_elem_dp_stats(struct file *file,
	if (sizeof(dbg_buff) < count + 1)
	if (sizeof(dbg_buff) < count + 1)
		goto error;
		goto error;


	missing = copy_from_user(dbg_buff, buf, count);
	missing = copy_from_user(dbg_buff, buf, min(sizeof(dbg_buff), count));
	if (missing)
	if (missing)
		goto error;
		goto error;


@@ -543,7 +543,7 @@ static ssize_t gsi_rst_stats(struct file *file,
	if (sizeof(dbg_buff) < count + 1)
	if (sizeof(dbg_buff) < count + 1)
		goto error;
		goto error;


	if (copy_from_user(dbg_buff, buf, count))
	if (copy_from_user(dbg_buff, buf, min(sizeof(dbg_buff), count)))
		goto error;
		goto error;


	dbg_buff[count] = '\0';
	dbg_buff[count] = '\0';
@@ -582,7 +582,7 @@ static ssize_t gsi_print_dp_stats(struct file *file,
	if (sizeof(dbg_buff) < count + 1)
	if (sizeof(dbg_buff) < count + 1)
		goto error;
		goto error;


	if (copy_from_user(dbg_buff, buf, count))
	if (copy_from_user(dbg_buff, buf, min(sizeof(dbg_buff), count)))
		goto error;
		goto error;


	dbg_buff[count] = '\0';
	dbg_buff[count] = '\0';
@@ -639,7 +639,7 @@ static ssize_t gsi_enable_ipc_low(struct file *file,
	if (sizeof(dbg_buff) < count + 1)
	if (sizeof(dbg_buff) < count + 1)
		return -EFAULT;
		return -EFAULT;


	missing = copy_from_user(dbg_buff, ubuf, count);
	missing = copy_from_user(dbg_buff, ubuf, min(sizeof(dbg_buff), count));
	if (missing)
	if (missing)
		return -EFAULT;
		return -EFAULT;


+2 −2
Original line number Original line 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
 * 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
@@ -713,7 +713,7 @@ static ssize_t odu_debugfs_hw_bridge_mode_write(struct file *file,
	if (sizeof(dbg_buff) < count + 1)
	if (sizeof(dbg_buff) < count + 1)
		return -EFAULT;
		return -EFAULT;


	missing = copy_from_user(dbg_buff, ubuf, count);
	missing = copy_from_user(dbg_buff, ubuf, min(sizeof(dbg_buff), count));
	if (missing)
	if (missing)
		return -EFAULT;
		return -EFAULT;


Loading