usb: gadget: net2280: use swap() instead of open coding it
authorGuo Zhengkui <guozhengkui@vivo.com>
Thu, 7 Apr 2022 10:04:52 +0000 (18:04 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Apr 2022 17:03:11 +0000 (19:03 +0200)
commit67ec2c75f37780e0e825d0beb2fb4892c8a93c6a
tree5c6cd04c6854dc8cc3ab56bfb18d0e97eb7a69a9
parentb8a19881337678c02bb3d72ae821602e1a4c377d
usb: gadget: net2280: use swap() instead of open coding it

Address the following coccicheck warning:
drivers/usb/gadget/udc/net2280.c:940:20-21: WARNING opportunity for swap().
drivers/usb/gadget/udc/net2280.c:944:25-26: WARNING opportunity for swap().

by using swap() for the swapping of variable values and drop the tmp
variables (`tmp` and `end`) that are not needed any more.

Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
Link: https://lore.kernel.org/r/20220407100459.3605-1-guozhengkui@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/net2280.c