]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit98ff41063241784d6fbdbef9316974eef2cb073d
tree5c6cd04c6854dc8cc3ab56bfb18d0e97eb7a69a9
parentf83bfe41e67ffac16e5928b48adf4c1fadcd9f6c
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