mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] thermal/drivers/k3_j72xx_bandgap: Simplify code in k3_bgp_read_temp()
@ 2024-11-13  0:54 Rex Nie
  2024-11-13 17:37 ` Daniel Lezcano
  0 siblings, 1 reply; 2+ messages in thread
From: Rex Nie @ 2024-11-13  0:54 UTC (permalink / raw)
  To: rafael, daniel.lezcano, rui.zhang, lukasz.luba
  Cc: linux-pm, linux-kernel, angus.chen, rex.nie

The return value of vtm_get_best_value() always >= 0, remove always
false expression 'dtemp < 0' in if statement.

Signed-off-by: Rex Nie <rex.nie@jaguarmicro.com>
---
 drivers/thermal/k3_j72xx_bandgap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/k3_j72xx_bandgap.c b/drivers/thermal/k3_j72xx_bandgap.c
index 9bc279ac131a..1e66c98f7a61 100644
--- a/drivers/thermal/k3_j72xx_bandgap.c
+++ b/drivers/thermal/k3_j72xx_bandgap.c
@@ -238,7 +238,7 @@ static inline int k3_bgp_read_temp(struct k3_thermal_data *devdata,
 		K3_VTM_TS_STAT_DTEMP_MASK;
 	dtemp = vtm_get_best_value(s0, s1, s2);
 
-	if (dtemp < 0 || dtemp >= TABLE_SIZE)
+	if (dtemp >= TABLE_SIZE)
 		return -EINVAL;
 
 	*temp = derived_table[dtemp];
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] thermal/drivers/k3_j72xx_bandgap: Simplify code in k3_bgp_read_temp()
  2024-11-13  0:54 [PATCH] thermal/drivers/k3_j72xx_bandgap: Simplify code in k3_bgp_read_temp() Rex Nie
@ 2024-11-13 17:37 ` Daniel Lezcano
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Lezcano @ 2024-11-13 17:37 UTC (permalink / raw)
  To: Rex Nie, rafael, rui.zhang, lukasz.luba
  Cc: linux-pm, linux-kernel, angus.chen

On 13/11/2024 01:54, Rex Nie wrote:
> The return value of vtm_get_best_value() always >= 0, remove always
> false expression 'dtemp < 0' in if statement.
> 
> Signed-off-by: Rex Nie <rex.nie@jaguarmicro.com>
> ---

Applied, thanks


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-13 17:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-13  0:54 [PATCH] thermal/drivers/k3_j72xx_bandgap: Simplify code in k3_bgp_read_temp() Rex Nie
2024-11-13 17:37 ` Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®