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

Commit 75ac63db authored by Rex Zhu's avatar Rex Zhu Committed by Alex Deucher
Browse files

drm/amd/powerplay: fix Smatch static checker warnings with indenting (v2)



v2: AGD: rebase on upstream

Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarKen Wang <Qingqing.Wang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 53d3de14
Loading
Loading
Loading
Loading
+26 −25
Original line number Diff line number Diff line
@@ -943,6 +943,7 @@ static int fiji_trim_voltage_table(struct pp_hwmgr *hwmgr,

	return 0;
}

static int fiji_get_svi2_mvdd_voltage_table(struct pp_hwmgr *hwmgr,
		phm_ppt_v1_clock_voltage_dependency_table *dep_table)
{
+0 −1
Original line number Diff line number Diff line
@@ -317,4 +317,3 @@ int phm_set_cpu_power_state(struct pp_hwmgr *hwmgr)

	return 0;
}
+275 −280
Original line number Diff line number Diff line
@@ -272,7 +272,6 @@ fInt GetScaledFraction(int X, int factor)

	if (factor < 0) {
		factor = -1*factor;

		bNEGATED = !bNEGATED; /*If bNEGATED = true due to X < 0, this will cover the case of negative cancelling negative */
	}

@@ -413,7 +412,9 @@ fInt fSqrt(fInt num)
	fInt x_new, x_old, C, y;

	fInt fZERO = ConvertToFraction(0);

	/* (0 > num) is the same as (num < 0), i.e., num is negative */

	if (GreaterThan(fZERO, num) || Equal(fZERO, num))
		return fZERO;

@@ -521,12 +522,8 @@ int GetRoundedValue(fInt A) /*For now, round the 3rd decimal place */
{
	/* ROUNDING TEMPORARLY DISABLED
	int temp = A.full;

	int decimal_cutoff, decimal_mask = 0x000001FF;

	decimal_cutoff = temp & decimal_mask;


	if (decimal_cutoff > 0x147) {
		temp += 673;
	}*/
@@ -545,6 +542,7 @@ fInt Multiply (int X, int Y)

	return Product;
}

fInt Divide (int X, int Y)
{
	fInt A, B, Quotient;
@@ -564,11 +562,8 @@ int uGetScaledDecimal (fInt A) /*Converts the fractional portion to whole intege

	for (i = 0; i < PRECISION; i++) {
		dec[i] = tmp / (1 << SHIFT_AMOUNT);

		tmp = tmp - ((1 << SHIFT_AMOUNT)*dec[i]);

		tmp *= 10;

		scaledDecimal = scaledDecimal + dec[i]*uPow(10, PRECISION - 1 -i);
	}

+6 −6

File changed.

Contains only whitespace changes.

+4 −4

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

Loading