On 2/15/26 1:35 PM, Siddharth Vadapalli wrote:
[...]
+static int cdns3_get_otg_mode(struct udevice *parent, enum usb_dr_mode *mode)
+{
+ /* Create a temporary child device for using devfdt_remap_addr_name() */
+ struct udevice child = {
+ .parent = parent,
+ };
+ struct cdns3 cdns, *cdnsp;
+ void __iomem *otg_regs;
+ int vbus;
[...]
+ /* Use VBUS Valid to determine role */
+ vbus = !!(readl(&cdnsp->otg_regs->sts) & OTGSTS_VBUS_VALID);
+ if (vbus)
The double-negation is not needed here, simply use:
if (readl(&cdnsp->otg_regs->sts) & OTGSTS_VBUS_VALID) {
...