Skip to contentSkip to conversation

phy: rockchip: usbdp: Remove unnecessary bool conversion

PATCH Applied Thorsten Blum 3 participants 3 messages Feb 24, 2025 – Mar 12, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: rockchip: usbdp: Remove unnecessary bool conversion

Remove the unnecessary bool conversion and simplify the code.

---
 drivers/phy/rockchip/phy-rockchip-usbdp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/rockchip/phy-rockchip-usbdp.c +1 -1
index 5b1e8a3806ed..f7a36ed59ef7 100644
@@ -978,7 +978,7 @@ static int rk_udphy_parse_dt(struct rk_udphy *udphy)
 
 	if (device_property_present(dev, "maximum-speed")) {
 		maximum_speed = usb_get_maximum_speed(dev);
-		udphy->hs = maximum_speed <= USB_SPEED_HIGH ? true : false;
+		udphy->hs = maximum_speed <= USB_SPEED_HIGH;
 	}
 
 	ret = rk_udphy_clk_init(udphy, dev);
Signature · 1 line
2.48.1
maintainer Applied
#2 lore raw
In reply to Thorsten Blum
Quoted 3 lines · Thorsten Blum

Remove the unnecessary bool conversion and simplify the code.

Applied, thanks!

[1/1] phy: rockchip: usbdp: Remove unnecessary bool conversion

      commit: b52b330046d16f6e4ce94ae6fa349cc30af027b3

Best regards,

Signature · 1 line
~Vinod