summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-hcd.c
diff options
context:
space:
mode:
authorSabyrzhan Tasbolatov <snovitoll@gmail.com>2024-11-12 20:58:12 +0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-11-13 15:09:50 +0100
commit982883b010d7fe485e7772d6e9347365df66130a (patch)
tree5a774afe8ab5e086c8f4182121a0a72145816d2a /drivers/usb/host/ehci-hcd.c
parent28d96b7a925309a6a8024620d83a113f75a02b0d (diff)
downloadlinux-982883b010d7fe485e7772d6e9347365df66130a.tar.gz
linux-982883b010d7fe485e7772d6e9347365df66130a.tar.bz2
linux-982883b010d7fe485e7772d6e9347365df66130a.zip
drivers/usb/host: refactor min/max with min_t/max_t
Ensure type safety by using min_t/max_t instead of casted min/max. Signed-off-by: Sabyrzhan Tasbolatov <snovitoll@gmail.com> Link: https://lore.kernel.org/r/20241112155817.3512577-4-snovitoll@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r--drivers/usb/host/ehci-hcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index cbc0b86fcc36..6de79ac5e6a4 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -547,7 +547,7 @@ static int ehci_init(struct usb_hcd *hcd)
* make problems: throughput reduction (!), data errors...
*/
if (park) {
- park = min(park, (unsigned) 3);
+ park = min_t(unsigned int, park, 3);
temp |= CMD_PARK;
temp |= park << 8;
}