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

Commit 21a15b05 authored by Jeremy Gebben's avatar Jeremy Gebben Committed by Tarun Karra
Browse files

msm: kgsl: fix sparse type conversion errors



Fix many places where we needlessly use the wrong type
or pointer decoration.

Change-Id: Ic60e91389c5a577970ffe37d4511baf3a45fea35
Signed-off-by: default avatarJeremy Gebben <jgebben@codeaurora.org>
parent 1c252c83
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -2299,14 +2299,14 @@ static int adreno_suspend_context(struct kgsl_device *device)
 * @value - Value read from the device memory
 * @mem_len - Length of the device memory mapped to the kernel
 */
static void adreno_read(struct kgsl_device *device, void *base,
static void adreno_read(struct kgsl_device *device, void __iomem *base,
		unsigned int offsetwords, unsigned int *value,
		unsigned int mem_len)
{

	unsigned int *reg;
	unsigned int __iomem *reg;
	BUG_ON(offsetwords*sizeof(uint32_t) >= mem_len);
	reg = (unsigned int *)(base + (offsetwords << 2));
	reg = (unsigned int __iomem *)(base + (offsetwords << 2));

	if (!in_interrupt())
		kgsl_pre_hwaccess(device);
@@ -2346,7 +2346,7 @@ static void adreno_regwrite(struct kgsl_device *device,
				unsigned int offsetwords,
				unsigned int value)
{
	unsigned int *reg;
	unsigned int __iomem *reg;

	BUG_ON(offsetwords*sizeof(uint32_t) >= device->reg_len);

@@ -2356,7 +2356,7 @@ static void adreno_regwrite(struct kgsl_device *device,
	trace_kgsl_regwrite(device, offsetwords, value);

	kgsl_cffdump_regwrite(device, offsetwords << 2, value);
	reg = (unsigned int *)(device->reg_virt + (offsetwords << 2));
	reg = (unsigned int __iomem *)(device->reg_virt + (offsetwords << 2));

	/*ensure previous writes post before this one,
	 * i.e. act like normal writel() */
+3 −3
Original line number Diff line number Diff line
@@ -1339,7 +1339,7 @@ static void a4xx_perfcounter_init(struct adreno_device *adreno_dev)
		 * are swizzled so only a subset of them are usable
		 */

		if (counters != 0) {
		if (counters != NULL) {
			counters->groups[KGSL_PERFCOUNTER_GROUP_CP].regs =
				a420_perfcounters_cp;
			counters->groups[KGSL_PERFCOUNTER_GROUP_CP].reg_count =
@@ -1968,7 +1968,7 @@ static void a4xx_preempt_clear_state(
	if (dispatch_tempq->head != dispatch_tempq->tail)
		cmdbatch = dispatch_tempq->cmd_q[dispatch_tempq->head];
	else
		cmdbatch = 0;
		cmdbatch = NULL;
	if (cmdbatch)
		adreno_ringbuffer_mmu_disable_clk_on_ts(device,
			adreno_dev->next_rb,
@@ -2043,7 +2043,7 @@ static void a4xx_preempt_complete_state(
	adreno_dev->cur_rb = adreno_dev->next_rb;
	adreno_dev->cur_rb->preempted_midway = 0;
	adreno_dev->cur_rb->wptr_preempt_end = 0xFFFFFFFF;
	adreno_dev->next_rb = 0;
	adreno_dev->next_rb = NULL;
	if (adreno_disp_preempt_fair_sched) {
		/* starved rb is now scheduled so unhalt dispatcher */
		if (ADRENO_DISPATCHER_RB_STARVE_TIMER_ELAPSED ==
+2 −2
Original line number Diff line number Diff line
@@ -1810,7 +1810,7 @@ static void a5xx_post_start(struct adreno_device *adreno_dev)
	}

	if (adreno_is_preemption_enabled(adreno_dev))
		cmds += _preemption_init(adreno_dev, rb, cmds, 0);
		cmds += _preemption_init(adreno_dev, rb, cmds, NULL);

	if (cmds == start)
		return;
@@ -3169,7 +3169,7 @@ static void a5xx_preempt_complete_state(
	adreno_dev->cur_rb = adreno_dev->next_rb;
	adreno_dev->cur_rb->preempted_midway = 0;
	adreno_dev->cur_rb->wptr_preempt_end = 0xFFFFFFFF;
	adreno_dev->next_rb = 0;
	adreno_dev->next_rb = NULL;

	if (adreno_disp_preempt_fair_sched) {
		/* starved rb is now scheduled so unhalt dispatcher */
+1 −2
Original line number Diff line number Diff line
@@ -160,8 +160,7 @@ static long adreno_ioctl_perfcounter_query_compat(
	long result;

	query.groupid = query32->groupid;
	query.countables =
		(unsigned int __user *)(uintptr_t) query32->countables;
	query.countables = to_user_ptr(query32->countables);
	query.count = query32->count;
	query.max_counters = query32->max_counters;

+4 −4
Original line number Diff line number Diff line
@@ -792,7 +792,7 @@ error_free:
	return size;
}

static int _pipe_print_pending(char *ubuf, size_t max)
static int _pipe_print_pending(char __user *ubuf, size_t max)
{
	loff_t unused = 0;
	char str[] = "Operation Would Block!";
@@ -802,11 +802,11 @@ static int _pipe_print_pending(char *ubuf, size_t max)
}

static int _pipe_print_results(struct adreno_device *adreno_dev,
		char *ubuf, size_t max)
		char __user *ubuf, size_t max)
{
	struct adreno_profile *profile = &adreno_dev->profile;
	const char *grp_name;
	char *usr_buf = ubuf;
	char __user *usr_buf = ubuf;
	unsigned int *log_ptr = NULL, *tmp_log_ptr = NULL;
	int len, i;
	int status = 0;
@@ -946,7 +946,7 @@ static ssize_t profile_pipe_print(struct file *filep, char __user *ubuf,
	struct kgsl_device *device = (struct kgsl_device *) filep->private_data;
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
	struct adreno_profile *profile = &adreno_dev->profile;
	char *usr_buf = ubuf;
	char __user *usr_buf = ubuf;
	int status = 0;

	/*
Loading