]> git.baikalelectronics.ru Git - kernel.git/commit
usb: ldusb: replace ternary operator with max_t()
authorJiangshan Yi <yijiangshan@kylinos.cn>
Wed, 13 Jul 2022 07:02:05 +0000 (15:02 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Jul 2022 14:09:56 +0000 (16:09 +0200)
commit93b3437dbb1f0378bc5db37e25c5a38674f41245
tree9410557dcb47febe7f2f62a0905f6d0ba3cc5735
parentcf89b0ad369805d574a88bd08357498757c70eb7
usb: ldusb: replace ternary operator with max_t()

Fix the following coccicheck warning:

drivers/usb/misc/ldusb.c:719: WARNING opportunity for max().
drivers/usb/misc/ldusb.c:721: WARNING opportunity for max().

max_t() macro is defined in include/linux/minmax.h. It avoids
multiple evaluations of the arguments when non-constant and performs
strict type-checking.

Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn>
Link: https://lore.kernel.org/r/20220713070205.3047256-1-13667453960@163.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/ldusb.c