Skip to content

Commit 28d96b7

Browse files
novitollgregkh
authored andcommitted
drivers/usb/core: refactor max with max_t
Ensure type safety by using max_t() instead of max(). Signed-off-by: Sabyrzhan Tasbolatov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b7d4909 commit 28d96b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/core/config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ int usb_get_configuration(struct usb_device *dev)
924924
result = -EINVAL;
925925
goto err;
926926
}
927-
length = max((int) le16_to_cpu(desc->wTotalLength),
927+
length = max_t(int, le16_to_cpu(desc->wTotalLength),
928928
USB_DT_CONFIG_SIZE);
929929

930930
/* Now that we know the length, get the whole thing */

0 commit comments

Comments
 (0)