Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: host: xhci-tegra: Remove redundant ternary operators

For ternary operators in the form of "a ? true : false", if 'a' itself
returns a boolean result, the ternary operator can be omitted. Remove
redundant ternary operators to clean up the code.

Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
Link: https://lore.kernel.org/r/20250902132720.85504-1-liaoyuanhong@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Liao Yuanhong and committed by
Greg Kroah-Hartman
1c208fd3 9d4552da

+1 -1
+1 -1
drivers/usb/host/xhci-tegra.c
··· 1482 1482 1483 1483 tegra->otg_usb2_port = tegra_xusb_get_usb2_port(tegra, usbphy); 1484 1484 1485 - tegra->host_mode = (usbphy->last_event == USB_EVENT_ID) ? true : false; 1485 + tegra->host_mode = usbphy->last_event == USB_EVENT_ID; 1486 1486 1487 1487 schedule_work(&tegra->id_work); 1488 1488