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: gadget: tegra-xudc: 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/20250902132613.84876-1-liaoyuanhong@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Liao Yuanhong and committed by
Greg Kroah-Hartman
6f9871b3 0f577e88

+1 -2
+1 -2
drivers/usb/gadget/udc/tegra-xudc.c
··· 812 812 return; 813 813 } 814 814 815 - xudc->device_mode = (usbphy->last_event == USB_EVENT_VBUS) ? true : 816 - false; 815 + xudc->device_mode = usbphy->last_event == USB_EVENT_VBUS; 817 816 818 817 phy_index = tegra_xudc_get_phy_index(xudc, usbphy); 819 818 dev_dbg(xudc->dev, "%s(): current phy index is %d\n", __func__,