lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240911121136.1120026-5-m.majewski2@samsung.com>
Date: Wed, 11 Sep 2024 14:11:27 +0200
From: Mateusz Majewski <m.majewski2@...sung.com>
To: linux-pm@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
	devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Cc: Mateusz Majewski <m.majewski2@...sung.com>, Bartlomiej Zolnierkiewicz
	<bzolnier@...il.com>, Krzysztof Kozlowski <krzk@...nel.org>, "Rafael J.
 Wysocki" <rafael@...nel.org>, Daniel Lezcano <daniel.lezcano@...aro.org>,
	Zhang Rui <rui.zhang@...el.com>, Lukasz Luba <lukasz.luba@....com>, Rob
	Herring <robh@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Alim Akhtar
	<alim.akhtar@...sung.com>, Sam Protsenko <semen.protsenko@...aro.org>, Anand
	Moon <linux.amoon@...il.com>, Marek Szyprowski <m.szyprowski@...sung.com>
Subject: [PATCH v4 4/7] drivers/thermal/exynos: reuse data->temp_mask in
 exynos_tmu_update_temp

Both the intention and the actual logic is identical, little point in
duplicating it.

Signed-off-by: Mateusz Majewski <m.majewski2@...sung.com>
---
 drivers/thermal/samsung/exynos_tmu.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 8b1014915c31..9bddf9fd5049 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -357,15 +357,10 @@ static void exynos_tmu_update_bit(struct exynos_tmu_data *data, int reg_off,
 static void exynos_tmu_update_temp(struct exynos_tmu_data *data, int reg_off,
 				   int bit_off, u8 temp)
 {
-	u16 tmu_temp_mask;
 	u32 th;
 
-	tmu_temp_mask =
-		(data->soc == SOC_ARCH_EXYNOS7) ? EXYNOS7_TMU_TEMP_MASK
-						: EXYNOS_TMU_TEMP_MASK;
-
 	th = readl(data->base + reg_off);
-	th &= ~(tmu_temp_mask << bit_off);
+	th &= ~(data->temp_mask << bit_off);
 	th |= temp_to_code(data, temp) << bit_off;
 	writel(th, data->base + reg_off);
 }
-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ