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

Commit 635c9907 authored by Ralf Baechle's avatar Ralf Baechle
Browse files

MIPS: Remove useless parentheses



Based on the spatch

@@
expression e;
@@
- return (e);
+ return e;

with heavy hand editing because some of the changes are either whitespace
or identation only or result in excessivly long lines.

Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 5d01410f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -263,7 +263,7 @@ static unsigned int detect_memory_size(void)

	if (BCMCPU_IS_6345()) {
		val = bcm_sdram_readl(SDRAM_MBASE_REG);
		return (val * 8 * 1024 * 1024);
		return val * 8 * 1024 * 1024;
	}

	if (BCMCPU_IS_6338() || BCMCPU_IS_6348()) {
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ static inline unsigned long cpu_get_fpu_id(void)
 */
static inline int __cpu_has_fpu(void)
{
	return ((cpu_get_fpu_id() & FPIR_IMP_MASK) != FPIR_IMP_NONE);
	return (cpu_get_fpu_id() & FPIR_IMP_MASK) != FPIR_IMP_NONE;
}

static inline unsigned long cpu_get_msa_id(void)
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ unsigned int gic_get_timer_pending(void)

	GICWRITE(GIC_REG(VPE_LOCAL, GIC_VPE_OTHER_ADDR), 0);
	GICREAD(GIC_REG(VPE_OTHER, GIC_VPE_PEND), vpe_pending);
	return (vpe_pending & GIC_VPE_PEND_TIMER_MSK);
	return vpe_pending & GIC_VPE_PEND_TIMER_MSK;
}

void gic_bind_eic_interrupt(int irq, int set)
+18 −18
Original line number Diff line number Diff line
@@ -187,21 +187,21 @@ static inline int is_ra_save_ins(union mips_instruction *ip)
	 */
	if (mm_insn_16bit(ip->halfword[0])) {
		mmi.word = (ip->halfword[0] << 16);
		return ((mmi.mm16_r5_format.opcode == mm_swsp16_op &&
		return (mmi.mm16_r5_format.opcode == mm_swsp16_op &&
			mmi.mm16_r5_format.rt == 31) ||
		       (mmi.mm16_m_format.opcode == mm_pool16c_op &&
			 mmi.mm16_m_format.func == mm_swm16_op));
			mmi.mm16_m_format.func == mm_swm16_op);
	}
	else {
		mmi.halfword[0] = ip->halfword[1];
		mmi.halfword[1] = ip->halfword[0];
		return ((mmi.mm_m_format.opcode == mm_pool32b_op &&
		return (mmi.mm_m_format.opcode == mm_pool32b_op &&
			mmi.mm_m_format.rd > 9 &&
			mmi.mm_m_format.base == 29 &&
			mmi.mm_m_format.func == mm_swm32_func) ||
		       (mmi.i_format.opcode == mm_sw32_op &&
			mmi.i_format.rs == 29 &&
			 mmi.i_format.rt == 31));
			mmi.i_format.rt == 31);
	}
#else
	/* sw / sd $ra, offset($sp) */
@@ -233,7 +233,7 @@ static inline int is_jump_ins(union mips_instruction *ip)
	if (ip->r_format.opcode != mm_pool32a_op ||
			ip->r_format.func != mm_pool32axf_op)
		return 0;
	return (((ip->u_format.uimmediate >> 6) & mm_jalr_op) == mm_jalr_op);
	return ((ip->u_format.uimmediate >> 6) & mm_jalr_op) == mm_jalr_op;
#else
	if (ip->j_format.opcode == j_op)
		return 1;
@@ -260,13 +260,13 @@ static inline int is_sp_move_ins(union mips_instruction *ip)
		union mips_instruction mmi;

		mmi.word = (ip->halfword[0] << 16);
		return ((mmi.mm16_r3_format.opcode == mm_pool16d_op &&
		return (mmi.mm16_r3_format.opcode == mm_pool16d_op &&
			mmi.mm16_r3_format.simmediate && mm_addiusp_func) ||
		       (mmi.mm16_r5_format.opcode == mm_pool16d_op &&
			 mmi.mm16_r5_format.rt == 29));
			mmi.mm16_r5_format.rt == 29);
	}
	return (ip->mm_i_format.opcode == mm_addiu32_op &&
		 ip->mm_i_format.rt == 29 && ip->mm_i_format.rs == 29);
	return ip->mm_i_format.opcode == mm_addiu32_op &&
	       ip->mm_i_format.rt == 29 && ip->mm_i_format.rs == 29;
#else
	/* addiu/daddiu sp,sp,-imm */
	if (ip->i_format.rs != 29 || ip->i_format.rt != 29)
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ int gpio_get_value(unsigned gpio)
	val = LOONGSON_GPIODATA;
	spin_unlock(&gpio_lock);

	return ((val & mask) != 0);
	return (val & mask) != 0;
}
EXPORT_SYMBOL(gpio_get_value);

Loading