[PATCH] power: supply: rx51: remove redundant condition checks

Xichao Zhao posted 1 patch 3 weeks, 2 days ago
drivers/power/supply/rx51_battery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] power: supply: rx51: remove redundant condition checks
Posted by Xichao Zhao 3 weeks, 2 days ago
Remove redundant condition checks and replace else if with else.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
 drivers/power/supply/rx51_battery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/rx51_battery.c b/drivers/power/supply/rx51_battery.c
index 7cdcd415e868..b0220ec2d926 100644
--- a/drivers/power/supply/rx51_battery.c
+++ b/drivers/power/supply/rx51_battery.c
@@ -116,7 +116,7 @@ static int rx51_battery_read_temperature(struct rx51_device_info *di)
 		int mid = (max + min) / 2;
 		if (rx51_temp_table2[mid] <= raw)
 			min = mid;
-		else if (rx51_temp_table2[mid] > raw)
+		else
 			max = mid;
 		if (rx51_temp_table2[mid] == raw)
 			break;
-- 
2.34.1
Re: [PATCH] power: supply: rx51: remove redundant condition checks
Posted by Sebastian Reichel 2 weeks, 1 day ago
On Tue, 09 Sep 2025 10:09:25 +0800, Xichao Zhao wrote:
> Remove redundant condition checks and replace else if with else.
> 
> 

Applied, thanks!

[1/1] power: supply: rx51: remove redundant condition checks
      commit: 1bafaa156ed3881cd4f187ab1c43e408742e1f11

Best regards,
-- 
Sebastian Reichel <sebastian.reichel@collabora.com>